diff options
author | Sam James <sam@gentoo.org> | 2023-02-22 22:22:46 +0000 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2023-02-22 22:26:22 +0000 |
commit | 07d598347c2a311c91eacd4303e0517cf0a127c3 (patch) | |
tree | 57e26014bb2c1974d2da287f69dd1f30fc0095e7 /sys-devel/binutils/binutils-9999.ebuild | |
parent | media-video/gaupol: add 1.12, switch to PEP517 (diff) | |
download | gentoo-07d598347c2a311c91eacd4303e0517cf0a127c3.tar.gz gentoo-07d598347c2a311c91eacd4303e0517cf0a127c3.tar.bz2 gentoo-07d598347c2a311c91eacd4303e0517cf0a127c3.zip |
sys-devel/binutils: apply linker search path fixes from Chewi for prefix
Quoting Chewi on the PR for posterity:
"""
The first of these changes fixes two related issues with prefixed and crossdev environments.
The prefix issue is detailed in Gentoo bug #892549. The crossdev issue can be reproduced by trying something like:
USE="-python icu" aarch64-unknown-linux-gnu-emerge libxml2
The second of these changes is not essential, but it does make bfd's behaviour
in this area more consistent with the other linkers, which have not experienced these issues at all.
I'm not sure what upstream will make of these changes, particularly the second one,
but it is interesting that even gold does not behave the same way as bfd here.
Perhaps we can give them some exposure in Gentoo for a while before seeing what they think.
The second change would not be submitted upstream as-is because fully removing the ld.so.conf feature is a much bigger diff.
"""
This patch is, for now, only applied for prefix. It should be safe
on other systems but the issue is more pressing on prefix given a recent
migration.
Bug: https://bugs.gentoo.org/892549
Thanks-to: James Le Cuirot <chewi@gentoo.org>
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sys-devel/binutils/binutils-9999.ebuild')
-rw-r--r-- | sys-devel/binutils/binutils-9999.ebuild | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/sys-devel/binutils/binutils-9999.ebuild b/sys-devel/binutils/binutils-9999.ebuild index c8e0d5f94944..d8c2553ece20 100644 --- a/sys-devel/binutils/binutils-9999.ebuild +++ b/sys-devel/binutils/binutils-9999.ebuild @@ -19,7 +19,7 @@ IUSE="cet doc gold gprofng multitarget +nls pgo +plugins static-libs test vanill # PATCH_DEV - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/... # for the patchsets -PATCH_VER=0 +PATCH_VER=2 PATCH_DEV=dilfridge if [[ ${PV} == 9999* ]]; then @@ -28,11 +28,11 @@ if [[ ${PV} == 9999* ]]; then else PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}} PATCH_DEV=${PATCH_DEV:-dilfridge} - SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PV}.tar.xz" + SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz https://sourceware.org/pub/binutils/releases/binutils-${PV}.tar.xz https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PV}.tar.xz" [[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI} https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz" SLOT=$(ver_cut 1-2) - #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" fi # @@ -112,6 +112,10 @@ src_prepare() { einfo "Applying binutils patchset ${patchsetname}" eapply "${WORKDIR}/patch" einfo "Done." + + # This is applied conditionally for now just out of caution. + # It should be okay on non-prefix systems though. See bug #892549. + use prefix && eapply "${FILESDIR}"/binutils-2.40-linker-search-path.patch fi fi @@ -181,8 +185,6 @@ src_configure() { append-ldflags -Wl,--undefined-version fi - use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152 - local x echo for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do |