Gentoo Archives: gentoo-alt

From: Fabian Groffen <grobian@g.o>
To: gentoo-alt@l.g.o
Subject: Re: [gentoo-alt] [prefix][linux] toolchain-binutils.eclass breaks prefix ongentoo-linux
Date: Fri, 04 May 2007 08:41:41
Message-Id: 20070504084128.GI9892@gentoo.org
In Reply to: [gentoo-alt] [prefix][linux] toolchain-binutils.eclass breaks prefix ongentoo-linux by Michael Haubenwallner
1 Committed, thanks a million
2
3 On 04-05-2007 10:30:10 +0200, Michael Haubenwallner wrote:
4 > Hi,
5 >
6 > I've tried to bootstrap my prefix on a native gentoo linux, and when
7 > upgrading binutils from 2.16.1 to 2.17.* I ended up with broken binutils
8 > wrappers in prefix, if 2.16.1 is installed natively too.
9 >
10 > Attached is a patch to fix this:
11 > The real problem is that "[[ ! -e ${BINPATH}/ld ]]", because BINPATH
12 > does not contain EPREFIX.
13 > Now when same version is installed natively, ${BINPATH}/ld exists
14 > unprefixed, resulting in not switching to newer binutils in prefix.
15 >
16 > The other problem is: "env -i binutils-config ..." will not use
17 > "$EPREFIX/usr/bin/binutils-config", but "/usr/bin/binutils-config", with
18 > all possible kind of followup problems.
19 >
20 > /haubi/
21 >
22 > --
23 > Salomon Automation GmbH - Friesachstrasse 15 - A-8114 Friesach bei Graz
24 > Sitz der Gesellschaft: Friesach bei Graz
25 > UID-NR:ATU28654300 - Firmenbuchnummer: 49324 K
26 > Firmenbuchgericht: Landesgericht fur Zivilrechtssachen Graz
27 >
28
29 > Index: toolchain-binutils.eclass
30 > ===================================================================
31 > --- toolchain-binutils.eclass (revision 5613)
32 > +++ toolchain-binutils.eclass (working copy)
33 > @@ -364,12 +364,12 @@
34 > # rerun binutils-config if this is a remerge, as
35 > # we want the mtimes on the symlinks updated (if
36 > # it is the same as the current selected profile)
37 > - if [[ ! -e ${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${BVER} ]] ; then
38 > + if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${BVER} ]] ; then
39 > local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
40 > choice=${choice//$'\n'/ }
41 > choice=${choice/* }
42 > if [[ -z ${choice} ]] ; then
43 > - env -i binutils-config -u ${CTARGET}
44 > + env -i "${EPREFIX}"/usr/bin/binutils-config -u ${CTARGET}
45 > else
46 > binutils-config ${choice}
47 > fi
48
49
50 --
51 Fabian Groffen
52 Gentoo on a different level
53 --
54 gentoo-alt@g.o mailing list