Gentoo Archives: gentoo-commits

From: Benda XU <heroxbd@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/proj/prefix:script-rap commit in: scripts/
Date: Fri, 27 May 2016 10:54:05
Message-Id: 1464335620.477ae701b57e19a102552ae63c8f686d3e167016.heroxbd@gentoo
1 commit: 477ae701b57e19a102552ae63c8f686d3e167016
2 Author: Benda Xu <heroxbd <AT> gentoo <DOT> org>
3 AuthorDate: Fri May 27 07:53:40 2016 +0000
4 Commit: Benda XU <heroxbd <AT> gentoo <DOT> org>
5 CommitDate: Fri May 27 07:53:40 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=477ae701
7
8 scripts/bootstrap-prefix.sh: paths of stage 3 toolchain.
9
10 scripts/bootstrap-prefix.sh | 16 +++++++++++++---
11 1 file changed, 13 insertions(+), 3 deletions(-)
12
13 diff --git a/scripts/bootstrap-prefix.sh b/scripts/bootstrap-prefix.sh
14 index 07bd986..874e627 100755
15 --- a/scripts/bootstrap-prefix.sh
16 +++ b/scripts/bootstrap-prefix.sh
17 @@ -1376,11 +1376,19 @@ bootstrap_stage3() {
18 ${linker}
19 )
20 fi
21 + LDFLAGS="${LDFLAGS} $(rapx -Wl,-rpath=${ROOT}/usr/$(get_libdir))" \
22 emerge_pkgs --nodeps "${pkgs[@]}" || return 1
23
24 - if is-rap && [[ ! -x "${ROOT}"/usr/bin/perl ]]; then
25 - echo "We need perl at ${ROOT}/usr/bin/perl to merge glibc." > "${ROOT}"/usr/bin/perl
26 - chmod +x "${ROOT}"/usr/bin/perl
27 + if is-rap ; then
28 + if [[ ! -x "${ROOT}"/usr/bin/perl ]]; then
29 + echo "We need ${ROOT}/usr/bin/perl to merge glibc." > "${ROOT}"/usr/bin/perl
30 + chmod +x "${ROOT}"/usr/bin/perl
31 + fi
32 + # Tell dynamic loader the path of libgcc_s.so of stage2
33 + if [[ ! -f "${ROOT}"/etc/ld.so.conf.d/stage2.conf ]]; then
34 + mkdir -p "${ROOT}"/etc/ld.so.conf.d
35 + dirname $(gcc -print-libgcc-file-name) > "${ROOT}"/etc/ld.so.conf.d/stage2.conf
36 + fi
37 fi
38
39 # On some hosts, gcc gets confused now when it uses the new linker,
40 @@ -1398,7 +1406,9 @@ bootstrap_stage3() {
41 rm -Rf "${ROOT}"/tmp/usr/lib/python2.7/site-packages/clang
42 # try to get ourself out of the mudd, bug #575324
43 EXTRA_ECONF="--disable-compiler-version-checks" \
44 + LDFLAGS="${LDFLAGS} $(rapx -Wl,--dynamic-linker=$(echo ${ROOT}/$(get_libdir)/ld*.so.[0-9]))" \
45 emerge_pkgs --nodeps ${compiler} || return 1
46 + is-rap && rm -f "${ROOT}"/etc/ld.so.conf.d/stage2.conf
47 ( cd "${ROOT}"/usr/bin && test ! -e python && rm -f python2.7 )
48
49 # Use $ROOT tools where possible from now on.