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 7CF7115815E for ; Fri, 2 Feb 2024 12:29:11 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B0774E2A20; Fri, 2 Feb 2024 12:29:10 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (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 942C1E2A20 for ; Fri, 2 Feb 2024 12:29:10 +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 C8DEC3431DC for ; Fri, 2 Feb 2024 12:29:09 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id E1FF8358 for ; Fri, 2 Feb 2024 12:29:07 +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: <1706876883.f672ae1a6838b926591e3df63821ab1dd58006ae.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: f672ae1a6838b926591e3df63821ab1dd58006ae X-VCS-Branch: master Date: Fri, 2 Feb 2024 12:29:07 +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: f74f31f1-fcee-469a-995d-2098ee98d470 X-Archives-Hash: 9470b0ae76f81b862b2e9ba46d989ae5 commit: f672ae1a6838b926591e3df63821ab1dd58006ae Author: Fabian Groffen gentoo org> AuthorDate: Fri Feb 2 12:28:03 2024 +0000 Commit: Fabian Groffen gentoo org> CommitDate: Fri Feb 2 12:28:03 2024 +0000 URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=f672ae1a scripts/bootstrap-prefix: simplify/cleanup configure_toolchain for Darwin Remove outdated logic, go with current systems and requirements. Signed-off-by: Fabian Groffen gentoo.org> scripts/bootstrap-prefix.sh | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/scripts/bootstrap-prefix.sh b/scripts/bootstrap-prefix.sh index 5cb6d9f265..2a0274f9f3 100755 --- a/scripts/bootstrap-prefix.sh +++ b/scripts/bootstrap-prefix.sh @@ -176,38 +176,36 @@ configure_toolchain() { *darwin*:1) einfo "Triggering Darwin with GCC toolchain" compiler_stage1+=" sys-apps/darwin-miscutils" + compiler_stage1+=" sys-devel/gcc" + # recent binutils-apple are hard to build (C++11 features, + # and cmake build system) so avoid going there, the system + # ld on machines with compiler that supports C11 is good + # enough to bring us to stage3, after which the @system set + # will take care of the rest + linker="sys-devel/native-cctools" + local ccvers="$(unset CHOST; ${CC} --version 2>/dev/null)" - local isgcc= case "${ccvers}" in *"(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 + : # ok! else + # FIXME: should probably stage1 bootstrap GCC-5 + # or something 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 - # features, and cmake build system) so avoid going - # there, the system ld is good enough to bring us to - # stage3, after which the @system set will take care of - # the rest - linker=sys-devel/native-cctools + : # ok! ;; *) eerror "unknown compiler: ${ccvers}" return 1 ;; esac - # current compiler (gcc-12) requires C++11, which is - # available since 4.8, but we don't have versions in the - # tree any more to bootstrap up to this -- so fail - # FIXME: should probably stage1 bootstrap GCC-5 or something - compiler_stage1+=" sys-devel/gcc" ;; *-darwin*) einfo "Triggering Darwin with LLVM/Clang toolchain"