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 ACD37158041 for ; Sun, 10 Mar 2024 19:00:29 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C00AFE2A19; Sun, 10 Mar 2024 19:00:28 +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 A3D07E2A19 for ; Sun, 10 Mar 2024 19:00:28 +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 C10A0335D6B for ; Sun, 10 Mar 2024 19:00:27 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id E607610B0 for ; Sun, 10 Mar 2024 19:00:25 +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: <1710097191.bf8c6e96498309932dbdc975462ef93eb0c1c347.grobian@gentoo> Subject: [gentoo-commits] repo/proj/prefix:master commit in: sys-devel/gcc/, sys-devel/gcc/files/ X-VCS-Repository: repo/proj/prefix X-VCS-Files: sys-devel/gcc/files/gcc-13-darwin14-bootstrap.patch sys-devel/gcc/gcc-13.2.0.ebuild X-VCS-Directories: sys-devel/gcc/ sys-devel/gcc/files/ X-VCS-Committer: grobian X-VCS-Committer-Name: Fabian Groffen X-VCS-Revision: bf8c6e96498309932dbdc975462ef93eb0c1c347 X-VCS-Branch: master Date: Sun, 10 Mar 2024 19:00:25 +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: 56fd1eb6-98eb-4806-b55c-1c72ea1c54b4 X-Archives-Hash: 5c27ceb8a353666c7836aebadab120c1 commit: bf8c6e96498309932dbdc975462ef93eb0c1c347 Author: Fabian Groffen gentoo org> AuthorDate: Sun Mar 10 18:59:51 2024 +0000 Commit: Fabian Groffen gentoo org> CommitDate: Sun Mar 10 18:59:51 2024 +0000 URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=bf8c6e96 sys-devel/gcc-13.2.0: fix bootstrap using CLT 15.3 on macOS Signed-off-by: Fabian Groffen gentoo.org> .../gcc/files/gcc-13-darwin14-bootstrap.patch | 40 ++++++++++++++++++++++ sys-devel/gcc/gcc-13.2.0.ebuild | 4 +++ 2 files changed, 44 insertions(+) diff --git a/sys-devel/gcc/files/gcc-13-darwin14-bootstrap.patch b/sys-devel/gcc/files/gcc-13-darwin14-bootstrap.patch new file mode 100644 index 0000000000..98a92c103e --- /dev/null +++ b/sys-devel/gcc/files/gcc-13-darwin14-bootstrap.patch @@ -0,0 +1,40 @@ +disable some code-sanity checks/hacks because while bootstapping we use +a compiler and its c++ library that does not necessarily comply + +This is an issue since macOS Sonoma 14.4 and/or CLT 15.3. + +--- a/include/safe-ctype.h ++++ b/include/safe-ctype.h +@@ -120,6 +120,7 @@ + So we include ctype.h here and then immediately redefine its macros. */ + + #include ++#if 0 + #undef isalpha + #define isalpha(c) do_not_use_isalpha_with_safe_ctype + #undef isalnum +@@ -146,5 +147,6 @@ + #define toupper(c) do_not_use_toupper_with_safe_ctype + #undef tolower + #define tolower(c) do_not_use_tolower_with_safe_ctype ++#endif + + #endif /* SAFE_CTYPE_H */ +--- a/gcc/system.h ++++ b/gcc/system.h +@@ -917,6 +917,7 @@ + + #if (GCC_VERSION >= 3000) + ++#if 0 + /* Note autoconf checks for prototype declarations and includes + system.h while doing so. Only poison these tokens if actually + compiling gcc, so that the autoconf declaration tests for malloc +@@ -933,6 +934,7 @@ + #undef realloc + #pragma GCC poison malloc realloc + #endif ++#endif + + /* The %m format should be used when GCC's main diagnostic functions + supporting %m are available, and xstrerror from libiberty diff --git a/sys-devel/gcc/gcc-13.2.0.ebuild b/sys-devel/gcc/gcc-13.2.0.ebuild index 65b51e7dcc..41160a6ef9 100644 --- a/sys-devel/gcc/gcc-13.2.0.ebuild +++ b/sys-devel/gcc/gcc-13.2.0.ebuild @@ -21,6 +21,8 @@ IANSGCCVER="gcc-13.2-darwin-r0" SRC_URI+=" elibc_Darwin? ( https://github.com/iains/gcc-13-branch/archive/refs/tags/${IANSGCCVER}.tar.gz )" +IUSE+="bootstrap" + # Technically only if USE=hardened *too* right now, but no point in complicating it further. # If GCC is enabling CET by default, we need glibc to be built with support for it. # bug #830454 @@ -76,6 +78,8 @@ src_prepare() { fi if [[ ${CHOST} == *-darwin* ]] ; then + use bootstrap && eapply "${FILESDIR}"/${PN}-13-darwin14-bootstrap.patch + # our ld64 is a slight bit different, so tweak expression to not # get confused and break the build sed -i -e 's/grep ld64/grep :ld64/' gcc/configure || die