From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 488281382C5 for ; Wed, 6 Jan 2021 08:30:21 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 9923DE085E; Wed, 6 Jan 2021 08:30:20 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 6F4B2E085E for ; Wed, 6 Jan 2021 08:30:20 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 88350340CCB for ; Wed, 6 Jan 2021 08:30:18 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id E869F32B for ; Wed, 6 Jan 2021 08:30:16 +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: <1609921811.f0d352a9364580670e00793ff2683d578f66f72d.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: f0d352a9364580670e00793ff2683d578f66f72d X-VCS-Branch: master Date: Wed, 6 Jan 2021 08:30:16 +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-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 04893c4d-f821-4020-a9d0-89cc5dda6a20 X-Archives-Hash: 9812babec764ebead8d52e4044bfd638 commit: f0d352a9364580670e00793ff2683d578f66f72d Author: Fabian Groffen gentoo org> AuthorDate: Wed Jan 6 08:27:03 2021 +0000 Commit: Fabian Groffen gentoo org> CommitDate: Wed Jan 6 08:30:11 2021 +0000 URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=f0d352a9 scripts/bootstrap-prefix: unify DARWIN_USE_GCC path - turn ppc-macos into DARWIN_USE_GCC - drop sys-libs/csu from stage1/2 packages, it's not necessary Signed-off-by: Fabian Groffen gentoo.org> scripts/bootstrap-prefix.sh | 56 +++++++++++++++++++-------------------------- 1 file changed, 24 insertions(+), 32 deletions(-) diff --git a/scripts/bootstrap-prefix.sh b/scripts/bootstrap-prefix.sh index 265ca4693c..40a38c6147 100755 --- a/scripts/bootstrap-prefix.sh +++ b/scripts/bootstrap-prefix.sh @@ -186,34 +186,27 @@ configure_toolchain() { CXX=g++ case ${CHOST}:${DARWIN_USE_GCC} in - powerpc-*darwin*|*:1) + *darwin*:1) einfo "Triggering Darwin with GCC toolchain" - compiler_stage1+=" sys-apps/darwin-miscutils sys-libs/csu" - local ccvers="$( (unset CHOST; gcc --version 2>/dev/null) )" + compiler_stage1+=" sys-apps/darwin-miscutils" + local ccvers="$(unset CHOST; /usr/bin/gcc --version 2>/dev/null)" case "${ccvers}" in - *"(Gentoo "*) - # probably the result of a bootstrap in progress - [[ ${DARWIN_USE_GCC} == 1 ]] \ - && linker=sys-devel/native-cctools \ - || linker=sys-devel/binutils-apple - ;; *"(GCC) 4.2.1 "*) - linker=sys-devel/binutils-apple + linker="=sys-devel/binutils-apple-3.2.6" ;; *"(GCC) 4.0.1 "*) linker="=sys-devel/binutils-apple-3.2.6" # upgrade to 4.2.1 first compiler_stage1+=" sys-devel/gcc-apple - sys-devel/binutils-apple" + =sys-devel/binutils-apple-3.2.6" ;; *"Apple clang version "*|*"Apple LLVM version "*) - # gcc cannot build (recent) binutils-apple due to - # missing blocks support, so use Xcode provided - # linker/assembler - # UPDATE: binutils-8.2.1-r100 compiles, but the - # assembler isn't able to deal with AVX instructions - # (yet) + # recent binutils-apple are hard to build (C++11 + # features, and cmake buildsystem) so avoid going + # there, the system ld is good enough to bring us to + # stage3, after which system set will take care of + # the rest linker=sys-devel/native-cctools ;; *) @@ -227,9 +220,9 @@ configure_toolchain() { einfo "Triggering Darwin with LLVM/Clang toolchain" # for compilers choice, see bug: # https://bugs.gentoo.org/show_bug.cgi?id=538366 - compiler_stage1="sys-apps/darwin-miscutils sys-libs/csu" + compiler_stage1="sys-apps/darwin-miscutils" compiler_type="clang" - local ccvers="$( (unset CHOST; gcc --version 2>/dev/null) )" + local ccvers="$(unset CHOST; /usr/bin/gcc --version 2>/dev/null)" local llvm_deps="dev-util/ninja" case "${ccvers}" in *"Apple clang version "*|*"Apple LLVM version "*) @@ -256,7 +249,6 @@ configure_toolchain() { esac compiler=" - sys-libs/csu dev-libs/libffi ${llvm_deps} sys-libs/libcxxabi @@ -270,7 +262,7 @@ configure_toolchain() { # TODO: target clang toolchain someday? ;; *-solaris*) - local ccvers="$( (unset CHOST; gcc --version 2>/dev/null) )" + local ccvers="$(unset CHOST; gcc --version 2>/dev/null)" case "${ccvers}" in *"gcc (GCC) 3.4.3"*) # host compiler doesn't cope with the asm introduced @@ -531,7 +523,7 @@ do_tree() { bootstrap_tree() { # RAP uses the latest gentoo main repo snapshot to bootstrap. is-rap && LATEST_TREE_YES=1 - local PV="20210104" + local PV="20210105" if [[ -n ${LATEST_TREE_YES} ]]; then do_tree "${SNAPSHOT_URL}" portage-latest.tar.bz2 else @@ -1512,14 +1504,11 @@ bootstrap_stage1() { # too vital to rely on a host-provided one [[ -x ${ROOT}/tmp/usr/bin/python ]] || (bootstrap_python) || return 1 - if [[ ! -e ${ROOT}/tmp/usr/bin/cmake ]] && [[ ${CHOST} == *-darwin* ]] - then - # TODO: make DARWIN_USE_GCC path also activated on ppc-macos, - # since it effectively is so - if [[ ${DARWIN_USE_GCC} != 1 || ${CHOST} == powerpc* ]] ; then - (bootstrap_cmake) || return 1 - fi - fi + # cmake for llvm/clang toolchain on macOS + [[ -e ${ROOT}/tmp/usr/bin/cmake ]] \ + || [[ ${CHOST} != *-darwin* ]] \ + || [[ ${DARWIN_USE_GCC} == 1 ]] \ + || (bootstrap_cmake) || return 1 # checks itself if things need to be done still (bootstrap_tree) || return 1 @@ -3073,8 +3062,11 @@ esac # handle GCC install path on recent Darwin case ${CHOST} in - powerpc-*darwin*|arm64-*darwin*) - unset DARWIN_USE_GCC # there is no choice here, don't trigger GCC path + powerpc-*darwin*) + DARWIN_USE_GCC=1 # must use GCC, Clang is impossible + ;; + arm64-*darwin*) + DARWIN_USE_GCC=0 # cannot use GCC yet (needs silicon support) ;; *-darwin*) # normalise value of DARWIN_USE_GCC