Gentoo Archives: gentoo-commits

From: "Michael Haubenwallner (haubi)" <haubi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-alt r1601 - trunk/toolchain-prefix-wrapper
Date: Mon, 04 Feb 2008 17:56:32
Message-Id: E1JM5YT-00043H-Rw@stork.gentoo.org
1 Author: haubi
2 Date: 2008-02-04 17:56:28 +0000 (Mon, 04 Feb 2008)
3 New Revision: 1601
4
5 Modified:
6 trunk/toolchain-prefix-wrapper/binutils-config.in
7 Log:
8 set BINPATH into PATH during binutils-config to allow finding new ld,
9 the old one may be unmerged already (native only).
10
11
12 Modified: trunk/toolchain-prefix-wrapper/binutils-config.in
13 ===================================================================
14 --- trunk/toolchain-prefix-wrapper/binutils-config.in 2008-02-03 20:30:47 UTC (rev 1600)
15 +++ trunk/toolchain-prefix-wrapper/binutils-config.in 2008-02-04 17:56:28 UTC (rev 1601)
16 @@ -137,15 +137,20 @@
17 # allow debugging any plugin
18 [[ -z ${LDPLUGINS} ]] || plugins=${LDPLUGINS}
19 else
20 - case ${TARGET} in
21 - *-darwin*) plugins="${plugins} darwin" ;;
22 - *-aix*) plugins="${plugins} aix" ;;
23 - *-hpux*) plugins="${plugins} hpux" ;;
24 - *-linux* | *-solaris*) plugins="${plugins} gnu" ;;
25 - *) eerror "unknown platform ${CTARGET}"
26 - exit 1
27 - ;;
28 - esac
29 + local ldversion=$("${EROOT}${BINPATH}/${x}" --version 2>/dev/null)
30 + if [[ $? -eq 0 && ${ldversion} == *GNU* ]]; then
31 + plugins="${plugins} gnu"
32 + else
33 + case ${TARGET} in
34 + *-darwin*) plugins="${plugins} darwin" ;;
35 + *-aix*) plugins="${plugins} aix" ;;
36 + *-hpux*) plugins="${plugins} hpux" ;;
37 + *-linux* | *-solaris*) plugins="${plugins} gnu" ;;
38 + *) eerror "unknown platform ${CTARGET}"
39 + exit 1
40 + ;;
41 + esac
42 + fi
43 fi
44 for plugin in ${plugins}; do
45 echo "#include <${plugin}plugin.h>"
46 @@ -175,6 +180,11 @@
47 return 1
48 fi
49 rm -f "${EROOT}${BINPATH_LINKS}/${x}.new" > /dev/null || return 1
50 + if [[ -z ${ROOT%/} && ${TARGET} == ${HOST} ]]; then
51 + # allow current ld-wrapper find the new ld,
52 + # since the old one may be unmerged already.
53 + export PATH="${EPREFIX}/${BINPATH}:${PATH}"
54 + fi
55 "${cc}" -o "${EROOT}${BINPATH_LINKS}/${x}.new" "${ctargetfile}" \
56 "-I${wrapper}" "${wrapper}/libbinutils-config.a" ${CFLAGS} || return 1
57 [[ ${DEBUG} == yes ]] || rm -f "${ctargetfile}" || return 1
58
59 --
60 gentoo-commits@l.g.o mailing list