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
Committed, thanks a million

On 04-05-2007 10:30:10 +0200, Michael Haubenwallner wrote:
> Hi, > > I've tried to bootstrap my prefix on a native gentoo linux, and when > upgrading binutils from 2.16.1 to 2.17.* I ended up with broken binutils > wrappers in prefix, if 2.16.1 is installed natively too. > > Attached is a patch to fix this: > The real problem is that "[[ ! -e ${BINPATH}/ld ]]", because BINPATH > does not contain EPREFIX. > Now when same version is installed natively, ${BINPATH}/ld exists > unprefixed, resulting in not switching to newer binutils in prefix. > > The other problem is: "env -i binutils-config ..." will not use > "$EPREFIX/usr/bin/binutils-config", but "/usr/bin/binutils-config", with > all possible kind of followup problems. > > /haubi/ > > -- > Salomon Automation GmbH - Friesachstrasse 15 - A-8114 Friesach bei Graz > Sitz der Gesellschaft: Friesach bei Graz > UID-NR:ATU28654300 - Firmenbuchnummer: 49324 K > Firmenbuchgericht: Landesgericht fur Zivilrechtssachen Graz >
> Index: toolchain-binutils.eclass > =================================================================== > --- toolchain-binutils.eclass (revision 5613) > +++ toolchain-binutils.eclass (working copy) > @@ -364,12 +364,12 @@ > # rerun binutils-config if this is a remerge, as > # we want the mtimes on the symlinks updated (if > # it is the same as the current selected profile) > - if [[ ! -e ${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${BVER} ]] ; then > + if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${BVER} ]] ; then > local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}') > choice=${choice//$'\n'/ } > choice=${choice/* } > if [[ -z ${choice} ]] ; then > - env -i binutils-config -u ${CTARGET} > + env -i "${EPREFIX}"/usr/bin/binutils-config -u ${CTARGET} > else > binutils-config ${choice} > fi
-- Fabian Groffen Gentoo on a different level -- gentoo-alt@g.o mailing list