diff options
Diffstat (limited to 'core/binutils/PKGBUILD')
-rw-r--r-- | core/binutils/PKGBUILD | 67 |
1 files changed, 45 insertions, 22 deletions
diff --git a/core/binutils/PKGBUILD b/core/binutils/PKGBUILD index 416fea9b..c1110778 100644 --- a/core/binutils/PKGBUILD +++ b/core/binutils/PKGBUILD @@ -6,7 +6,7 @@ eval "$( ' )" -# enable BFD for x86_64 other we have problems with cross-compilation +# enable BFD for x86_64 otherwise we have problems with cross-compilation # or compiling things like grub eval "$( declare -f build | \ @@ -15,26 +15,6 @@ eval "$( ' )" -# segfaults in ld of binutils 2.30 needs the binutils_2_30 branch -# for now, see https://sourceware.org/bugzilla/show_bug.cgi?id=23194 -# this patch was done by diffing the branch against the tag and removing -# some conflicts, also 0003-PR22836-r-s-doesnt-work-with-g3-using-GCC-7.patch -# needs disabling because it has already been cherry-picked into the branch. -# cherry-picking onlt the fiy for P23194 leads to assertion violations in -# the GOT, so this was not done. -# also conflicted with parts of the gold ld patch 0004-PR22868, eliminated -# conflicts by picking only the necessary things.. -source+=(binutils-2.30-glibc-segfault.patch) -sha256sums+=('7c8480f032c85205959ce6aad127d3fca8019789d2d4c138a04a17ca64cba6f2') - -eval "$( - declare -f prepare | \ - sed ' - s/.*0003-PR22836/#\0/ - /0004-PR22868/a patch -p1 -i ${srcdir}/binutils-2.30-glibc-segfault.patch - ' -)" - # "configure: error: debuginfod is missing or unusable" eval "$( declare -f build | \ @@ -48,7 +28,7 @@ eval "$( eval "$( declare -f build | \ sed ' - s/--enable-targets=x86_64-pep//g + s/--enable-targets=x86_64-pep,bpf-unknown-none/--enable-targets=bpf-unknown-none/g ' )" @@ -75,3 +55,46 @@ else ' )" fi + +# i486-specific: disable PGO/LTO build, uses too much resources, +# also disabling LTO for now, also disabling the gold linker +# as it runs out of disk space (whatever that means) +# also use the normal version of libiberty.a, there is no PIC +# version on i486 for now +if [ "${CARCH}" = "i486" ]; then + eval "$( + declare -f build | \ + sed ' + s/--enable-pgo-build=.*/--disable-pgo-build/ + s/--enable-lto/--disable-lto/ + s/--enable-gold/--disable-gold/ + ' + declare -f package | \ + sed ' + /pic\/libiberty.a/d + ' + )" +fi + +# 2.38, FAIL: Build ifunc-1a with PIE -z ibtplt +eval "$( + declare -f check | \ + sed ' + s/ check/ check || true/ + ' +)" + +# we get a clash with files from gdb, delete them (they should not be there?) +eval "$( + declare -f package | \ + sed ' + /make.*install.*/ a \ + rm -rf "$pkgdir"/usr/bin/{gcore,gdb,gdb-add-index,gdbserver} \ + rm -rf "$pkgdir"/usr/include/gdb \ + rm -rf "$pkgdir"/usr/lib/libinproctrace.so \ + rm -rf "$pkgdir"/usr/share/gdb/{guile,syscalls,system-gdbinit} \ + rm -rf "$pkgdir"/usr/share/info/{annotate,gdb,stabs}.info* \ + rm -rf "$pkgdir"/usr/share/man/man1/{gcore,gdb-add-index,gdb,gdbserver}.1* \ + rm -rf "$pkgdir"/usr/share/man/man5/gdbinit.5* + ' +)" |