summarylogtreecommitdiffstats
path: root/lto-discard.patch
diff options
context:
space:
mode:
authorfelix2016-04-28 23:02:45 +0200
committerfelix2016-05-08 12:43:53 +0200
commitb7581a4c10cd820c450cccccd7a66a91bf54cad6 (patch)
treed4d52969a09892ec48e22a8adcd28b2b1af7da2f /lto-discard.patch
parentfebc6805eb0a5f324ba9504dc4ab6460e14d7ecc (diff)
downloadaur-b7581a4c10cd820c450cccccd7a66a91bf54cad6.tar.gz
Enable LTO and add patch to discard LTO sections in coff-go32-exe files
Diffstat (limited to 'lto-discard.patch')
-rw-r--r--lto-discard.patch17
1 files changed, 17 insertions, 0 deletions
diff --git a/lto-discard.patch b/lto-discard.patch
new file mode 100644
index 000000000000..ae89827649f5
--- /dev/null
+++ b/lto-discard.patch
@@ -0,0 +1,17 @@
+--- binutils-2.26/ld/scripttempl/i386go32.sc
++++ binutils-2.26/ld/scripttempl/i386go32.sc
+@@ -19,6 +19,7 @@
+ *(SORT(.dtors.*))
+ *(.dtor) *(.dtors)
+ }'
++DISCARDED="/DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) }"
+
+ cat <<EOF
+ /* Copyright (C) 2014-2015 Free Software Foundation, Inc.
+@@ -82,5 +83,6 @@
+ . $srcdir/scripttempl/DWARF.sc
+
+ cat <<EOF
++ ${RELOCATING+${DISCARDED}}
+ }
+ EOF