Gentoo Archives: gentoo-commits

From: Mike Frysinger <vapier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-config/files/, sys-devel/binutils-config/
Date: Mon, 23 Nov 2015 10:23:13
Message-Id: 1448274118.7fbeab2ed7339b602b134a2bba4016e977266a54.vapier@gentoo
1 commit: 7fbeab2ed7339b602b134a2bba4016e977266a54
2 Author: Mike Frysinger <vapier <AT> gentoo <DOT> org>
3 AuthorDate: Mon Nov 23 10:19:00 2015 +0000
4 Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org>
5 CommitDate: Mon Nov 23 10:21:58 2015 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7fbeab2e
7
8 sys-devel/binutils-config: detect broken cross-compiler rpaths #562460
9
10 We've fixed newer cross-binutils builds to use the correct rpaths to find
11 their internal libs, but existing builds remain broken. Add some logic to
12 detect & warn users, but also create the old symlinks so they keep working.
13
14 ...inutils-config-5-r1.ebuild => binutils-config-5-r2.ebuild} | 0
15 sys-devel/binutils-config/files/binutils-config-5 | 11 ++++++++++-
16 2 files changed, 10 insertions(+), 1 deletion(-)
17
18 diff --git a/sys-devel/binutils-config/binutils-config-5-r1.ebuild b/sys-devel/binutils-config/binutils-config-5-r2.ebuild
19 similarity index 100%
20 rename from sys-devel/binutils-config/binutils-config-5-r1.ebuild
21 rename to sys-devel/binutils-config/binutils-config-5-r2.ebuild
22
23 diff --git a/sys-devel/binutils-config/files/binutils-config-5 b/sys-devel/binutils-config/files/binutils-config-5
24 index 86f6abc..2bdd07e 100755
25 --- a/sys-devel/binutils-config/files/binutils-config-5
26 +++ b/sys-devel/binutils-config/files/binutils-config-5
27 @@ -149,7 +149,16 @@ switch_profile() {
28 mkdir -p "${dstlib}"
29 rm -rf "${ROOT}/${BINPATH_LINKS}"/ldscripts
30 atomic_ln "${LIBPATH}/ldscripts" "${dstlib}" "ldscripts"
31 - find -L "${dstlib}" -xtype l -name 'lib*' -exec rm -f {} +
32 + find -L "${dstlib}" -xtype l -name 'lib*' -delete
33 + # Detect older binutils w/broken rpaths. #562460
34 + # We can hardcode the "/lib" part since that's what the binutils
35 + # configure scripts have. They did not include any other path.
36 + if [[ $(scanelf -qF '%r#F' "${ROOT}/${BINPATH}/as") == */lib ]] ; then
37 + ewarn "Old cross-binutils detected; please re-emerge to fix (see bug #562460)."
38 + for x in lib* ; do
39 + atomic_ln "${LIBPATH}/${x}" "${dstlib}" "${x}"
40 + done
41 + fi
42
43 #
44 # Clean out old generated include symlinks