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 38C6A1381F3 for ; Fri, 22 Apr 2016 13:24:15 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 37AE4E07B2; Fri, 22 Apr 2016 13:24:13 +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 D234CE07B2 for ; Fri, 22 Apr 2016 13:24:12 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (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 4E168340C01 for ; Fri, 22 Apr 2016 13:24:11 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 17CD2CB for ; Fri, 22 Apr 2016 13:24:08 +0000 (UTC) From: "Fabian Groffen" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Fabian Groffen" Message-ID: <1461331347.9bdc54a37c52d55ebe0b704a9fbbca6b318bfaba.grobian@gentoo> Subject: [gentoo-commits] repo/proj/prefix:master commit in: scripts/ X-VCS-Repository: repo/proj/prefix X-VCS-Files: scripts/bootstrap-prefix.sh X-VCS-Directories: scripts/ X-VCS-Committer: grobian X-VCS-Committer-Name: Fabian Groffen X-VCS-Revision: 9bdc54a37c52d55ebe0b704a9fbbca6b318bfaba X-VCS-Branch: master Date: Fri, 22 Apr 2016 13:24:08 +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: 3307f9f0-04ad-43a7-b980-a8eec6d5cc83 X-Archives-Hash: bf6a13a73dfffda36c6d3b21d1651c52 commit: 9bdc54a37c52d55ebe0b704a9fbbca6b318bfaba Author: Fabian Groffen gentoo org> AuthorDate: Fri Apr 22 13:22:27 2016 +0000 Commit: Fabian Groffen gentoo org> CommitDate: Fri Apr 22 13:22:27 2016 +0000 URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=9bdc54a3 scripts/bootstrap-prefix: workaround bug #575480 gcc gets confused due to swapping the linker (or us building it wrongly/without USE=cxx) and doesn't emit -lgcc_s when it uses libstdc++. Therefore, inject it for the moment, until we built a new gcc. scripts/bootstrap-prefix.sh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/scripts/bootstrap-prefix.sh b/scripts/bootstrap-prefix.sh index e2f5844..93f29a0 100755 --- a/scripts/bootstrap-prefix.sh +++ b/scripts/bootstrap-prefix.sh @@ -144,7 +144,7 @@ configure_cflags() { } configure_toolchain() { - linker=sys-devel/binutils + linker="sys-devel/binutils" local gcc_deps="dev-libs/gmp dev-libs/mpfr dev-libs/mpc" compiler="${gcc_deps} sys-devel/gcc-config sys-devel/gcc" compiler_stage1="${gcc_deps} sys-devel/gcc-config" @@ -1182,6 +1182,7 @@ bootstrap_stage2() { sys-devel/binutils-config $([[ ${CHOST} == *-aix* ]] && echo sys-apps/diffutils ) # gcc can't deal with aix diffutils, gcc PR14251 ) + # Most binary Linux distributions seem to fancy toolchains that # do not do c++ support (need to install a separate package). USE="${USE} -cxx" \ @@ -1228,7 +1229,6 @@ bootstrap_stage2() { # make sure the EPREFIX gcc shared libraries are there mkdir -p "${ROOT}"/usr/${CHOST}/lib/gcc cp "${ROOT}"/tmp/usr/${CHOST}/lib/gcc/* "${ROOT}"/usr/${CHOST}/lib/gcc - fi einfo "stage2 successfully finished" @@ -1291,6 +1291,13 @@ bootstrap_stage3() { ) emerge_pkgs --nodeps "${pkgs[@]}" || return 1 + # 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. + # Therefore, inject some kludgy workaround, for deps like gmp that + # use c++ + [[ ${CHOST} != *-darwin* ]] && export CXX="${CHOST}-g++ -lgcc_s" + # Clang unconditionally requires python, the eclasses are really not # setup for a scenario where python doesn't live in the target # prefix and no helpers are available @@ -1307,6 +1314,7 @@ bootstrap_stage3() { ln -s bash "${ROOT}"/bin/sh unset CONFIG_SHELL unset MAKEINFO + unset CXX export PREROOTPATH="${ROOT}/usr/bin:${ROOT}/bin" # Build portage and dependencies.