diff options
author | felix | 2016-04-28 23:02:45 +0200 |
---|---|---|
committer | felix | 2016-05-08 12:43:53 +0200 |
commit | b7581a4c10cd820c450cccccd7a66a91bf54cad6 (patch) | |
tree | d4d52969a09892ec48e22a8adcd28b2b1af7da2f | |
parent | febc6805eb0a5f324ba9504dc4ab6460e14d7ecc (diff) | |
download | aur-b7581a4c10cd820c450cccccd7a66a91bf54cad6.tar.gz |
Enable LTO and add patch to discard LTO sections in coff-go32-exe files
-rw-r--r-- | .SRCINFO | 4 | ||||
-rw-r--r-- | PKGBUILD | 10 | ||||
-rw-r--r-- | lto-discard.patch | 17 | ||||
-rw-r--r-- | lto.patch | 29 |
4 files changed, 59 insertions, 1 deletions
@@ -14,10 +14,14 @@ pkgbase = djgpp-binutils source = http://ftp.gnu.org/gnu/binutils/binutils-2.26.tar.bz2 source = http://ftp.gnu.org/gnu/binutils/binutils-2.26.tar.bz2.sig source = xtors.patch + source = lto.patch + source = lto-discard.patch validpgpkeys = EAF1C276A747E9ED86210CBAC3126D3B4AE55E93 sha512sums = e77e1b8dbbcbaf9ac2fae95c4403615808af3be03b2e1d32448cd3a7d32c43273f8bcace3f2de84ec120a982879295673029da306e2885dbf5f990584932cfc7 sha512sums = SKIP sha512sums = d1d1052167e84720a771cd526166997c8a2b14135bb7c1f956d7940cfc2336191825118426cfe4c5fdfd1c8718088c1ba327d90874658baf2738c8d5a7ed0bec + sha512sums = 548b25b48348eafa8087b6c7f592adb90c47622c88d1e2ed56435f6c8265d5a4937e61e0803fb74f509eb90fe847bed1d3e78b3d094e1085f026de2658012434 + sha512sums = 85c58eed0fa01fe2295a0c402cb0e2252c00ed38529f679cd9cdd0e1336a192152665b856971114a9a3d1175b72ea71f0e278cf33fd806491c8d184bbd01d2a9 pkgname = djgpp-binutils @@ -18,11 +18,15 @@ source=( "http://ftp.gnu.org/gnu/binutils/binutils-${pkgver}.tar.bz2" "http://ftp.gnu.org/gnu/binutils/binutils-${pkgver}.tar.bz2.sig" xtors.patch + lto.patch + lto-discard.patch ) sha512sums=( 'e77e1b8dbbcbaf9ac2fae95c4403615808af3be03b2e1d32448cd3a7d32c43273f8bcace3f2de84ec120a982879295673029da306e2885dbf5f990584932cfc7' 'SKIP' 'd1d1052167e84720a771cd526166997c8a2b14135bb7c1f956d7940cfc2336191825118426cfe4c5fdfd1c8718088c1ba327d90874658baf2738c8d5a7ed0bec' + '548b25b48348eafa8087b6c7f592adb90c47622c88d1e2ed56435f6c8265d5a4937e61e0803fb74f509eb90fe847bed1d3e78b3d094e1085f026de2658012434' + '85c58eed0fa01fe2295a0c402cb0e2252c00ed38529f679cd9cdd0e1336a192152665b856971114a9a3d1175b72ea71f0e278cf33fd806491c8d184bbd01d2a9' ) validpgpkeys=('EAF1C276A747E9ED86210CBAC3126D3B4AE55E93') # Tristan Gingold <adacore dot com, gingold> @@ -39,6 +43,10 @@ prepare() { # put .ctors and .dtors where they belong patch -Np1 < ../xtors.patch + # enable LTO in configure (probably does nothing, but still) + patch -Np1 < ../lto.patch + # discard LTO sections in coff-go32-exe files + patch -Np1 < ../lto-discard.patch } build() { @@ -49,7 +57,7 @@ build() { --target="${_target}" \ --infodir="/usr/share/info/$_target" \ --datadir="/usr/$_target/share" \ - --disable-lto --enable-plugins \ + --enable-lto --enable-plugins \ --disable-multilib --disable-nls \ --disable-werror make 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 diff --git a/lto.patch b/lto.patch new file mode 100644 index 000000000000..faad3e173959 --- /dev/null +++ b/lto.patch @@ -0,0 +1,29 @@ +--- a/configure ++++ b/configure +@@ -6116,7 +6116,7 @@ if test $target_elf = yes; then : + else + if test x"$default_enable_lto" = x"yes" ; then + case $target in +- *-apple-darwin9* | *-cygwin* | *-mingw*) ;; ++ *-apple-darwin9* | *-cygwin* | *-mingw* | *djgpp*) ;; + # On other non-ELF platforms, LTO has yet to be validated. + *) enable_lto=no ;; + esac +@@ -6127,7 +6127,7 @@ else + # warn during gcc/ subconfigure; unless you're bootstrapping with + # -flto it won't be needed until after installation anyway. + case $target in +- *-cygwin* | *-mingw* | *-apple-darwin*) ;; ++ *-cygwin* | *-mingw* | *-apple-darwin* | *djgpp*) ;; + *) if test x"$enable_lto" = x"yes"; then + as_fn_error "LTO support is not enabled for this target." "$LINENO" 5 + fi +@@ -6137,7 +6137,7 @@ else + # Among non-ELF, only Windows platforms support the lto-plugin so far. + # Build it unless LTO was explicitly disabled. + case $target in +- *-cygwin* | *-mingw*) build_lto_plugin=$enable_lto ;; ++ *-cygwin* | *-mingw* | *djgpp*) build_lto_plugin=$enable_lto ;; + *) ;; + esac + |