commit: 477ae701b57e19a102552ae63c8f686d3e167016
Author: Benda Xu <heroxbd <AT> gentoo <DOT> org>
AuthorDate: Fri May 27 07:53:40 2016 +0000
Commit: Benda XU <heroxbd <AT> gentoo <DOT> org>
CommitDate: Fri May 27 07:53:40 2016 +0000
URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=477ae701
scripts/bootstrap-prefix.sh: paths of stage 3 toolchain.
scripts/bootstrap-prefix.sh | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/scripts/bootstrap-prefix.sh b/scripts/bootstrap-prefix.sh
index 07bd986..874e627 100755
--- a/scripts/bootstrap-prefix.sh
+++ b/scripts/bootstrap-prefix.sh
@@ -1376,11 +1376,19 @@ bootstrap_stage3() {
${linker}
)
fi
+ LDFLAGS="${LDFLAGS} $(rapx -Wl,-rpath=${ROOT}/usr/$(get_libdir))" \
emerge_pkgs --nodeps "${pkgs[@]}" || return 1
- if is-rap && [[ ! -x "${ROOT}"/usr/bin/perl ]]; then
- echo "We need perl at ${ROOT}/usr/bin/perl to merge glibc." >
"${ROOT}"/usr/bin/perl
- chmod +x "${ROOT}"/usr/bin/perl
+ if is-rap ; then
+ if [[ ! -x "${ROOT}"/usr/bin/perl ]]; then
+ echo "We need ${ROOT}/usr/bin/perl to merge glibc." >
"${ROOT}"/usr/bin/perl
+ chmod +x "${ROOT}"/usr/bin/perl
+ fi
+ # Tell dynamic loader the path of libgcc_s.so of stage2
+ if [[ ! -f "${ROOT}"/etc/ld.so.conf.d/stage2.conf ]]; then
+ mkdir -p "${ROOT}"/etc/ld.so.conf.d
+ dirname $(gcc -print-libgcc-file-name) >
"${ROOT}"/etc/ld.so.conf.d/stage2.conf
+ fi
fi
# On some hosts, gcc gets confused now when it uses the new linker,
@@ -1398,7 +1406,9 @@ bootstrap_stage3() {
rm -Rf "${ROOT}"/tmp/usr/lib/python2.7/site-packages/clang
# try to get ourself out of the mudd, bug #575324
EXTRA_ECONF="--disable-compiler-version-checks" \
+ LDFLAGS="${LDFLAGS} $(rapx -Wl,--dynamic-linker=$(echo
${ROOT}/$(get_libdir)/ld*.so.[0-9]))" \
emerge_pkgs --nodeps ${compiler} || return 1
+ is-rap && rm -f "${ROOT}"/etc/ld.so.conf.d/stage2.conf
( cd "${ROOT}"/usr/bin && test ! -e python && rm -f python2.7 )
# Use $ROOT tools where possible from now on.