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 EA25015808B for ; Mon, 30 Sep 2024 09:08:40 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D8DABE29CF; Mon, 30 Sep 2024 09:08:38 +0000 (UTC) Received: from smtp.gentoo.org (smtp.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)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id C2BA4E29CF for ; Mon, 30 Sep 2024 09:08:38 +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 0ABC834318E for ; Mon, 30 Sep 2024 09:08:38 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 66D3627F0 for ; Mon, 30 Sep 2024 09:08:36 +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: <1727680716.a5f19d47a1d7e83f2a2594c7396e639cb7d9c325.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: a5f19d47a1d7e83f2a2594c7396e639cb7d9c325 X-VCS-Branch: master Date: Mon, 30 Sep 2024 09:08:36 +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: ea638e11-85d1-4efa-9709-24e78f85ac6f X-Archives-Hash: d1ee1b42ae62883a2023d21791cde095 commit: a5f19d47a1d7e83f2a2594c7396e639cb7d9c325 Author: Fabian Groffen gentoo org> AuthorDate: Mon Sep 30 07:18:36 2024 +0000 Commit: Fabian Groffen gentoo org> CommitDate: Mon Sep 30 07:18:36 2024 +0000 URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=a5f19d47 scripts/bootstrap-prefix: switch compiler to a properly bootstrapped one We need include-fixed headers and the machinery around it, besides that it is highly discouraged to skip bootstrapping on "foreign" envs as the one we're in at stage2. Rename USE=bootstrap to USE=system-bootstrap Update coreutils bootstrap to 9.5 Signed-off-by: Fabian Groffen gentoo.org> scripts/bootstrap-prefix.sh | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/scripts/bootstrap-prefix.sh b/scripts/bootstrap-prefix.sh index fe1b07bf25..9a21185e04 100755 --- a/scripts/bootstrap-prefix.sh +++ b/scripts/bootstrap-prefix.sh @@ -1337,6 +1337,7 @@ bootstrap_coreutils() { # 8.16 is the last version released as tar.gz # 8.18 is necessary for macOS High Sierra (darwin17) and converted # to tar.gz for this case + bootstrap_gnu coreutils 9.5 || \ bootstrap_gnu coreutils 8.32 || bootstrap_gnu coreutils 8.30 || \ bootstrap_gnu coreutils 8.16 || bootstrap_gnu coreutils 8.17 } @@ -1825,7 +1826,7 @@ do_emerge_pkgs() { "-qtegrity" # portage-utils "-readline" # bash "-sanitize" - "bootstrap" + "system-bootstrap" "clang" "internal-glib" ) @@ -2041,19 +2042,33 @@ bootstrap_stage2() { emerge_pkgs --nodeps "${pkg}" || return 1 done + # GCC doesn't respect CPPFLAGS because of its own meddling as well + # as toolchain.eclass, so provide a wrapper here to force just + # installed packages to be found + mkdir -p "${ROOT}"/tmp/usr/local/bin + rm -f "${ROOT}"/tmp/usr/local/bin/my{gcc,g++} + cat > "${ROOT}/tmp/usr/local/bin/mygcc" <<-EOS + #!/usr/bin/env sh + exec ${CC} "\$@" ${CPPFLAGS} + EOS + cat > "${ROOT}/tmp/usr/local/bin/myg++" <<-EOS + #!/usr/bin/env sh + exec ${CXX} "\$@" ${CPPFLAGS} + EOS + chmod 755 "${ROOT}/tmp/usr/local/bin/my"{gcc,g++} + for pkg in ${compiler_stage1} ; do # =gcc-12.2.0, rpath needs to be disabled in stage2 on - # Darwin, see above. - EXTRA_ECONF="--disable-bootstrap $(rapx --with-linker-hash-style=both) --with-local-prefix=${ROOT} ${disable_darwin_rpath}" \ + EXTRA_ECONF="$(rapx --with-linker-hash-style=both) --with-local-prefix=${ROOT}" \ MYCMAKEARGS="-DCMAKE_USE_SYSTEM_LIBRARY_LIBUV=OFF" \ GCC_MAKE_TARGET=all \ + OVERRIDE_CFLAGS="${CPPFLAGS} ${OVERRIDE_CFLAGS}" \ OVERRIDE_CXXFLAGS="${CPPFLAGS} ${OVERRIDE_CXXFLAGS}" \ - TPREFIX="${ROOT}" \ + CC=mygcc CXX=myg++ \ PYTHON_COMPAT_OVERRIDE=python$(python_ver) \ emerge_pkgs --nodeps "${pkg}" || return 1 @@ -2134,7 +2149,7 @@ bootstrap_stage3() { # At this point, we should have a proper GCC, and don't need to # rely on the system wrappers. Let's get rid of them, so that # they stop mucking up builds. - rm -f "${ROOT}"/tmp/usr/local/bin/* + rm -f "${ROOT}"/tmp/usr/local/bin/{,my,${CHOST}-}{gcc,g++} configure_toolchain || return 1