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 AD8EB138359 for ; Sat, 21 Nov 2020 13:02:49 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C25D9E079E; Sat, 21 Nov 2020 13:02:48 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (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 AAA25E079E for ; Sat, 21 Nov 2020 13:02:48 +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 9680F340E23 for ; Sat, 21 Nov 2020 13:02:46 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id D79F3456 for ; Sat, 21 Nov 2020 13:02:44 +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: <1605963703.8559e1c3e77e54115746b61ad58d8a492ce8b024.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: 8559e1c3e77e54115746b61ad58d8a492ce8b024 X-VCS-Branch: master Date: Sat, 21 Nov 2020 13:02:44 +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: dbaa51c7-abd2-4600-a8e8-dd38d44e8f76 X-Archives-Hash: 74fe1ccd9193a4a3371bdb8f0ac9d724 commit: 8559e1c3e77e54115746b61ad58d8a492ce8b024 Author: Fabian Groffen gentoo org> AuthorDate: Sat Nov 21 13:01:43 2020 +0000 Commit: Fabian Groffen gentoo org> CommitDate: Sat Nov 21 13:01:43 2020 +0000 URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=8559e1c3 scripts/bootstrap-prefix: add some code for GCC bootstrap on macOS In addition, bump snapshot for package fixes. Signed-off-by: Fabian Groffen gentoo.org> scripts/bootstrap-prefix.sh | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/scripts/bootstrap-prefix.sh b/scripts/bootstrap-prefix.sh index ea559afe5c..34b6c25a82 100755 --- a/scripts/bootstrap-prefix.sh +++ b/scripts/bootstrap-prefix.sh @@ -183,8 +183,9 @@ configure_toolchain() { app-crypt/rhash dev-util/cmake dev-util/ninja" - case ${CHOST} in - powerpc-*darwin*) + + case ${CHOST}:${DARWIN_USE_GCC} in + powerpc-*darwin*|*:yes|*:1|*:true) compiler_stage1="sys-apps/darwin-miscutils sys-libs/csu" local ccvers="$( (unset CHOST; gcc --version 2>/dev/null) )" local mycc= @@ -207,6 +208,13 @@ configure_toolchain() { linker=sys-devel/binutils-apple mycc=gcc ;; + *"Apple clang version "*) + # gcc cannot build (recent) binutils-apple due to + # missing blocks support, so use Xcode provided + # linker/assembler + linker=sys-devel/native-cctools + mycc=gcc + ;; *) eerror "unknown compiler" return 1 @@ -414,7 +422,7 @@ bootstrap_setup() { rev=${CHOST##*darwin} profile="prefix/darwin/macos/10.$((rev - 4))/x86" ;; - x86_64-apple-darwin19) + x86_64-apple-darwin19|x86_64-apple-darwin2[0123456789]) # handle newer releases on the last profile we have headers # and stuff for (https://opensource.apple.com/) profile="prefix/darwin/macos/10.14/x64" @@ -505,6 +513,16 @@ bootstrap_setup() { einfo "Your profile is set to ${fullprofile}." fi + case ${DARWIN_USE_GCC} in + yes|1|true) + # setup MacOSX.sdk symlink for GCC, this should probably be + # managed using an eselect module in the future + ( cd ${ROOT} && ln -s $(xcrun --show-sdk-path --sdk macosx) ) + einfo "using system sources from $(\ + xcrun --show-sdk-version --sdk macosx)" + ;; + esac + is-rap && cat >> "${ROOT}"/etc/portage/make.profile/make.defaults <<-'EOF' # For baselayout-prefix in stage2 only. ACCEPT_KEYWORDS="~${ARCH}-linux" @@ -576,7 +594,7 @@ do_tree() { bootstrap_tree() { # RAP uses the latest gentoo main repo snapshot to bootstrap. is-rap && LATEST_TREE_YES=1 - local PV="20200607" + local PV="20201120" if [[ -n ${LATEST_TREE_YES} ]]; then do_tree "${SNAPSHOT_URL}" portage-latest.tar.bz2 else