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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 934C215815E for ; Fri, 2 Feb 2024 12:07:30 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C0B4C2BC017; Fri, 2 Feb 2024 12:07:29 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 9B5B12BC017 for ; Fri, 2 Feb 2024 12:07:29 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 7E1863431E6 for ; Fri, 2 Feb 2024 12:07:28 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 89912358 for ; Fri, 2 Feb 2024 12:07:26 +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: <1706875558.377f6f4e9776170245bbf4fe908032b69c9a9d01.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: 377f6f4e9776170245bbf4fe908032b69c9a9d01 X-VCS-Branch: master Date: Fri, 2 Feb 2024 12:07:26 +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: 1380c79b-661c-4119-871a-9a2765d25684 X-Archives-Hash: 055da254f44be4c3c08b2ee94242b14e commit: 377f6f4e9776170245bbf4fe908032b69c9a9d01 Author: Fabian Groffen gentoo org> AuthorDate: Fri Feb 2 12:05:58 2024 +0000 Commit: Fabian Groffen gentoo org> CommitDate: Fri Feb 2 12:05:58 2024 +0000 URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=377f6f4e scripts/bootstrap-prefix: fix configure_toolchain for Darwin Don't get confused by (just) bootstrapped compilers, in fact, drop the detection of host-compilers, because they are insufficient to bootstrap nowadays. Bug: https://bugs.gentoo.org/923617 Signed-off-by: Fabian Groffen gentoo.org> scripts/bootstrap-prefix.sh | 29 ++++++++++++----------------- 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/scripts/bootstrap-prefix.sh b/scripts/bootstrap-prefix.sh index 5fdf93beeb..4622dc5d3e 100755 --- a/scripts/bootstrap-prefix.sh +++ b/scripts/bootstrap-prefix.sh @@ -166,6 +166,8 @@ configure_toolchain() { # introduced in gcc-4.8, but apparently gcc-5 is still buildable # with Apple's gcc-apple-4.0.1, so that's a good candidate # The Prefix tree only contains gcc-12 as of this writing. + # The bootstrap Python 3.7 we have in use requires C11, so Apple's + # 4.x line is no longer enough for that. CC=gcc CXX=g++ @@ -174,26 +176,19 @@ configure_toolchain() { *darwin*:1) einfo "Triggering Darwin with GCC toolchain" compiler_stage1+=" sys-apps/darwin-miscutils" - # check if we have gcc-4.2 available, else use plain gcc - # Darwin 9 comes with 4.2 but it isn't enabled by default - if [[ -e $(type -P gcc-4.2) ]] ; then - CC=gcc-4.2 - CXX=g++-4.2 - fi local ccvers="$(unset CHOST; ${CC} --version 2>/dev/null)" local isgcc= case "${ccvers}" in - *"(GCC) 4.2.1 "*) - linker="=sys-devel/binutils-apple-3.2.6" - isgcc=true - ;; - *"(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-3.2.6" - isgcc=true + *"(GCC) "[1-9]*|"gcc ("*") "[1-9]*) + local cvers="${ccvers#*)}"; cvers="${cvers%%.*}" + # GCC-5 has C11 see above + if [[ ${ccvers} -ge 5 ]] ; then + linker="=sys-devel/binutils-apple-3.2.6" + isgcc=true + else + eerror "compiler ${ccvers} is too old: ${cvers} < 5" + eerror "you need a C11/C++11 compiler to bootstrap" + fi ;; *"Apple clang version "*|*"Apple LLVM version "*) # recent binutils-apple are hard to build (C++11