From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 0F768138283 for ; Fri, 27 May 2016 10:54:07 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 2658714235; Fri, 27 May 2016 10:54:03 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id D0FDA224073 for ; Fri, 27 May 2016 10:54:01 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 8EA88340D82 for ; Fri, 27 May 2016 10:53:58 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 1DE511933 for ; Fri, 27 May 2016 10:53:53 +0000 (UTC) From: "Benda XU" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Benda XU" Message-ID: <1464346106.4513898cf015ccb78abba9eb6ec451e754c14ad0.heroxbd@gentoo> Subject: [gentoo-commits] repo/proj/prefix:script-rap commit in: scripts/ X-VCS-Repository: repo/proj/prefix X-VCS-Files: scripts/bootstrap-prefix.sh X-VCS-Directories: scripts/ X-VCS-Committer: heroxbd X-VCS-Committer-Name: Benda XU X-VCS-Revision: 4513898cf015ccb78abba9eb6ec451e754c14ad0 X-VCS-Branch: script-rap Date: Fri, 27 May 2016 10:53:53 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 4bed10e2-ee3c-4d7a-8ed7-00c4ee4cb275 X-Archives-Hash: b348de2e4f8f835ab4213d58844936cc commit: 4513898cf015ccb78abba9eb6ec451e754c14ad0 Author: Benda Xu gentoo org> AuthorDate: Fri May 27 10:48:26 2016 +0000 Commit: Benda XU gentoo org> CommitDate: Fri May 27 10:48:26 2016 +0000 URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=4513898c scripts/bootstrap-prefix.sh: solve RHEL 6.7 bootstrap issues. - binutils-config and ldconfig should be called explicitly - lto of gcc should be disabled. ld points to the host dynamic loader and gcc points to the RAP one, ld cannot load the gcc lto plugin. scripts/bootstrap-prefix.sh | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/scripts/bootstrap-prefix.sh b/scripts/bootstrap-prefix.sh index 874e627..196dc73 100755 --- a/scripts/bootstrap-prefix.sh +++ b/scripts/bootstrap-prefix.sh @@ -149,8 +149,7 @@ configure_cflags() { configure_toolchain() { linker="sys-devel/binutils" local gcc_deps="dev-libs/gmp dev-libs/mpfr dev-libs/mpc" - local gcc_rap_deps=$(rapx "sys-kernel/linux-headers sys-libs/glibc") - compiler="${gcc_deps} ${gcc_rap_deps} sys-devel/gcc-config sys-devel/gcc" + compiler="${gcc_deps} sys-devel/gcc-config sys-devel/gcc" compiler_stage1="${gcc_deps} sys-devel/gcc-config" case ${CHOST} in *-cygwin*) @@ -1376,10 +1375,14 @@ bootstrap_stage3() { ${linker} ) fi - LDFLAGS="${LDFLAGS} $(rapx -Wl,-rpath=${ROOT}/usr/$(get_libdir))" \ + # binutils has the host dynamic loader(DL), while gcc will have the RAP one. + # A gcc lto plugin (new DL) will fail to work with ld (old DL). + # USE=-cxx disables ld.gold and plugins. + USE="${USE} $(rapx -cxx)" \ emerge_pkgs --nodeps "${pkgs[@]}" || return 1 if is-rap ; then + binutils-config 1 || return 1 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 @@ -1389,8 +1392,9 @@ bootstrap_stage3() { mkdir -p "${ROOT}"/etc/ld.so.conf.d dirname $(gcc -print-libgcc-file-name) > "${ROOT}"/etc/ld.so.conf.d/stage2.conf fi + emerge_pkgs --nodeps sys-kernel/linux-headers sys-libs/glibc \ + && "${ROOT}"/usr/sbin/ldconfig || return 1 fi - # 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 # linker, we can't since we want the compiler to pick it up. @@ -1404,9 +1408,10 @@ bootstrap_stage3() { ( cd "${ROOT}"/usr/bin && test ! -e python && ln -s "${ROOT}"/tmp/usr/bin/python2.7 ) # in addition, avoid collisions rm -Rf "${ROOT}"/tmp/usr/lib/python2.7/site-packages/clang + 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" \ - LDFLAGS="${LDFLAGS} $(rapx -Wl,--dynamic-linker=$(echo ${ROOT}/$(get_libdir)/ld*.so.[0-9]))" \ + EXTRA_ECONF="--disable-compiler-version-checks $(rapx --disable-lto)" \ + LDFLAGS="${LDFLAGS} $(rapx -Wl,--dynamic-linker=${RAP_DLINKER})" \ 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 )