commit: c6c9d0a9d44b8d17e843306c2ebb2c775b2e7840
Author: Benda Xu <heroxbd <AT> gentoo <DOT> org>
AuthorDate: Fri May 24 06:42:14 2019 +0000
Commit: Benda XU <heroxbd <AT> gentoo <DOT> org>
CommitDate: Sat May 25 06:15:35 2019 +0000
URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=c6c9d0a9
scripts/bootstrap-prefix.sh: consistant stage2 compiler and linker.
The host linker might not work well with stage2 compiler.
Signed-off-by: Benda Xu <heroxbd <AT> gentoo.org>
scripts/bootstrap-prefix.sh | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/scripts/bootstrap-prefix.sh b/scripts/bootstrap-prefix.sh
index b213cb7a3b..b3ab8cb4bb 100755
--- a/scripts/bootstrap-prefix.sh
+++ b/scripts/bootstrap-prefix.sh
@@ -1818,10 +1818,6 @@ bootstrap_stage3() {
export LDFLAGS="-L${ROOT}/usr/$(get_libdir)
-Wl,--dynamic-linker=${RAP_DLINKER}"
BOOTSTRAP_RAP=yes \
with_stack_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
pkgs=(
sys-apps/gentoo-functions
@@ -1838,6 +1834,9 @@ bootstrap_stage3() {
with_stack_emerge_pkgs --nodeps "${pkgs[@]}" || return 1
fi
+ # remove stage2 ld so that stage3 ld is used by stage2 gcc.
+ is-rap && [[ -f ${ROOT}/tmp/usr/${CHOST}/bin/ld ]] && \
+ mv ${ROOT}/tmp/usr/${CHOST}/bin/ld{,.stage2}
# On some hosts, gcc gets confused now when it uses the new linker,
# see for instance bug #575480. While we would like to hide that