diff options
author | Benda Xu <heroxbd@gentoo.org> | 2018-01-25 21:08:17 +0900 |
---|---|---|
committer | Benda Xu <heroxbd@gentoo.org> | 2018-01-25 21:08:17 +0900 |
commit | 08047a53f5d51d7a370ec0d5d047253cad60dc2a (patch) | |
tree | 5f7916b67e4109dcf864831b641941b04e927223 | |
parent | dev-lang/python: can use elibc_glibc, not amd64-linux (diff) | |
download | prefix-08047a53.tar.gz prefix-08047a53.tar.bz2 prefix-08047a53.zip |
bootstrap-prefix.sh: expose stage3 dynamic linker early on.
The stage3 ld should use stage3 dynamic linker, to prevent from
symbol clashes between host dynamic linker and stage3 shared
libraries, like the errors below.
4 /home/xxx/gentoo/usr/bin/ld: /lib64/libc.so.6: version
`GLIBC_2.14' not found (required by /home/xxx/gentoo/usr/bin/ld
5 /home/xxx/gentoo/usr/bin/ld: /lib64/libc.so.6: version
`GLIBC_2.14' not found (required by /home/xxx/gentoo/usr/lib64/binutils/x86_64-pc-linux-gnu/2.29.1/libbfd-2.29.1.so)
6 /home/xxx/gentoo/usr/bin/ld: /lib64/libc.so.6: version
`GLIBC_2.14' not found (required by /home/xxx/gentoo/usr/lib64/libz.so.1)
-rwxr-xr-x | scripts/bootstrap-prefix.sh | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/scripts/bootstrap-prefix.sh b/scripts/bootstrap-prefix.sh index 5f2e0d473f..6e63af8575 100755 --- a/scripts/bootstrap-prefix.sh +++ b/scripts/bootstrap-prefix.sh @@ -1627,14 +1627,22 @@ bootstrap_stage3() { app-portage/elt-patches sys-kernel/linux-headers sys-libs/glibc - sys-devel/binutils-config - sys-libs/zlib - ${linker} ) BOOTSTRAP_RAP=yes \ emerge_pkgs --nodeps "${pkgs[@]}" || return 1 grep -q 'apiversion=9999' "${ROOT}"/usr/bin/perl && rm "${ROOT}"/usr/bin/perl + + pkgs=( + sys-devel/binutils-config + sys-libs/zlib + ${linker} + ) + # use the new dynamic linker in place of rpath from now on. + RAP_DLINKER=$(echo "${ROOT}"/$(get_libdir)/ld*.so.[0-9]) + export LDFLAGS="-L${ROOT}/usr/$(get_libdir) -Wl,--dynamic-linker=${RAP_DLINKER}" + emerge_pkgs --nodeps "${pkgs[@]}" || return 1 + # remove stage2 ld so that stage3 ld is used by stage2 gcc. [[ -f ${ROOT}/tmp/usr/${CHOST}/bin/ld ]] && mv ${ROOT}/tmp/usr/${CHOST}/bin/ld{,.stage2} else @@ -1681,11 +1689,9 @@ bootstrap_stage3() { && ln -s ../../../libc++.1.dylib libstdc++.6.0.9.dylib ) fi - RAP_DLINKER=$(echo "${ROOT}"/$(get_libdir)/ld*.so.[0-9]) # try to get ourself out of the mudd, bug #575324 EXTRA_ECONF="--disable-compiler-version-checks $(rapx --disable-lto)" \ MYCMAKEARGS="-DCMAKE_USE_SYSTEM_LIBRARY_LIBUV=OFF" \ - LDFLAGS="${LDFLAGS} $(rapx -Wl,--dynamic-linker=${RAP_DLINKER})" \ PYTHON_COMPAT_OVERRIDE=python2.7 \ emerge_pkgs --nodeps ${compiler} || return 1 # undo libgcc_s.so path of stage2 |