* [gentoo-commits] repo/proj/prefix:master commit in: sys-devel/gcc/files/, sys-devel/gcc/
@ 2018-06-07 12:54 Fabian Groffen
0 siblings, 0 replies; 8+ messages in thread
From: Fabian Groffen @ 2018-06-07 12:54 UTC (permalink / raw
To: gentoo-commits
commit: d582c9ac245214e1e79637dd0ad22d939a70e19b
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Thu Jun 7 12:53:58 2018 +0000
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Thu Jun 7 12:53:58 2018 +0000
URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=d582c9ac
sys-devel/gcc: add patch to fix target on powerpc-darwin
Package-Manager: Portage-2.3.40.1-prefix, Repoman-2.3.9
sys-devel/gcc/files/gcc-7.3.0-powerpc-darwin.patch | 30 ++++++++++++++++++++++
sys-devel/gcc/gcc-7.3.0-r3.ebuild | 3 +++
2 files changed, 33 insertions(+)
diff --git a/sys-devel/gcc/files/gcc-7.3.0-powerpc-darwin.patch b/sys-devel/gcc/files/gcc-7.3.0-powerpc-darwin.patch
new file mode 100644
index 0000000000..a636187f40
--- /dev/null
+++ b/sys-devel/gcc/files/gcc-7.3.0-powerpc-darwin.patch
@@ -0,0 +1,30 @@
+https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=257501
+https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84113
+
+--- branches/gcc-7-branch/gcc/config/rs6000/altivec.md 2018/02/08 18:39:43 257500
++++ branches/gcc-7-branch/gcc/config/rs6000/altivec.md 2018/02/08 18:48:37 257501
+@@ -414,7 +414,6 @@
+ (define_insn "*restore_world"
+ [(match_parallel 0 "restore_world_operation"
+ [(return)
+- (use (reg:SI LR_REGNO))
+ (use (match_operand:SI 1 "call_operand" "s"))
+ (clobber (match_operand:SI 2 "gpc_reg_operand" "=r"))])]
+ "TARGET_MACHO && (DEFAULT_ABI == ABI_DARWIN) && TARGET_32BIT"
+--- branches/gcc-7-branch/gcc/config/rs6000/predicates.md 2018/02/08 18:39:43 257500
++++ branches/gcc-7-branch/gcc/config/rs6000/predicates.md 2018/02/08 18:48:37 257501
+@@ -1468,13 +1468,12 @@
+ rtx elt;
+ int count = XVECLEN (op, 0);
+
+- if (count != 59)
++ if (count != 58)
+ return 0;
+
+ index = 0;
+ if (GET_CODE (XVECEXP (op, 0, index++)) != RETURN
+ || GET_CODE (XVECEXP (op, 0, index++)) != USE
+- || GET_CODE (XVECEXP (op, 0, index++)) != USE
+ || GET_CODE (XVECEXP (op, 0, index++)) != CLOBBER)
+ return 0;
+
diff --git a/sys-devel/gcc/gcc-7.3.0-r3.ebuild b/sys-devel/gcc/gcc-7.3.0-r3.ebuild
index 8d4055ed5e..57e53e6fca 100644
--- a/sys-devel/gcc/gcc-7.3.0-r3.ebuild
+++ b/sys-devel/gcc/gcc-7.3.0-r3.ebuild
@@ -38,6 +38,9 @@ src_prepare() {
# make it have correct install_names on Darwin
epatch "${FILESDIR}"/4.3.3/darwin-libgcc_s-installname.patch
+
+ # fix for powerpc-darwin, from upstream, fixed for 7.4
+ epatch "${FILESDIR}"/${P}-powerpc-darwin.patch
}
src_configure() {
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [gentoo-commits] repo/proj/prefix:master commit in: sys-devel/gcc/files/, sys-devel/gcc/
@ 2020-06-21 18:16 Fabian Groffen
0 siblings, 0 replies; 8+ messages in thread
From: Fabian Groffen @ 2020-06-21 18:16 UTC (permalink / raw
To: gentoo-commits
commit: 80fe63aa88254de29ead73c178b4f5f388348c68
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Sun Jun 21 18:15:46 2020 +0000
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Sun Jun 21 18:15:46 2020 +0000
URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=80fe63aa
sys-devel/gcc-10.1.0-r1: bump from gx86
Package-Manager: Portage-2.3.100-prefix, Repoman-2.3.22
RepoMan-Options: --force
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>
sys-devel/gcc/Manifest | 2 +
sys-devel/gcc/files/gcc-configure-texinfo.patch | 4 +-
sys-devel/gcc/gcc-10.1.0-r1.ebuild | 95 +++++++++++++++++++++++++
3 files changed, 99 insertions(+), 2 deletions(-)
diff --git a/sys-devel/gcc/Manifest b/sys-devel/gcc/Manifest
index 43e2fe1664..d3970689d3 100644
--- a/sys-devel/gcc/Manifest
+++ b/sys-devel/gcc/Manifest
@@ -1,4 +1,6 @@
DIST ecj-4.5.jar 1470676 BLAKE2B 793c10ba09fd8040c0e1181204141aea16780c9c9088e07126e00da2b510af2ad6f58d876357d7e98cbb02d783a3be434469d5de1df134ccb8cc508e45028d80 SHA512 d4e1bf7538ace56e3d69fa91da5bbd16c272923b4de0a9d8dee23ea2b75f9f38c603de72fc4061df49285c450b63f3df211cee5270e9fffc5447445d1a9c9e4e
+DIST gcc-10.1.0-patches-2.tar.bz2 15808 BLAKE2B 8275c2ac3eda8e87255fefe2bb4ed2a10d790bf6085517cd26589fa6a98aa417f4578da88da91b4639d78ed9c897a07447d2048698b4e003f3adc397881c7ee5 SHA512 f3ef55103346a0ca40a5633a520091e93e98a3226d24a2b677f791af511460ea5bb5f6dbda6cdf706af2aeb22eb39d37cf226e012bd378c330db17246da88d09
+DIST gcc-10.1.0.tar.xz 74591240 BLAKE2B d64cf01beaaff7af9e7d5b1d5e6fdfb37cce5667b4455c1c9bbfd190e631f03555d63d52d31e7be5ac232256be11058f89d5bc7d0dcb01de44e90a52645ad87f SHA512 0cb2a74c793face751f42bc580960b00e2bfea785872a0a2155f1f1dbfaa248f9591b67f4322db0f096f8844aca9243bc02732bda106c3b6e43b02bb67eb3096
DIST gcc-4.1.2-patches-1.5.tar.bz2 53576 BLAKE2B 16dcbf8bac85c3e95a8526ffd504f298ac09fbd79d8ee9f633782ffcd177eb0de256dc8ff36d45dc40dd8582b712e2ea0cd3b2063e3205d51cc022ad7befa7cc SHA512 3c7c15f740ec80aaa6f9c1ad77daeb2a2527f1719fbcc5d96d956e1fe1f24da961b1b030cf2bb631f1a0cc970f6462823e9a78441c9fd6b57f3645b04cd6a362
DIST gcc-4.1.2-uclibc-patches-1.0.tar.bz2 20980 BLAKE2B cfc7dd4c7a0b1ed80c491d4ad56b05b05ff308fdbed2faa1b9f15b10c0f7834ee4ffcb0df1619f959f7a1a5f315305b550665c232404a8a3306e3e615539a0c8 SHA512 57789f4236a3085136afa83be3cef677bd813afd258d67bfdbecd2058f497cd459366d5515044c0208ab753946dc951dac6a3889752ca6dae836d837c22ce33b
DIST gcc-4.1.2.tar.bz2 39707720 BLAKE2B 966b6a64c118456c7fb66eb2ad0dd84b1d53ad88dcbd146f446ef097a6975f5d6a7f1bcbbc4bfcd4e48b00eeb8054728e412db3d9818cff1f195e37859a4e510 SHA512 b97d3b72a3b0355611d5090b2c715b7a774f0e466a89326a0226c2809d12dfafb2d7c5a7af54bd5e00c135bbb6596f535e1a484740f7f1f691e8a57e6f0425cc
diff --git a/sys-devel/gcc/files/gcc-configure-texinfo.patch b/sys-devel/gcc/files/gcc-configure-texinfo.patch
index ddc098ddbd..99e90998a4 100644
--- a/sys-devel/gcc/files/gcc-configure-texinfo.patch
+++ b/sys-devel/gcc/files/gcc-configure-texinfo.patch
@@ -4,8 +4,8 @@ that it violates the cheesy version grep.
http://bugs.gentoo.org/198182
---- configure
-+++ configure
+--- a/configure
++++ b/configure
@@ -3573,6 +3573,6 @@
:
else
diff --git a/sys-devel/gcc/gcc-10.1.0-r1.ebuild b/sys-devel/gcc/gcc-10.1.0-r1.ebuild
new file mode 100644
index 0000000000..e163d95646
--- /dev/null
+++ b/sys-devel/gcc/gcc-10.1.0-r1.ebuild
@@ -0,0 +1,95 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+PATCH_VER="2"
+
+inherit toolchain
+
+KEYWORDS="~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+
+RDEPEND=""
+BDEPEND="
+ kernel_linux? ( ${CATEGORY}/binutils )
+ kernel_Darwin? ( ${CATEGORY}/binutils-apple )
+ kernel_AIX? ( ${CATEGORY}/native-cctools )"
+
+src_prepare() {
+ toolchain_src_prepare
+
+ use vanilla && return 0
+
+ if use elibc_Cygwin; then
+ sed -e '/0001-share-mingw-fset-stack-executable-with-cygwin.patch/d' \
+ -i "${WORKDIR}/gcc-${CYGWINPORTS_GITREV}/gcc.cygport" || die
+ fi
+
+ # make sure 64-bits native targets don't screw up the linker paths
+ eapply -p0 "${FILESDIR}"/no-libs-for-startfile.patch
+ if use prefix; then
+ eapply -p0 "${FILESDIR}"/4.5.2/prefix-search-dirs.patch
+ # try /usr/lib32 in 32bit profile on x86_64-linux (needs
+ # --enable-multilib), but this does make sense in prefix only
+ eapply -p0 "${FILESDIR}"/${PN}-4.8.3-linux-x86-on-amd64.patch
+ fi
+
+ # make it have correct install_names on Darwin
+ eapply -p1 "${FILESDIR}"/4.3.3/darwin-libgcc_s-installname.patch
+
+ if [[ ${CHOST} == powerpc*-darwin* ]] ; then
+ # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=44107
+ sed -i -e 's|^ifeq (/usr/lib,|ifneq (/usr/lib,|' \
+ libgcc/config/t-slibgcc-darwin || die
+ fi
+
+ eapply_user
+}
+
+src_configure() {
+ local myconf=()
+ case ${CTARGET}:" ${USE} " in
+ powerpc*-darwin*)
+ # bug #381179
+ filter-flags "-mcpu=*" "-mtune=*"
+ # bug #657522
+ # A bug in configure checks whether -no-pie works, but the
+ # compiler doesn't pass -no-pie onto the linker if -fno-PIE
+ # isn't passed, so the configure check always finds -no-pie
+ # is accepted. (Likewise, when -fno-PIE is passed, the
+ # compiler passes -no_pie onto the linker.)
+ # Since our linker doesn't grok this, avoid above checks to
+ # be run
+ # NOTE: later ld64 does grok -no_pie, not -no-pie (as checked)
+ export gcc_cv_c_no_fpie=no
+ export gcc_cv_no_pie=no
+ ;;
+ *-solaris*)
+ # todo: some magic for native vs. GNU linking?
+ myconf+=( --with-gnu-ld --with-gnu-as --enable-largefile )
+ # Solaris 11 defines this in its headers, but that causes a
+ # mismatch whilst compiling, bug #657514
+ export ac_cv_func_aligned_alloc=no
+ export ac_cv_func_memalign=no
+ export ac_cv_func_posix_memalign=no
+ ;;
+ i[34567]86-*-linux*:*" prefix "*)
+ # to allow the linux-x86-on-amd64.patch become useful, we need
+ # to enable multilib, even if there is just one multilib option.
+ myconf+=( --enable-multilib )
+ if [[ ${CBUILD:-${CHOST}} == "${CHOST}" ]]; then
+ # we might be on x86_64-linux, but don't do cross-compile, so
+ # tell the host-compiler to really create 32bits (for stage1)
+ # (real x86-linux-gcc also accept -m32).
+ append-flags -m32
+ fi
+ ;;
+ esac
+
+ # Since GCC 4.1.2 some non-posix (?) /bin/sh compatible code is used, at
+ # least on Solaris, and AIX /bin/sh is way too slow,
+ # so force it to use $BASH (that portage uses) - it can't be EPREFIX
+ # in case that doesn't exist yet
+ export CONFIG_SHELL="${CONFIG_SHELL:-${BASH}}"
+ toolchain_src_configure "${myconf[@]}"
+}
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [gentoo-commits] repo/proj/prefix:master commit in: sys-devel/gcc/files/, sys-devel/gcc/
@ 2021-09-05 10:49 Fabian Groffen
0 siblings, 0 replies; 8+ messages in thread
From: Fabian Groffen @ 2021-09-05 10:49 UTC (permalink / raw
To: gentoo-commits
commit: ccbf773bca3510785a1c6655c77f5d457ded43af
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Sun Sep 5 10:29:56 2021 +0000
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Sun Sep 5 10:29:56 2021 +0000
URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=ccbf773b
sys-devel/gcc-10.2.0-r5: add patch for Xcode 12.5
Closes: https://bugs.gentoo.org/799170
Package-Manager: Portage-3.0.21-prefix, Repoman-3.0.3
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>
sys-devel/gcc/files/gcc-10.2.0-xcode-12.5.patch | 147 ++++++++++++++++++++++++
sys-devel/gcc/gcc-10.2.0-r5.ebuild | 3 +
2 files changed, 150 insertions(+)
diff --git a/sys-devel/gcc/files/gcc-10.2.0-xcode-12.5.patch b/sys-devel/gcc/files/gcc-10.2.0-xcode-12.5.patch
new file mode 100644
index 0000000000..f8b6b04232
--- /dev/null
+++ b/sys-devel/gcc/files/gcc-10.2.0-xcode-12.5.patch
@@ -0,0 +1,147 @@
+From 743b8dd6fd757e997eb060d70fd4ae8e04fb56cd Mon Sep 17 00:00:00 2001
+From: Iain Sandoe <iain@sandoe.co.uk>
+Date: Sat, 31 Jul 2021 16:29:03 +0100
+Subject: [PATCH 1/1] Darwin, X86, config: Adjust 'as' command lines
+ [PR100340].
+
+Versions of the assembler using clang from XCode 12.5/12.5.1
+have a bug which produces different code layout between debug and
+non-debug input, leading to a compare fail for default configure
+parameters.
+
+This is a workaround fix to disable the optimisation that is
+responsible for the bug.
+
+Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>
+
+PR target/100340 - Bootstrap fails with Clang 12.0.5 (XCode 12.5)
+
+ PR target/100340
+
+gcc/ChangeLog:
+
+ * config.in: Regenerate.
+ * config/i386/darwin.h (EXTRA_ASM_OPTS): New
+ (ASM_SPEC): Pass options to disable branch shortening where
+ needed.
+ * configure: Regenerate.
+ * configure.ac: Detect versions of 'as' that support the
+ optimisation which has the bug.
+---
+ gcc/config.in | 7 +++++++
+ gcc/config/i386/darwin.h | 10 +++++++++-
+ gcc/configure | 35 +++++++++++++++++++++++++++++++++++
+ gcc/configure.ac | 9 +++++++++
+ 4 files changed, 60 insertions(+), 1 deletion(-)
+
+diff --git a/gcc/config.in b/gcc/config.in
+index 7f5b01fad76..d8a810bbc91 100644
+--- a/gcc/config.in
++++ b/gcc/config.in
+@@ -616,6 +616,13 @@
+ #endif
+
+
++/* Define if your Mac OS X assembler supports -mllvm -x86-pad-for-align=false.
++ */
++#ifndef USED_FOR_TARGET
++#undef HAVE_AS_MLLVM_X86_PAD_FOR_ALIGN
++#endif
++
++
+ /* Define if your Mac OS X assembler supports the -mmacos-version-min option.
+ */
+ #ifndef USED_FOR_TARGET
+diff --git a/gcc/config/i386/darwin.h b/gcc/config/i386/darwin.h
+index bac32197e83..73b06e2307d 100644
+--- a/gcc/config/i386/darwin.h
++++ b/gcc/config/i386/darwin.h
+@@ -125,10 +125,18 @@ along with GCC; see the file COPYING3. If not see
+ %{mfentry*:%eDarwin does not support -mfentry or associated options}" \
+ DARWIN_CC1_SPEC
+
++/* This is a workaround for a tool bug: see PR100340. */
++
++#ifdef HAVE_AS_MLLVM_X86_PAD_FOR_ALIGN
++#define EXTRA_ASM_OPTS " -mllvm -x86-pad-for-align=false"
++#else
++#define EXTRA_ASM_OPTS ""
++#endif
++
+ #undef ASM_SPEC
+ #define ASM_SPEC "-arch %(darwin_arch) \
+ " ASM_OPTIONS " -force_cpusubtype_ALL \
+- %{static}" ASM_MMACOSX_VERSION_MIN_SPEC
++ %{static}" ASM_MMACOSX_VERSION_MIN_SPEC EXTRA_ASM_OPTS
+
+ #undef ENDFILE_SPEC
+ #define ENDFILE_SPEC \
+diff --git a/gcc/configure b/gcc/configure
+index 08c286764e0..a2d1003a0f5 100755
+--- a/gcc/configure
++++ b/gcc/configure
+@@ -27082,6 +27082,41 @@ $as_echo "$as_me: WARNING: LTO for $target requires binutils >= 2.20.1, but vers
+ fi
+ ;;
+ esac
++ case $target_os in
++ darwin2[0-9]* | darwin19*)
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for llvm assembler x86-pad-for-align option" >&5
++$as_echo_n "checking assembler for llvm assembler x86-pad-for-align option... " >&6; }
++if ${gcc_cv_as_mllvm_x86_pad_for_align+:} false; then :
++ $as_echo_n "(cached) " >&6
++else
++ gcc_cv_as_mllvm_x86_pad_for_align=no
++ if test x$gcc_cv_as != x; then
++ $as_echo '.text' > conftest.s
++ if { ac_try='$gcc_cv_as $gcc_cv_as_flags -mllvm -x86-pad-for-align=false -o conftest.o conftest.s >&5'
++ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; }
++ then
++ gcc_cv_as_mllvm_x86_pad_for_align=yes
++ else
++ echo "configure: failed program was" >&5
++ cat conftest.s >&5
++ fi
++ rm -f conftest.o conftest.s
++ fi
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_mllvm_x86_pad_for_align" >&5
++$as_echo "$gcc_cv_as_mllvm_x86_pad_for_align" >&6; }
++if test $gcc_cv_as_mllvm_x86_pad_for_align = yes; then
++
++$as_echo "#define HAVE_AS_MLLVM_X86_PAD_FOR_ALIGN 1" >>confdefs.h
++
++fi
++
++ ;;
++ esac
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for -xbrace_comment" >&5
+ $as_echo_n "checking assembler for -xbrace_comment... " >&6; }
+diff --git a/gcc/configure.ac b/gcc/configure.ac
+index 653a1cc561d..ad8fa5a4604 100644
+--- a/gcc/configure.ac
++++ b/gcc/configure.ac
+@@ -4799,6 +4799,15 @@ foo: nop
+ fi
+ ;;
+ esac
++ case $target_os in
++ darwin2[[0-9]]* | darwin19*)
++ gcc_GAS_CHECK_FEATURE([llvm assembler x86-pad-for-align option],
++ gcc_cv_as_mllvm_x86_pad_for_align,,
++ [-mllvm -x86-pad-for-align=false], [.text],,
++ [AC_DEFINE(HAVE_AS_MLLVM_X86_PAD_FOR_ALIGN, 1,
++ [Define if your Mac OS X assembler supports -mllvm -x86-pad-for-align=false.])])
++ ;;
++ esac
+
+ gcc_GAS_CHECK_FEATURE([-xbrace_comment], gcc_cv_as_ix86_xbrace_comment,,
+ [-xbrace_comment=no], [.text],,
+--
+2.27.0
+
diff --git a/sys-devel/gcc/gcc-10.2.0-r5.ebuild b/sys-devel/gcc/gcc-10.2.0-r5.ebuild
index f146759e09..9baac7c2d6 100644
--- a/sys-devel/gcc/gcc-10.2.0-r5.ebuild
+++ b/sys-devel/gcc/gcc-10.2.0-r5.ebuild
@@ -53,6 +53,9 @@ src_prepare() {
find . -name "configure" | xargs \
sed -i -e '/^\s*10\.\*)/N' \
-e '/^\s*10\.\*)\s*_lt_dar_allow_undefined/s/10\.\*/10.*|11.*/' || die
+
+ # fix interoperation with Xcode 12.5, bug #799170
+ eapply -p1 "${FILESDIR}"/${PN}-10.2.0-xcode-12.5.patch
}
src_configure() {
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [gentoo-commits] repo/proj/prefix:master commit in: sys-devel/gcc/files/, sys-devel/gcc/
@ 2021-09-12 8:41 Sam James
0 siblings, 0 replies; 8+ messages in thread
From: Sam James @ 2021-09-12 8:41 UTC (permalink / raw
To: gentoo-commits
commit: b758c765940eb06ad8f58ae003180cbaad4e4888
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Sep 12 08:40:03 2021 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Sep 12 08:40:50 2021 +0000
URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=b758c765
sys-devel/gcc: add 10.3.0
Bug: https://bugs.gentoo.org/799170
Package-Manager: Portage-3.0.21-prefix, Repoman-3.0.3
Signed-off-by: Sam James <sam <AT> gentoo.org>
sys-devel/gcc/Manifest | 4 +
.../gcc/files/gcc-10.3.0-clang-bootstrap.patch | 142 +++++++++++++++++++++
sys-devel/gcc/gcc-10.3.0-r2.ebuild | 114 +++++++++++++++++
3 files changed, 260 insertions(+)
diff --git a/sys-devel/gcc/Manifest b/sys-devel/gcc/Manifest
index a36c33e58f..4ecccea056 100644
--- a/sys-devel/gcc/Manifest
+++ b/sys-devel/gcc/Manifest
@@ -1,7 +1,11 @@
DIST ecj-4.5.jar 1470676 BLAKE2B 793c10ba09fd8040c0e1181204141aea16780c9c9088e07126e00da2b510af2ad6f58d876357d7e98cbb02d783a3be434469d5de1df134ccb8cc508e45028d80 SHA512 d4e1bf7538ace56e3d69fa91da5bbd16c272923b4de0a9d8dee23ea2b75f9f38c603de72fc4061df49285c450b63f3df211cee5270e9fffc5447445d1a9c9e4e
DIST gcc-10.2.0-patches-6.tar.bz2 24103 BLAKE2B f719012f86136ad9c4ea1397548caca6e69687534599a88cc25fe0e4f83dd7fd34c07375fa6e612e2b430e078c1a59913160cce07312e94fa1ce575a33e5457b SHA512 61d97dba29024c7a22806689ebf33f5cb9ce099230bcc344f2865b976c3fdfd8ebec5962eaffd0156de75eca58499ba785867bd4a4ac92c6f799ab1bee8844a1
DIST gcc-10.2.0.tar.xz 75004144 BLAKE2B 1d79397330354e61439283cac96a109bf78ffc726265442e6d3ec131f107589ab7349d6612836edd8c8512f7bcc1d901a65a0d5d925d28a5bf3ef5cc3f9787ee SHA512 42ae38928bd2e8183af445da34220964eb690b675b1892bbeb7cd5bb62be499011ec9a93397dba5e2fb681afadfc6f2767d03b9035b44ba9be807187ae6dc65e
+DIST gcc-10.3.0-patches-3.tar.bz2 18935 BLAKE2B 13eaf1e055b5b63069aed1575ed93f6bc822b5e3f2181ddfc88f4e7ff801f58997cd131b2efd79b90469b1f861db994feb2adcaecacf165442078f76e233fd9a SHA512 c3d6a6f32863cc0ff7c877314ff0c00a892e473f64d16b82d46b4a77aa97c3e7a575492d27f0d423acb2621c86c9a49bca0e26e45bda9e697495444fcac85084
+DIST gcc-10.3.0.tar.xz 76692288 BLAKE2B ac7898f5eb8a7c5f151a526d1bb38913a68b50a65e4d010ac09fa20b6c801c671c790d780f23ccb8e4ecdfc686f4aa588082ccc9eb5c80c7b0e30788f824c1eb SHA512 2b2dd7453d48a398c29eaebd1422b70341001b8c90a62aee51e83344e7fdd8a8e45f82a4a9165bd7edc76dada912c932f4b6632c5636760fec4c5d7e402b3f86
DIST gcc-11.0.0-patches-6.tar.bz2 12744 BLAKE2B 05e8d8b87cd1069bc6c03a6cbd61e5414148b7c6467e5b2ebf03af1493075280d8f1a5a123148f786724e3f813ef7fbb5f2728598ab4ab7879b4e649f592156b SHA512 9e873a40eca07e471a9832ed062575063144554ca306b60a9b5f7da61fa1f148a13fd5ea933c852d105931e452de1c6ab3cd7baf4f80da17b9d81eeb36c5b3fd
+DIST gcc-11.1.0-patches-1.tar.bz2 12130 BLAKE2B 4d763b83dba7875bbbe8bbb9b6c392791ba97037d17347548604ffa7c70b32fdafcd45b0722ae40aa3aa8cbb34b9f3e3aa399d0096e35e74f75b174aad0c032e SHA512 e4e363c6a81bbc423ec36b6c57801ea2a70961ee7d7d0333924c7012b2b6fd4008f53e9208b5d1f6025f9e74a95d46c121b4b8909827070b46091228688996a4
+DIST gcc-11.1.0.tar.xz 78877216 BLAKE2B fe617e776b0270d11adea21b5c37d889de90865c19ab82d1c37bbd5c5b9c583a98c174606c4f893ca4950a4233e2a58aae93ad6aa7ad33d4e78a31c72371c1ed SHA512 fd6bba0f67ff48069d03073d1a9b5e896383b1cfc9dde008e868e60a9ec5014a837d56af0ecbf467b3fb9b37ec74a676e819a18b44393a0a3c4280175b5d7ad8
DIST gcc-4.1.2-patches-1.5.tar.bz2 53576 BLAKE2B 16dcbf8bac85c3e95a8526ffd504f298ac09fbd79d8ee9f633782ffcd177eb0de256dc8ff36d45dc40dd8582b712e2ea0cd3b2063e3205d51cc022ad7befa7cc SHA512 3c7c15f740ec80aaa6f9c1ad77daeb2a2527f1719fbcc5d96d956e1fe1f24da961b1b030cf2bb631f1a0cc970f6462823e9a78441c9fd6b57f3645b04cd6a362
DIST gcc-4.1.2-uclibc-patches-1.0.tar.bz2 20980 BLAKE2B cfc7dd4c7a0b1ed80c491d4ad56b05b05ff308fdbed2faa1b9f15b10c0f7834ee4ffcb0df1619f959f7a1a5f315305b550665c232404a8a3306e3e615539a0c8 SHA512 57789f4236a3085136afa83be3cef677bd813afd258d67bfdbecd2058f497cd459366d5515044c0208ab753946dc951dac6a3889752ca6dae836d837c22ce33b
DIST gcc-4.1.2.tar.bz2 39707720 BLAKE2B 966b6a64c118456c7fb66eb2ad0dd84b1d53ad88dcbd146f446ef097a6975f5d6a7f1bcbbc4bfcd4e48b00eeb8054728e412db3d9818cff1f195e37859a4e510 SHA512 b97d3b72a3b0355611d5090b2c715b7a774f0e466a89326a0226c2809d12dfafb2d7c5a7af54bd5e00c135bbb6596f535e1a484740f7f1f691e8a57e6f0425cc
diff --git a/sys-devel/gcc/files/gcc-10.3.0-clang-bootstrap.patch b/sys-devel/gcc/files/gcc-10.3.0-clang-bootstrap.patch
new file mode 100644
index 0000000000..b79f421695
--- /dev/null
+++ b/sys-devel/gcc/files/gcc-10.3.0-clang-bootstrap.patch
@@ -0,0 +1,142 @@
+Noticed when looking through git logs for Darwin but wasn't
+sure until I saw it in macports as well:
+https://raw.githubusercontent.com/macports/macports-ports/master/lang/gcc10/files/patch-gcc10-i686-clang-bootstrap-fix.diff
+https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=54258e22b0846aaa6bd3265f592feb161eecda75
+
+From 54258e22b0846aaa6bd3265f592feb161eecda75 Mon Sep 17 00:00:00 2001
+From: Iain Sandoe <iain@sandoe.co.uk>
+Date: Sat, 3 Jul 2021 15:42:16 +0100
+Subject: [PATCH] Darwin, config: Revise host config fragment.
+
+There were two uses for the Darwin host config fragment:
+
+The first is to arrange for targets that support mdynamic-no-pic
+to be built with that enabled (since it makes a significant
+difference to the compiler performance). We can be more specific
+in the application of this, since it only applies to 32b hosts
+plus powerpc64-darwin9.
+
+The second was to work around a tool bug where -fno-PIE was not
+propagated to the link stage. This second use is redundant,
+since the buggy toolchain cannot bootstrap current GCC sources
+anyway.
+
+This makes the host fragment more specific and reduces the number
+of toolchains for which it is included which reduces clutter in
+configure lines.
+
+Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>
+
+config/ChangeLog:
+
+ * mh-darwin: Make this specific to handling the
+ mdynamic-no-pic case.
+
+ChangeLog:
+
+ * configure: Regenerate.
+ * configure.ac: Adjust cases for which it is necessary to
+ include the Darwin host config fragment.
+---
+ config/mh-darwin | 57 ++++++++++++++++++++++++++++--------------------
+ configure | 2 +-
+ configure.ac | 2 +-
+ 3 files changed, 35 insertions(+), 26 deletions(-)
+
+diff --git a/config/mh-darwin b/config/mh-darwin
+index 148b73038c3..fb2bb5ad1d9 100644
+--- a/config/mh-darwin
++++ b/config/mh-darwin
+@@ -1,29 +1,38 @@
+ # The -mdynamic-no-pic ensures that the compiler executable is built without
+-# position-independent-code -- the usual default on Darwin. This fix speeds
+-# compiles by 3-5%. Don't add it if the compiler doesn't also support
+-# -mno-dynamic-no-pic to undo it.
+-DARWIN_MDYNAMIC_NO_PIC := \
+-`case ${host} in i?86-*-darwin* | powerpc-*-darwin*) \
+- $(CC) -S -xc /dev/null -o /dev/null -mno-dynamic-no-pic 2>/dev/null \
+- && echo -mdynamic-no-pic ;; esac`
+-DARWIN_GCC_MDYNAMIC_NO_PIC := \
+-`case ${host} in i?86-*-darwin* | powerpc-*-darwin*) \
+- $(CC) -S -xc /dev/null -o /dev/null -mno-dynamic-no-pic 2>/dev/null \
+- || echo -mdynamic-no-pic ;; esac`
++# position-independent-code -- the usual default on Darwin. This speeds compiles
++# by 8-20% (measurements made against GCC-11).
++# However, we cannot add it unless the bootstrap compiler supports
++# -mno-dynamic-no-pic to undo it, since libiberty, at least, needs this.
+
+-# ld on Darwin versions >= 10.7 defaults to PIE executables. Disable this for
+-# gcc components, since it is incompatible with our pch implementation.
+-DARWIN_NO_PIE := `case ${host} in *-*-darwin[1][1-9]*) echo -Wl,-no_pie ;; esac;`
++#Â We use Werror, since some versions of clang report unknown command line flags
++# as a warning only.
+
+-BOOT_CFLAGS += $(DARWIN_MDYNAMIC_NO_PIC)
+-BOOT_LDFLAGS += $(DARWIN_NO_PIE)
++# We only need to determine this for the host tool used to build stage1 (or a
++# non-bootstrapped compiler), later stages will be built by GCC which supports
++# the required flags.
+
+-# Similarly, for cross-compilation.
+-STAGE1_CFLAGS += $(DARWIN_MDYNAMIC_NO_PIC)
+-STAGE1_LDFLAGS += $(DARWIN_NO_PIE)
++BOOTSTRAP_TOOL_CAN_USE_MDYNAMIC_NO_PIC := $(shell \
++ $(CC) -S -xc /dev/null -o /dev/null -Werror -mno-dynamic-no-pic 2>/dev/null \
++ && echo true)
+
+-# Without -mno-dynamic-no-pic support, add -mdynamic-no-pic just to later
+-# stages when we know it is built with gcc.
+-STAGE2_CFLAGS += $(DARWIN_GCC_MDYNAMIC_NO_PIC)
+-STAGE3_CFLAGS += $(DARWIN_GCC_MDYNAMIC_NO_PIC)
+-STAGE4_CFLAGS += $(DARWIN_GCC_MDYNAMIC_NO_PIC)
++@if gcc-bootstrap
++ifeq (${BOOTSTRAP_TOOL_CAN_USE_MDYNAMIC_NO_PIC},true)
++STAGE1_CFLAGS += -mdynamic-no-pic
++else
++STAGE1_CFLAGS += -fPIC
++endif
++# Add -mdynamic-no-pic to later stages when we know it is built with GCC.
++BOOT_CFLAGS += -mdynamic-no-pic
++@endif gcc-bootstrap
++
++@unless gcc-bootstrap
++ifeq (${BOOTSTRAP_TOOL_CAN_USE_MDYNAMIC_NO_PIC},true)
++# FIXME: we should also enable this for cross and non-bootstrap builds but
++# that needs amendment to libcc1.
++# CFLAGS += -mdynamic-no-pic
++# CXXFLAGS += -mdynamic-no-pic
++else
++CFLAGS += -fPIC
++CXXFLAGS += -fPIC
++endif
++@endunless gcc-bootstrap
+diff --git a/configure b/configure
+index 732d1870b3d..85ab9915402 100755
+--- a/configure
++++ b/configure
+@@ -4074,7 +4074,7 @@ fi
+ hppa*-*)
+ host_makefile_frag="config/mh-pa"
+ ;;
+- *-*-darwin*)
++ i?86-*-darwin[89]* | i?86-*-darwin1[0-7]* | powerpc*-*-darwin*)
+ host_makefile_frag="config/mh-darwin"
+ ;;
+ powerpc-*-aix*)
+diff --git a/configure.ac b/configure.ac
+index 041ee249bac..1df038b04f3 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1318,7 +1318,7 @@ case "${host}" in
+ hppa*-*)
+ host_makefile_frag="config/mh-pa"
+ ;;
+- *-*-darwin*)
++ i?86-*-darwin[[89]]* | i?86-*-darwin1[[0-7]]* | powerpc*-*-darwin*)
+ host_makefile_frag="config/mh-darwin"
+ ;;
+ powerpc-*-aix*)
+--
+2.27.0
+
+
diff --git a/sys-devel/gcc/gcc-10.3.0-r2.ebuild b/sys-devel/gcc/gcc-10.3.0-r2.ebuild
new file mode 100644
index 0000000000..b1e30bf1e1
--- /dev/null
+++ b/sys-devel/gcc/gcc-10.3.0-r2.ebuild
@@ -0,0 +1,114 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+PATCH_VER="3"
+
+inherit toolchain
+
+KEYWORDS="~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+
+RDEPEND=""
+BDEPEND="
+ kernel_linux? ( ${CATEGORY}/binutils )
+ kernel_Darwin? (
+ || ( ${CATEGORY}/binutils-apple ${CATEGORY}/native-cctools )
+ )"
+
+src_prepare() {
+ has_version '>=sys-libs/glibc-2.32-r1' && rm -v "${WORKDIR}/patch/23_all_disable-riscv32-ABIs.patch"
+ toolchain_src_prepare
+
+ if use elibc_Cygwin; then
+ sed -e '/0001-share-mingw-fset-stack-executable-with-cygwin.patch/d' \
+ -i "${WORKDIR}/gcc-${CYGWINPORTS_GITREV}/gcc.cygport" || die
+ fi
+
+ # make sure 64-bits native targets don't screw up the linker paths
+ eapply -p0 "${FILESDIR}"/no-libs-for-startfile.patch
+ if use prefix; then
+ eapply -p0 "${FILESDIR}"/4.5.2/prefix-search-dirs.patch
+ # try /usr/lib32 in 32bit profile on x86_64-linux (needs
+ # --enable-multilib), but this does make sense in prefix only
+ eapply -p0 "${FILESDIR}"/${PN}-4.8.3-linux-x86-on-amd64.patch
+ fi
+
+ # make it have correct install_names on Darwin
+ eapply -p1 "${FILESDIR}"/4.3.3/darwin-libgcc_s-installname.patch
+
+ if [[ ${CHOST} == *-darwin* ]] ; then
+ # Backport another bootstrapping fix when building with Clang
+ eapply -p1 "${FILESDIR}"/gcc-10.3.0-clang-bootstrap.patch
+ fi
+
+ if [[ ${CHOST} == powerpc*-darwin* ]] ; then
+ # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=44107
+ sed -i -e 's|^ifeq (/usr/lib,|ifneq (/usr/lib,|' \
+ libgcc/config/t-slibgcc-darwin || die
+ fi
+
+ # up macosx-version-min from 10.4 to 10.6 on Catalina, bug #767415
+ if [[ ${CHOST} == *-darwin19 ]] ; then
+ sed -i -e 's/=10.4/=10.6/' libgcc/config/t-darwin || die
+ fi
+
+ find . -name "configure" | xargs \
+ sed -i -e '/^\s*10\.\*)/N' \
+ -e '/^\s*10\.\*)\s*_lt_dar_allow_undefined/s/10\.\*/10.*|11.*/' || die
+
+ # fix interoperation with Xcode 12.5, bug #799170
+ eapply -p1 "${FILESDIR}"/${PN}-10.2.0-xcode-12.5.patch
+}
+
+src_configure() {
+ local myconf=()
+ case ${CTARGET}:" ${USE} " in
+ powerpc*-darwin*)
+ # bug #381179
+ filter-flags "-mcpu=*" "-mtune=*"
+ # bug #657522
+ # A bug in configure checks whether -no-pie works, but the
+ # compiler doesn't pass -no-pie onto the linker if -fno-PIE
+ # isn't passed, so the configure check always finds -no-pie
+ # is accepted. (Likewise, when -fno-PIE is passed, the
+ # compiler passes -no_pie onto the linker.)
+ # Since our linker doesn't grok this, avoid above checks to
+ # be run
+ # NOTE: later ld64 does grok -no_pie, not -no-pie (as checked)
+ export gcc_cv_c_no_fpie=no
+ export gcc_cv_no_pie=no
+ ;;
+ *-darwin20)
+ # use sysroot with the linker, #756160
+ export gcc_cv_ld_sysroot=yes
+ ;;
+ *-solaris*)
+ # todo: some magic for native vs. GNU linking?
+ myconf+=( --with-gnu-ld --with-gnu-as --enable-largefile )
+ # Solaris 11 defines this in its headers, but that causes a
+ # mismatch whilst compiling, bug #657514
+ export ac_cv_func_aligned_alloc=no
+ export ac_cv_func_memalign=no
+ export ac_cv_func_posix_memalign=no
+ ;;
+ i[34567]86-*-linux*:*" prefix "*)
+ # to allow the linux-x86-on-amd64.patch become useful, we need
+ # to enable multilib, even if there is just one multilib option.
+ myconf+=( --enable-multilib )
+ if [[ ${CBUILD:-${CHOST}} == "${CHOST}" ]]; then
+ # we might be on x86_64-linux, but don't do cross-compile, so
+ # tell the host-compiler to really create 32bits (for stage1)
+ # (real x86-linux-gcc also accept -m32).
+ append-flags -m32
+ fi
+ ;;
+ esac
+
+ # Since GCC 4.1.2 some non-posix (?) /bin/sh compatible code is used, at
+ # least on Solaris, and AIX /bin/sh is way too slow,
+ # so force it to use $BASH (that portage uses) - it can't be EPREFIX
+ # in case that doesn't exist yet
+ export CONFIG_SHELL="${CONFIG_SHELL:-${BASH}}"
+ toolchain_src_configure "${myconf[@]}"
+}
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [gentoo-commits] repo/proj/prefix:master commit in: sys-devel/gcc/files/, sys-devel/gcc/
@ 2022-06-06 16:51 Fabian Groffen
0 siblings, 0 replies; 8+ messages in thread
From: Fabian Groffen @ 2022-06-06 16:51 UTC (permalink / raw
To: gentoo-commits
commit: e5f9d97f02ef1b61fcee819e86130b081ef2c378
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Mon Jun 6 16:49:11 2022 +0000
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Mon Jun 6 16:49:11 2022 +0000
URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=e5f9d97f
sys-devel/gcc: cleanup and add 12.1.0 for Apple M1
Cleanup old versions, no longer supported by toolchain.eclass. For
bootstraps where no C++ compiler is available, we'll have to manually
bootstrap a compiler in stage1.
gcc-12.1.0 is "hybrid", it uses normal sources by default (tested on
x64-solaris), and uses M1-capable sources (Ian) on Darwin targets
(tested on x64-macos).
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>
sys-devel/gcc/Manifest | 35 +----
.../gcc/files/gcc-12-no-libs-for-startfile.patch | 15 +++
.../gcc/files/gcc-12-prefix-search-dirs.patch | 37 ++++++
sys-devel/gcc/gcc-11_pre20200206.ebuild | 108 ----------------
...gcc-11_pre20210226.ebuild => gcc-12.1.0.ebuild} | 66 +++++-----
sys-devel/gcc/gcc-4.1.2.ebuild | 68 ----------
sys-devel/gcc/gcc-4.2.4-r2.ebuild | 137 --------------------
sys-devel/gcc/gcc-4.7.3-r1.ebuild | 143 ---------------------
sys-devel/gcc/gcc-4.8.5-r1.ebuild | 106 ---------------
sys-devel/gcc/gcc-4.9.4.ebuild | 103 ---------------
sys-devel/gcc/gcc-5.4.0-r4.ebuild | 105 ---------------
sys-devel/gcc/gcc-7.4.0.ebuild | 92 -------------
sys-devel/gcc/gcc-8.3.0.ebuild | 4 +-
sys-devel/gcc/gcc-9.2.0-r3.ebuild | 4 +-
sys-devel/gcc/metadata.xml | 72 +++++------
15 files changed, 128 insertions(+), 967 deletions(-)
diff --git a/sys-devel/gcc/Manifest b/sys-devel/gcc/Manifest
index c2eb112112..bc6c8f741c 100644
--- a/sys-devel/gcc/Manifest
+++ b/sys-devel/gcc/Manifest
@@ -1,42 +1,15 @@
-DIST ecj-4.5.jar 1470676 BLAKE2B 793c10ba09fd8040c0e1181204141aea16780c9c9088e07126e00da2b510af2ad6f58d876357d7e98cbb02d783a3be434469d5de1df134ccb8cc508e45028d80 SHA512 d4e1bf7538ace56e3d69fa91da5bbd16c272923b4de0a9d8dee23ea2b75f9f38c603de72fc4061df49285c450b63f3df211cee5270e9fffc5447445d1a9c9e4e
DIST gcc-10.2.0-patches-6.tar.bz2 24103 BLAKE2B f719012f86136ad9c4ea1397548caca6e69687534599a88cc25fe0e4f83dd7fd34c07375fa6e612e2b430e078c1a59913160cce07312e94fa1ce575a33e5457b SHA512 61d97dba29024c7a22806689ebf33f5cb9ce099230bcc344f2865b976c3fdfd8ebec5962eaffd0156de75eca58499ba785867bd4a4ac92c6f799ab1bee8844a1
DIST gcc-10.2.0.tar.xz 75004144 BLAKE2B 1d79397330354e61439283cac96a109bf78ffc726265442e6d3ec131f107589ab7349d6612836edd8c8512f7bcc1d901a65a0d5d925d28a5bf3ef5cc3f9787ee SHA512 42ae38928bd2e8183af445da34220964eb690b675b1892bbeb7cd5bb62be499011ec9a93397dba5e2fb681afadfc6f2767d03b9035b44ba9be807187ae6dc65e
DIST gcc-10.3.0-patches-3.tar.bz2 18935 BLAKE2B 13eaf1e055b5b63069aed1575ed93f6bc822b5e3f2181ddfc88f4e7ff801f58997cd131b2efd79b90469b1f861db994feb2adcaecacf165442078f76e233fd9a SHA512 c3d6a6f32863cc0ff7c877314ff0c00a892e473f64d16b82d46b4a77aa97c3e7a575492d27f0d423acb2621c86c9a49bca0e26e45bda9e697495444fcac85084
DIST gcc-10.3.0.tar.xz 76692288 BLAKE2B ac7898f5eb8a7c5f151a526d1bb38913a68b50a65e4d010ac09fa20b6c801c671c790d780f23ccb8e4ecdfc686f4aa588082ccc9eb5c80c7b0e30788f824c1eb SHA512 2b2dd7453d48a398c29eaebd1422b70341001b8c90a62aee51e83344e7fdd8a8e45f82a4a9165bd7edc76dada912c932f4b6632c5636760fec4c5d7e402b3f86
-DIST gcc-11.0.0-patches-6.tar.bz2 12744 BLAKE2B 05e8d8b87cd1069bc6c03a6cbd61e5414148b7c6467e5b2ebf03af1493075280d8f1a5a123148f786724e3f813ef7fbb5f2728598ab4ab7879b4e649f592156b SHA512 9e873a40eca07e471a9832ed062575063144554ca306b60a9b5f7da61fa1f148a13fd5ea933c852d105931e452de1c6ab3cd7baf4f80da17b9d81eeb36c5b3fd
DIST gcc-11.2.0-patches-1.tar.bz2 11537 BLAKE2B 9dd791ada244c9b70b8b99f9f305a688c248134715ed1b26d406e53b114983faae6873cdc521497164388d24d5f61c199e98df146bc02f5578e877295bcf5c82 SHA512 6539efc60c656d0798a5896dc1b944ed69914b815102c7a1c10bdba4ef935abd326b01309f38316e121f1ed90ceb2abcaf65df6af116892daad829ac2623cefc
DIST gcc-11.2.0.tar.xz 80888824 BLAKE2B 69b61234ac436edfea2933df68c434a2ce7aa4454ef4da573e82587e1a42dc420189e949cfdadaf4cb37fc0de9674822210a95b77ff03aca0dbedfe67df19cc6 SHA512 d53a0a966230895c54f01aea38696f818817b505f1e2bfa65e508753fcd01b2aedb4a61434f41f3a2ddbbd9f41384b96153c684ded3f0fa97c82758d9de5c7cf
-DIST gcc-4.1.2-patches-1.5.tar.bz2 53576 BLAKE2B 16dcbf8bac85c3e95a8526ffd504f298ac09fbd79d8ee9f633782ffcd177eb0de256dc8ff36d45dc40dd8582b712e2ea0cd3b2063e3205d51cc022ad7befa7cc SHA512 3c7c15f740ec80aaa6f9c1ad77daeb2a2527f1719fbcc5d96d956e1fe1f24da961b1b030cf2bb631f1a0cc970f6462823e9a78441c9fd6b57f3645b04cd6a362
-DIST gcc-4.1.2-uclibc-patches-1.0.tar.bz2 20980 BLAKE2B cfc7dd4c7a0b1ed80c491d4ad56b05b05ff308fdbed2faa1b9f15b10c0f7834ee4ffcb0df1619f959f7a1a5f315305b550665c232404a8a3306e3e615539a0c8 SHA512 57789f4236a3085136afa83be3cef677bd813afd258d67bfdbecd2058f497cd459366d5515044c0208ab753946dc951dac6a3889752ca6dae836d837c22ce33b
-DIST gcc-4.1.2.tar.bz2 39707720 BLAKE2B 966b6a64c118456c7fb66eb2ad0dd84b1d53ad88dcbd146f446ef097a6975f5d6a7f1bcbbc4bfcd4e48b00eeb8054728e412db3d9818cff1f195e37859a4e510 SHA512 b97d3b72a3b0355611d5090b2c715b7a774f0e466a89326a0226c2809d12dfafb2d7c5a7af54bd5e00c135bbb6596f535e1a484740f7f1f691e8a57e6f0425cc
-DIST gcc-4.2.4-patches-1.3.tar.bz2 24723 BLAKE2B 55b9d4f1ca80327f14fff35d6184e915502ea248bb2aae823e749c88a20c680b20ce3dada732c699b1ece9dbeb5a6bc7f5b610a074c924736bd9e5983de06c7d SHA512 fc1ad5debf0ba6a755758ff4e2e1b41f3ac753b4a9c600c1525ac99a8f204c511257ee57fa287ff8296fe563859c931f8d5ca252f85656dcf7436571c1c87a06
-DIST gcc-4.2.4-uclibc-patches-1.0.tar.bz2 19167 BLAKE2B bf2bcc9ece9096cf7fda9999c56073774072fa03e5dbf389a617888b2269bc79a7cfb68a6e26da66dedce9f954a1766ed21bbdd907b747e9fb5ea3a0fbbb6474 SHA512 5545cfe6bfa7ab9a69a474cc051cc8744380077dcc193afefeb455e959e408a5e4dfd1adde5357886c7f598835400273ef80ad5c14976c0552b44f5cd48704ed
-DIST gcc-4.2.4.tar.bz2 44025458 BLAKE2B 1d9645298dbbb1aba7b2957acf5b9839bd702a85120aa82d4cada0e4ea68a1d633422d8fcedc405504768e2f932e4b9d1a70a86da0b8efa5fc923b786ebc259f SHA512 c6e3e4fce1d27d0c56ab24f4809367d9329b620b7c124e88de190f2ea2ae57b5e06d0bda85c5a74237a4f94ddba53dc91faea0611fff7b19ad720edc312cb0d9
-DIST gcc-4.4.3-specs-0.2.0.tar.bz2 2004 BLAKE2B 96f5ba2028bc6e0ef71e009857c37118a54d13d30de24d697c85e5772f9f2b7853615648cf2e4ee81d8385f6518c64588c0b56675c00f95ef39fca2a808f075e SHA512 779ecb0a064d2138b54569c8ae501975b8a6b72e5a3acbf8597619a8db77ee42ef9b0e62608d5192a15e4393e7dfc009bb50b994782236faa744b2c46b5fe517
-DIST gcc-4.7.3-patches-1.4.tar.bz2 43148 BLAKE2B 9b7472c799a8fddd59f0e18d638aa97def9049e3a0acc84712337b231a0dcad947ac41302e29b3e4e9d1197e41629a5c198ce102cf508ab0a4efb23276a788e7 SHA512 6dfc5b405e2eca70642f42974d7d3183ff8f0eed3e9f29fbf197e8959bc1795a1ba54df99e4f73df1017332f46bdf3d1c10d4b0f89fea71d604dd5ebda488c22
-DIST gcc-4.7.3-piepatches-v0.5.5.tar.bz2 15378 BLAKE2B 94c026b5878c59d9c50ae61285b0b1d6e9fd02b9aebe1f92996e6c4475626a1bd7beb37582e99eb624fd9a8a8354ae293c86feb40a9169f729fd38f332fc8a06 SHA512 d0189d2e4049d471dedaddcba319fe2c2b29855f7b33e84b26051504ead2936c852ef7870a1d19d755bb343c9b121b0ce5295665ab4ff1e448436bd448c08e1f
-DIST gcc-4.7.3-uclibc-patches-1.0.tar.bz2 3013 BLAKE2B 73389fcedfe6209d67551bc768922ff7090d817020ac2d4e62b40fc8a167569e2dd2f17ab76870b0e3f117486afd07ce724fd043c680d67de5dad715ca76d536 SHA512 6119159300e76be87732f2a44b1a9388228235d7832370dbae531c2c96694ea42ed4c75acf7abca98ec0035fbc50a8bf84225574505358c2739e64b0f3fd6a95
-DIST gcc-4.7.3.tar.bz2 82904224 BLAKE2B 084a21a317de5ccddf480e429f95d13f6c0c3a0102c38692aff0283b280aaeaf874e602a12341418a100566159bb54a14a3deb0a9c8604388ea08aac9e484f93 SHA512 5671a2dd3b6ac0d23f305cb11a796aebd823c1462b873136b412e660966143f4e07439bd8926c1443b78442beb6ae370ef91d819ec615920294875b722b7b0bd
-DIST gcc-4.8.5-patches-1.3.tar.bz2 26025 BLAKE2B 3744dfcac069b5f8321fc9cfb019d44c848d70d17e5908d3d97f0c314b98a7fd884235fec2b21c93027f6152577439f6d424f96836b113dcd589604af969c756 SHA512 8d190f81ca0d25281250dbf0a670fcf12334b0811a5bf664e6450942a2996d02b979c6e8f8760b287edad06df3d1f8e2fe5cb0c3dcf9677c3420457d841d9506
-DIST gcc-4.8.5-piepatches-v0.6.2.tar.bz2 14265 BLAKE2B b3bb37957ba8ee446967a3a60fee61c26a49f237241bbaf8bb3c3ec63656dd0492f518b129c8ef43cc06091742bc9c0b1042bb612c1110732b1e9608f28753ad SHA512 cd6af4047d4719dae9dbe86ce5342c7d8ddec38aad032486713b08e1b0cb711f5ca017e08d583137d51b8d4ef673366ba310e71bca7b49b82e9314781d6e9d99
-DIST gcc-4.8.5-uclibc-patches-1.0.tar.bz2 2976 BLAKE2B 1a804fd0b2fd5756e824f3eb511cf62d6af0fa8059ebcffadf6deb85e242ec8728b7883f2e054b465b87e4b61b6a2b55061a68eb8329c3a79a659d4c15808d21 SHA512 5469128eab06525915c75241797ad9ec4b63072ebfd5e110319bf810633cf3fbed39bbda4f6a0c74e537b248e7642780ecbe2086ad10be6e66b7dd289fa6534f
-DIST gcc-4.8.5.tar.bz2 86165587 BLAKE2B 760931013f96083078e74b8376eede6c23954e1f41cb44dbbdd8220fdede48807d89b9ca44fc4ae309f7cef441831b533512f1145cd563c5c797e96cf6cf1bfa SHA512 47fdfeca0c0a624cdec9c4ae47137d056c918d5c386d4b96985bb3c8172aba377cb66cbcc30e80832fd244a7d98f562c20198056915c70cfef0977545073a8ea
-DIST gcc-4.9.4-patches-1.3.tar.bz2 26060 BLAKE2B a61cb29111e8a9e35d810c0c557e901fc0d78e3b62027f5ea622d29becff9492e350c932824b23e5a38604bc3fa6c39fed9db902df4f830a3a362f1a1c2d9f58 SHA512 0214da6712a1b583f028be60e562f742d3d484d930976e2fce7be090113517c0e07faa20f750411b5125902f38a9944fe0c1dc8605d161c5bb11843acdebab75
-DIST gcc-4.9.4-piepatches-v0.6.4.tar.bz2 14414 BLAKE2B 2eccd4f2a164fbb32d13c7fe91627a2424c0a5570fe0cac97c2bb1c95294ba3d770832da7c445f75c91791466c5139a1e13753a3a40d87ff5e44e42749adee27 SHA512 243fa272ea0e49f700a76508bab3e03bbb353bcb930581b2f87f9a47df5cd3880e29f20b71612b21190adc463849e1e6ac2a38a49c0002b562d93d436f538285
-DIST gcc-4.9.4-uclibc-patches-1.0.tar.bz2 2618 BLAKE2B bff85a4088fb94fdb7a8b0bd552be98ace3e6d145889b6f8b4a1f2db2dad14342d155890ab159b42d5b55d88dfb7c392eb7f92590084e1958f6284c561da30f1 SHA512 5a1f44caa9261f4947101379628143869b31dec67fa28605e8e1f3894d4b7120c3f68ba6deb59da7a74fa906e27ab32cd3767761837dc3dfebc37865d349d6db
-DIST gcc-4.9.4.tar.bz2 90097606 BLAKE2B 373ff939ea72d6c4a7f3ab899b852b4c919481af2cfe3291281d9354c58a270d2eba73a0f301d90840dfabf423c82b368e113df7a2cb6cc28b2a703b0b6eb585 SHA512 93abb78e16277454f41a8e9810f41f66c0fdffdc539a762ff6b67d3037f78db971378683fd2ebf707d1d51c059fad2161fe42d110c330027f40214b7db0f3efe
-DIST gcc-5.4.0-patches-1.8.tar.bz2 32886 BLAKE2B 85879ba552ff21e198de568b2a1f2544d6cf542174af3ca571e41a504373bbc8912a87177a413883f194d909237eeeaf65366e6b93c2b917f803b3edd10bbff5 SHA512 10c1102a37d9d485665cca606318a1da6eec2188998d340b91a371c9defa6fae285619f9cadad2546de0b7f1068e9eaf653714462d3331db3197308799927a6b
-DIST gcc-5.4.0-piepatches-v0.6.5.tar.bz2 14551 BLAKE2B 6f3de9be0990a7580785821d8c85114a1907571c06bdf3a15ad91258f7c9e8bb6a4d2ddb8615f33bedf0ad036d215507e004fc095f788e40c824ae0ab3ffbb05 SHA512 4890f0713d261982ab81a20f93c5f65193aa1dfa171e3f9e5867f0b80ec7c1e76c5a997b1a4e6f47f8ce36af54ac91125c5bff8bf6d971b7d77c65a57a40a3c0
-DIST gcc-5.4.0-uclibc-patches-1.0.tar.bz2 3731 BLAKE2B fa436d1c1d9c150714092132f816740f8218dfeb4f9a6a8c830ea54d211a020f209e6fd1fcc313b2560b82c7855120053d346af72b7c12c88a7a948379dd2356 SHA512 009f34197e79c5e8c6497a0db01ac45cc657e92e56a663b4f3281661d108b2a129cd977fab5f0064f225d6812ae91e82bab22a2b10ae02c486881eeed85ec7a3
-DIST gcc-5.4.0.tar.bz2 95661481 BLAKE2B bf882acfa28cc1064cddd21e25332fff6bc65505d6af9acb2e455916edbc4f6b1de9b3524867f51d7819fc4f213ce21332fbf67cf71cd6c7b96fb8907e51d570 SHA512 2941cc950c8f2409a314df497631f9b0266211aa74746c1839c46e04f1c7c299afe2528d1ef16ea39def408a644ba48f97519ec7a7dd37d260c3e9423514265b
-DIST gcc-7.4.0-patches-1.1.tar.bz2 8778 BLAKE2B 52b02b3c619b99912ee254599788abebe3963cf85e49b56166069318e340a8e271d767e82798e6062fc2a042a86a88da66ab95f2d9e42933ff17688d616a903f SHA512 02ec2eb2460e24cf46f7a04ca3b80ca120719389a54a740070e991d9c96b6fd55d1fa04eb4249fd3043edc9c0f6519b5babcce76036cd0146183512aaae2d573
-DIST gcc-7.4.0.tar.xz 62601888 BLAKE2B df91ec680d5389736d3a37a2d85cf2e12fbe87b642fdf4b332e67a043e00944aca00243cc6709f86abd92115cb5a78502146636395571d1ea4899531e15d5d0e SHA512 8864d8e4b97c2e1a4f17422f6e68120172ebefeab97b1757734f7185ca68a6b9a89011c6833c03fa454c17b0ac35b15e1d284881e6971035948ac6100f3aa45e
+DIST gcc-12.1-darwin-r0.tar.gz 131006433 BLAKE2B fe94275821772586b90d003e5179a72c5662216d216db6b7fd066df8873744d5edff25521f3f30cb08d45f59545fa03e44364bdf831998a0285c0ba5df0c1547 SHA512 8bfae411e8f6f853ad50cda4f7bd672217883b305893c8dda9f630d712d8ef0857e89c8f4ce6c446340041d8da2ec98e6dfcc99861e844eb99c6f837e4f47dbb
+DIST gcc-12.1.0-musl-patches-4.tar.bz2 4818 BLAKE2B 56ba1c14cb911bad6b0afd4d03c28d95762e781285db98a5b27db18a5dd47f23ef4987ae557bd3e95004f15159495ffd992b9775110c1d8f284e25b81abd05a5 SHA512 517e2a4b16e8d7b3bb7ce4d06d4006c0488161cbd878b8bffc8c55e244bccd2cc865f8128912b7d086ef12c73d173bc61cb80682f4d06ae01466769f0f8dd41d
+DIST gcc-12.1.0-patches-7.tar.bz2 12049 BLAKE2B 85a67187a78194aaaab5a7cdbe953309ece37036f20bcc793d3cddacad5902d38f0bd1d3417de867624e282b4389d7476ef174909aafc64e1e5c8e073980bf71 SHA512 14bfbe616cd25456b05ce68daa4458d5f3ede6e50232b49ddb01c30494f8862c230d4a16402f298857e143102b9ff1a208db5c58fff0c0acc65cf3ff68c98cdc
+DIST gcc-12.1.0.tar.xz 82701928 BLAKE2B dca5df8fea680dbeda721742cce5c97de7eb4be490a32a158e06b88e2b9dd092150b7cfe490bb69e48e2f75d8bba231c8a54cd46b48ddcdc01bf9553ab57019d SHA512 2121d295292814a6761edf1fba08c5f633ebe16f52b80e7b73a91050e71e1d2ed98bf17eebad263e191879561c02b48906c53faa4c4670c486a26fc75df23900
DIST gcc-8.3.0-patches-1.0.tar.bz2 12278 BLAKE2B 793465c5de0af850c7f3017b3011e68f3bd1664e6ce3500a3dc3003d37c03fe81857698957770a135eadd395a7767fa804d354ecdcdeb1d83623280ca569d4ec SHA512 0efadd2481713992807fed2683666f1094b3757674754601c079569f3ef70cd7aed3cefc9f815f4e59a21d37e4e940c122df714e16f3878a5f966450c4273669
DIST gcc-8.3.0.tar.xz 63694700 BLAKE2B 71df2ff5bd6874d57519c2e9af6b22152c8c4d7fab906a5f427b41bc4e8e742127592a8684120d9d3c9ce6241439531850be08ec0a4f29dbfdee95435655fdca SHA512 1811337ae3add9680cec64968a2509d085b6dc5b6783fc1e8c295e3e47416196fd1a3ad8dfe7e10be2276b4f62c357659ce2902f239f60a8648548231b4b5802
DIST gcc-9.2.0-patches-4.tar.bz2 21655 BLAKE2B 2acf6d83ec934a65e77d2079a024b42622e1234f0516f12839f7d03c2f3e1bb275037b020e35ba847d6809d5577ba966619c78345b75355df0a754d02ccf9819 SHA512 114e01a7b08ecb1feab24ef3cfc72c8953748f1526722b80c18602025eef132e2b4c05db59c7a23eb2e7f42ed48eb02d92bcd73b1ca932374d6bedaf89cc66d0
DIST gcc-9.2.0.tar.xz 70607648 BLAKE2B 41a5e148f9a6857d6599679964c203533f76f330ad527fbe7c5e746d78f6f6f6d6d0f330a67cb1e794e155be8d1cd6e986bcc8a116d620dca410b78f0bcdd453 SHA512 a12dff52af876aee0fd89a8d09cdc455f35ec46845e154023202392adc164848faf8ee881b59b681b696e27c69fd143a214014db4214db62f9891a1c8365c040
DIST gcc-cygwinports-0de6b2ae6b6577eb0891a7ca8d551bdfa79bf5e8.tar.gz 20183 BLAKE2B dc9a4c78f98851ed77720d4c06d3fbf9f2d7d0e81a825cc89026994060fd29214f111fd3a52cec6518417cab2be89caf4a844a0869136287f174147ca7a6ebf3 SHA512 d01ee85a1327e7f6f16b3c2de6659699764f365215bd3e58247c5c65594153b9232bdc43ff89420cac75ad908ed39c7ff9fa4006818f5dd209b792d34d9ae7de
-DIST gcc-cygwinports-11fa2eec213324d64673ad41358f726f6523667f.tar.gz 23047 BLAKE2B 83e44a2eed9e134ea2531e3ecff4479f4d305a55d14729ed11c91199c1f56ec7e2d4df48d56de11ba43a9e936019943edc370a04a26f6b3bfd5616230feeffa5 SHA512 f8cbf3b2b20c1950d0984fe672536d92f7d05b065495d93205d72b7578e696847f074430c6e642668d1c0c26fa9d98a4dfd3fce7030d45f2d04f80499437587c
-DIST gcc-cygwinports-f44d762eb3551ea0d81aa8e4b428bcb7caabb628.tar.gz 32780 BLAKE2B 364353bf379a2a950050148caf2cef86239f2418a98f72b3edec4cf56e43e7d07601f4d1ca8103c691ddddff0fca96a6a8c728e2e50bca373c34441bdc7505be SHA512 d5bc37965745fa32a3ddd357e658bd066d4aadf19eee7a30047f4dc6f47450d320e33cbbe4bf22fa6f5e30f7f41ec6ec3a250df56760a38df0f14fea3e34a83e
-DIST gcc-pre11-apple-si-a172e87.tar.gz 125440972 BLAKE2B 45477b580b9637abbb1d5182bf5821b3acff4ad71c13be508e598df666fdc3621c44b234e7ca18ff0f82236b5a7a05901d790a42e671b7152e2605ccdf6766ed SHA512 52ce4d88a6c471e193ec11003af336bcd608088bd0e6268ad6f51db89749404be8087a7088bad21482b34739bbcc650aeb997837a7aed640649bd076258016a9
-DIST gcc-pre11-apple-si-f1bedb9.tar.gz 124531876 BLAKE2B b7450b5b3cafce9f92e4f793439d767193aa609f924ae8a8d07dc353d9e64c6d2881252706ffec93ff91c1a3970a8688a3d9454b880e5d7587795ad284790fe7 SHA512 2cc21803e9236db234f31584aaabb503b7a9612b82ac54fac389aeb19c4e36d70f60e3660f63e35462f8a494862c88951f4d6434fad7e4dafc0f5a041e906b28
diff --git a/sys-devel/gcc/files/gcc-12-no-libs-for-startfile.patch b/sys-devel/gcc/files/gcc-12-no-libs-for-startfile.patch
new file mode 100644
index 0000000000..8cc59a6ea3
--- /dev/null
+++ b/sys-devel/gcc/files/gcc-12-no-libs-for-startfile.patch
@@ -0,0 +1,15 @@
+* do not generate multilib paths, since adding those dirs, e.g.
+ /usr/lib/amd64 or /usr/lib64, screws up Prefix badly (in %D)
+ see also: http://article.gmane.org/gmane.linux.gentoo.alt/3575
+
+--- a/gcc/gcc.cc
++++ b/gcc/gcc.cc
+@@ -4740,7 +4740,7 @@
+ #endif
+ info.separate_options = false;
+
+- for_each_path (&startfile_prefixes, true, 0, spec_path, &info);
++ for_each_path (&startfile_prefixes, false, 0, spec_path, &info);
+ }
+ break;
+
diff --git a/sys-devel/gcc/files/gcc-12-prefix-search-dirs.patch b/sys-devel/gcc/files/gcc-12-prefix-search-dirs.patch
new file mode 100644
index 0000000000..2e733472c0
--- /dev/null
+++ b/sys-devel/gcc/files/gcc-12-prefix-search-dirs.patch
@@ -0,0 +1,37 @@
+--- a/gcc/gcc.cc
++++ b/gcc/gcc.cc
+@@ -2691,6 +2691,34 @@
+ {
+ struct add_to_obstack_info *info = (struct add_to_obstack_info *) data;
+
++#if DISABLE_MULTILIB
++ /*
++ * Fix multilib paths for our prefix, that is alter lib64 and lib32 to lib.
++ * No allocation needed, since the path won't grow but only shrink by two
++ * chars. We should not modify host multilib dirs, otherwise libs might not
++ * be found in /lib64 or /usr/lib64
++ */
++ int elen = strlen(STANDARD_EXEC_PREFIX);
++ if (elen && strncmp(path, STANDARD_EXEC_PREFIX, elen) == 0) {
++ /* multilib dirs are put at the end like ../lib32/ ../lib64/ */
++ static char const *mdirs[] = { "../lib64/", "../lib32/" };
++ int plen = strlen(path);
++ unsigned int idx;
++ int mlen;
++
++ /* For each path replace the multilib dir at the end of the path. */
++ for (idx = 0; idx < (sizeof(mdirs) / sizeof(mdirs[0])); idx++) {
++ mlen = strlen(mdirs[idx]);
++ if (strncmp(path + plen - mlen, mdirs[idx], mlen) == 0) {
++ /* Overwrite the part with null-termination. In prefix the only multilib
++ occurence is the one added by gcc so we can end here. */
++ strcpy(path + plen - mlen, "../lib/");
++ break;
++ }
++ }
++ }
++#endif
++
+ if (info->check_dir && !is_directory (path, false))
+ return NULL;
+
diff --git a/sys-devel/gcc/gcc-11_pre20200206.ebuild b/sys-devel/gcc/gcc-11_pre20200206.ebuild
deleted file mode 100644
index e1bfc2eb77..0000000000
--- a/sys-devel/gcc/gcc-11_pre20200206.ebuild
+++ /dev/null
@@ -1,108 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-
-GCC_TARBALL_SRC_URI="https://dev.gentoo.org/~grobian/distfiles/gcc-pre11-apple-si-f1bedb9.tar.gz"
-PATCH_GCC_VER="11.0.0"
-PATCH_VER="6"
-TOOLCHAIN_GCC_PV=11.0.0
-
-inherit toolchain
-
-#KEYWORDS="~ppc-macos ~x64-macos"
-
-RDEPEND=""
-BDEPEND="
- kernel_linux? ( ${CATEGORY}/binutils )
- kernel_Darwin? (
- || ( ${CATEGORY}/binutils-apple ${CATEGORY}/native-cctools )
- )"
-
-S="${WORKDIR}"/gcc-darwin-arm64-master-wip-apple-si
-
-src_prepare() {
- has_version '>=sys-libs/glibc-2.32-r1' && rm -v "${WORKDIR}/patch/23_all_disable-riscv32-ABIs.patch"
- toolchain_src_prepare
-
- if use elibc_Cygwin; then
- sed -e '/0001-share-mingw-fset-stack-executable-with-cygwin.patch/d' \
- -i "${WORKDIR}/gcc-${CYGWINPORTS_GITREV}/gcc.cygport" || die
- fi
-
- # make sure 64-bits native targets don't screw up the linker paths
- eapply -p0 "${FILESDIR}"/no-libs-for-startfile.patch
- if use prefix; then
- eapply -p0 "${FILESDIR}"/4.5.2/prefix-search-dirs.patch
- # try /usr/lib32 in 32bit profile on x86_64-linux (needs
- # --enable-multilib), but this does make sense in prefix only
- eapply -p0 "${FILESDIR}"/${PN}-4.8.3-linux-x86-on-amd64.patch
- fi
-
- # make it have correct install_names on Darwin
- eapply -p1 "${FILESDIR}"/4.3.3/darwin-libgcc_s-installname.patch
-
- if [[ ${CHOST} == powerpc*-darwin* ]] ; then
- # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=44107
- sed -i -e 's|^ifeq (/usr/lib,|ifneq (/usr/lib,|' \
- libgcc/config/t-slibgcc-darwin || die
- fi
-
- # fixup a what seems to be a typo, we need this at least to finish
- # compilation on arm64-macos during bootstrap as gmp.h else won't be
- # found
- sed -i -e 's/ALL_SPPFLAGS/ALL_CPPFLAGS/' \
- gcc/config/aarch64/t-aarch64 || die
-}
-
-src_configure() {
- local myconf=()
- case ${CTARGET}:" ${USE} " in
- powerpc*-darwin*)
- # bug #381179
- filter-flags "-mcpu=*" "-mtune=*"
- # bug #657522
- # A bug in configure checks whether -no-pie works, but the
- # compiler doesn't pass -no-pie onto the linker if -fno-PIE
- # isn't passed, so the configure check always finds -no-pie
- # is accepted. (Likewise, when -fno-PIE is passed, the
- # compiler passes -no_pie onto the linker.)
- # Since our linker doesn't grok this, avoid above checks to
- # be run
- # NOTE: later ld64 does grok -no_pie, not -no-pie (as checked)
- export gcc_cv_c_no_fpie=no
- export gcc_cv_no_pie=no
- ;;
- *-darwin20)
- # use sysroot with the linker, #756160
- export gcc_cv_ld_sysroot=yes
- ;;
- *-solaris*)
- # todo: some magic for native vs. GNU linking?
- myconf+=( --with-gnu-ld --with-gnu-as --enable-largefile )
- # Solaris 11 defines this in its headers, but that causes a
- # mismatch whilst compiling, bug #657514
- export ac_cv_func_aligned_alloc=no
- export ac_cv_func_memalign=no
- export ac_cv_func_posix_memalign=no
- ;;
- i[34567]86-*-linux*:*" prefix "*)
- # to allow the linux-x86-on-amd64.patch become useful, we need
- # to enable multilib, even if there is just one multilib option.
- myconf+=( --enable-multilib )
- if [[ ${CBUILD:-${CHOST}} == "${CHOST}" ]]; then
- # we might be on x86_64-linux, but don't do cross-compile, so
- # tell the host-compiler to really create 32bits (for stage1)
- # (real x86-linux-gcc also accept -m32).
- append-flags -m32
- fi
- ;;
- esac
-
- # Since GCC 4.1.2 some non-posix (?) /bin/sh compatible code is used, at
- # least on Solaris, and AIX /bin/sh is way too slow,
- # so force it to use $BASH (that portage uses) - it can't be EPREFIX
- # in case that doesn't exist yet
- export CONFIG_SHELL="${CONFIG_SHELL:-${BASH}}"
- toolchain_src_configure "${myconf[@]}"
-}
diff --git a/sys-devel/gcc/gcc-11_pre20210226.ebuild b/sys-devel/gcc/gcc-12.1.0.ebuild
similarity index 66%
rename from sys-devel/gcc/gcc-11_pre20210226.ebuild
rename to sys-devel/gcc/gcc-12.1.0.ebuild
index 3aa29c8610..5270c920df 100644
--- a/sys-devel/gcc/gcc-11_pre20210226.ebuild
+++ b/sys-devel/gcc/gcc-12.1.0.ebuild
@@ -1,39 +1,50 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI="7"
+EAPI=7
-GCC_TARBALL_SRC_URI="https://dev.gentoo.org/~grobian/distfiles/gcc-pre11-apple-si-a172e87.tar.gz"
-PATCH_GCC_VER="11.0.0"
-PATCH_VER="6"
-TOOLCHAIN_GCC_PV=11.0.1
+TOOLCHAIN_PATCH_DEV="sam"
+PATCH_VER="7"
+PATCH_GCC_VER="12.1.0"
+MUSL_VER="4"
+MUSL_GCC_VER="12.1.0"
inherit toolchain
-#KEYWORDS="~ppc-macos ~x64-macos"
+# Don't keyword live ebuilds
+if ! tc_is_live && [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then
+ KEYWORDS="~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+fi
-RDEPEND=""
-BDEPEND="
- kernel_linux? ( ${CATEGORY}/binutils )
- kernel_Darwin? (
- || ( ${CATEGORY}/binutils-apple ${CATEGORY}/native-cctools )
- )"
+# use alternate source for Apple M1 (also works for x86_64)
+IANSGCCVER="gcc-12.1-darwin-r0"
+SRC_URI+=" elibc_Darwin? (
+https://github.com/iains/gcc-12-branch/archive/refs/tags/${IANSGCCVER}.tar.gz )"
-S="${WORKDIR}"/gcc-darwin-arm64-master-wip-apple-si
+# 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
+RDEPEND="elibc_glibc? ( sys-libs/glibc[cet(-)?] )"
+DEPEND="${RDEPEND}"
+BDEPEND=">=${CATEGORY}/binutils-2.30[cet(-)?]"
+
+src_unpack() {
+ if use elibc_Darwin ; then
+ # just use Ian's source, not the main one
+ S="${WORKDIR}/gcc-12-branch-${IANSGCCVER}"
+ fi
+ default
+}
src_prepare() {
- has_version '>=sys-libs/glibc-2.32-r1' && rm -v "${WORKDIR}/patch/23_all_disable-riscv32-ABIs.patch"
toolchain_src_prepare
- if use elibc_Cygwin; then
- sed -e '/0001-share-mingw-fset-stack-executable-with-cygwin.patch/d' \
- -i "${WORKDIR}/gcc-${CYGWINPORTS_GITREV}/gcc.cygport" || die
- fi
+ eapply_user
# make sure 64-bits native targets don't screw up the linker paths
- eapply -p0 "${FILESDIR}"/no-libs-for-startfile.patch
+ eapply "${FILESDIR}"/gcc-12-no-libs-for-startfile.patch
if use prefix; then
- eapply -p0 "${FILESDIR}"/4.5.2/prefix-search-dirs.patch
+ eapply "${FILESDIR}"/gcc-12-prefix-search-dirs.patch
# try /usr/lib32 in 32bit profile on x86_64-linux (needs
# --enable-multilib), but this does make sense in prefix only
eapply -p0 "${FILESDIR}"/${PN}-4.8.3-linux-x86-on-amd64.patch
@@ -48,14 +59,11 @@ src_prepare() {
libgcc/config/t-slibgcc-darwin || die
fi
- # fixup a what seems to be a typo, we need this at least to finish
- # compilation on arm64-macos during bootstrap as gmp.h else won't be
- # found
- sed -i -e 's/ALL_SPPFLAGS/ALL_CPPFLAGS/' \
- gcc/config/aarch64/t-aarch64 || die
-
- # allow building with macOS 12
- eapply -p1 "${FILESDIR}"/${PN}-10.3.0-monterey.patch
+ if [[ ${CHOST} == *-solaris* ]] ; then
+ # madvise is not available in the compatibility mode GCC uses,
+ # posix_madvise however, is
+ sed -i -e 's/madvise/posix_madvise/' gcc/cp/module.cc || die
+ fi
}
src_configure() {
diff --git a/sys-devel/gcc/gcc-4.1.2.ebuild b/sys-devel/gcc/gcc-4.1.2.ebuild
deleted file mode 100644
index 83751a153f..0000000000
--- a/sys-devel/gcc/gcc-4.1.2.ebuild
+++ /dev/null
@@ -1,68 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc/gcc-4.1.2.ebuild,v 1.37 2014/01/19 01:51:34 dirtyepic Exp $
-
-EAPI="5"
-
-PATCH_VER="1.5"
-UCLIBC_VER="1.0"
-D_VER="0.24"
-
-inherit eutils toolchain flag-o-matic
-
-DESCRIPTION="The GNU Compiler Collection"
-
-LICENSE="GPL-2+ LGPL-2.1+ FDL-1.2+"
-KEYWORDS="~amd64-linux ~x86-linux ~ppc-macos ~sparc-solaris ~x86-solaris"
-
-RDEPEND=""
-DEPEND="${RDEPEND}
- kernel_Darwin? ( ${CATEGORY}/binutils-apple )
- !kernel_Darwin? ( !kernel_AIX? (
- ppc? ( >=${CATEGORY}/binutils-2.17 )
- ppc64? ( >=${CATEGORY}/binutils-2.17 )
- >=${CATEGORY}/binutils-2.15.94
- ) )"
-
-src_prepare() {
- toolchain_src_prepare
-
- use vanilla && return 0
-
- [[ ${CHOST} == ${CTARGET} ]] && epatch "${FILESDIR}"/gcc-spec-env.patch
-
- # Fix cross-compiling
- epatch "${FILESDIR}"/4.1.0/gcc-4.1.0-cross-compile.patch
-
- [[ ${CTARGET} == *-softfloat-* ]] && epatch "${FILESDIR}"/4.0.2/gcc-4.0.2-softfloat.patch
-
- epatch "${FILESDIR}"/4.1.0/gcc-4.1.0-fast-math-i386-Os-workaround.patch
-
- epatch "${FILESDIR}"/${P}-freebsd.patch
- epatch "${FILESDIR}"/${P}-darwin-fpic.patch
-
- if [[ ${CHOST} == *-solaris* ]] ; then
- # fix nasty bootstrap problem: we need 4.1 due to no deps of MPC, GMP,
- # MPFR, but 4.1 doesn't know about *_sol2 ld targets of >=binutils-2.21
- # we likely have that one installed, so if so, we patch it to *_sol2
- if has_version '>=sys-devel/binutils-2.21' ; then
- einfo "Patching specs to target elf_*_sol2 for newer binutils"
- sed -i \
- -e '/TARGET_LD_EMULATION/s/elf_\(x86_64\|i386\)/elf_\1_sol2/g' \
- gcc/config/i386/sol2-10.h || die
- fi
- fi
-}
-
-src_configure() {
- case ${CHOST} in
- *-solaris*)
- # todo: some magic for native vs. GNU linking?
- EXTRA_ECONF="${EXTRA_ECONF} --with-gnu-ld"
- ;;
- esac
- # Since GCC 4.1.2 some non-posix (?) /bin/sh compatible code is used, at
- # least on Solaris, so force it into our own bash
- export CONFIG_SHELL="${BASH}"
- toolchain_src_configure
-}
diff --git a/sys-devel/gcc/gcc-4.2.4-r2.ebuild b/sys-devel/gcc/gcc-4.2.4-r2.ebuild
deleted file mode 100644
index 52e7ff29d9..0000000000
--- a/sys-devel/gcc/gcc-4.2.4-r2.ebuild
+++ /dev/null
@@ -1,137 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc/gcc-4.2.4-r1.ebuild,v 1.16 2014/01/19 01:51:34 dirtyepic Exp $
-
-EAPI="5"
-
-PATCH_VER="1.3"
-UCLIBC_VER="1.0"
-
-inherit eutils toolchain flag-o-matic prefix
-
-DESCRIPTION="The GNU Compiler Collection"
-
-LICENSE="GPL-3+ LGPL-2.1+ || ( GPL-3+ libgcc libstdc++ ) FDL-1.2+"
-KEYWORDS="~amd64-linux ~x86-linux ~ppc-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-
-RDEPEND=""
-DEPEND="${RDEPEND}
- kernel_Darwin? ( ${CATEGORY}/binutils-apple )
- !kernel_Darwin? (
- ppc? ( >=${CATEGORY}/binutils-2.17 )
- ppc64? ( >=${CATEGORY}/binutils-2.17 )
- >=${CATEGORY}/binutils-2.15.94
- )"
-
-src_prepare() {
- toolchain_src_prepare
-
- use vanilla && return 0
-
- # work around http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33637
- epatch "${FILESDIR}"/4.2.2/targettools-checks.patch
-
- # http://bugs.gentoo.org/show_bug.cgi?id=201490
- epatch "${FILESDIR}"/4.2.2/gentoo-fixincludes.patch
-
- # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27516
- epatch "${FILESDIR}"/4.2.2/treelang-nomakeinfo.patch
-
- # call the linker without explicit target like on sparc
- epatch "${FILESDIR}"/solaris-i386-ld-emulation-4.2.patch
-
- # fix configure problem, bug #416577
- epatch "${FILESDIR}"/4.2.2/solarisx86.patch
-
- # add support for 64-bits native target on Solaris (includes fix for #416577)
- epatch "${FILESDIR}"/4.2.2/solarisx86_64.patch
- if [[ ${CHOST} == *-solaris* ]] ; then
- # fix nasty bootstrap problem: we need 4.2 due to no deps of MPC, GMP,
- # MPFR, but 4.2 doesn't know about *_sol2 ld targets of >=binutils-2.21
- # we likely have that one installed, so if so, we patch it to *_sol2
- if has_version '>=sys-devel/binutils-2.21' ; then
- einfo "Patching specs to target elf_*_sol2 for newer binutils"
- sed -i \
- -e '/TARGET_LD_EMULATION/s/elf_\(x86_64\|i386\)/elf_\1_sol2/g' \
- gcc/config/i386/sol2-10.h || die
- sed -i \
- -e 's/elf\(32\|64\)_sparc/&_sol2/g' \
- gcc/config/sparc/sol2-gld-bi.h || die
- fi
- fi
-
- # make sure 64-bits native targets don't screw up the linker paths
- epatch "${FILESDIR}"/solaris-searchpath.patch
- epatch "${FILESDIR}"/no-libs-for-startfile.patch
- # replace nasty multilib dirs like ../lib64 that occur on --disable-multilib
- if use prefix; then
- epatch "${FILESDIR}"/4.2.2/prefix-search-dirs.patch
- eprefixify "${S}"/gcc/gcc.c
- fi
-
- # allow gcj compilation to succeed on platforms with libiconv
- epatch "${FILESDIR}"/gcj-${PV}-iconvlink.patch
-
- # try /usr/lib32 in 32bit profile on x86_64-linux (needs --enable-multilib)
- # but this does make sense in prefix only.
- use prefix && epatch "${FILESDIR}"/${P}-linux-x86-on-amd64.patch
-
- [[ ${CHOST} == ${CTARGET} ]] && epatch "${FILESDIR}"/gcc-spec-env.patch
-
- [[ ${CTARGET} == *-softfloat-* ]] && epatch "${FILESDIR}"/4.0.2/gcc-4.0.2-softfloat.patch
-
- epatch "${FILESDIR}"/4.2.2/ro-string.patch
-}
-
-src_configure() {
- case ${CTARGET}:" ${USE} " in
- *-solaris*)
- # todo: some magic for native vs. GNU linking?
- EXTRA_ECONF="${EXTRA_ECONF} --with-gnu-ld --with-gnu-as"
- ;;
- i[34567]86-*-linux*:*" prefix "*)
- # to allow the linux-x86-on-amd64.patch become useful, we need
- # to enable multilib, even if there is just one multilib option.
- EXTRA_ECONF="${EXTRA_ECONF} --enable-multilib"
- if [[ ${CBUILD:-${CHOST}} == "${CHOST}" ]]; then
- # we might be on x86_64-linux, but don't do cross-compile, so
- # tell the host-compiler to really create 32bits (for stage1)
- # (real x86-linux-gcc also accept -m32).
- tc-export CC CXX
- CC="${CC} -m32"
- CXX="${CC} -m32"
- fi
- ;;
- esac
- # Since GCC 4.1.2 some non-posix (?) /bin/sh compatible code is used, at
- # least on Solaris, and AIX /bin/sh is ways too slow,
- # so force it to use $BASH (that portage uses) - it can't be EPREFIX
- # in case that doesn't exist yet
- export CONFIG_SHELL="${BASH}"
- toolchain_src_configure
-}
-
-src_install() {
- toolchain_src_install
-
- # create a small profile.d script, unsetting some of the bad
- # environment variables that the system could set from the outside.
- # (GCC_SPECS, GCC_EXEC_PREFIX, CPATH, LIBRARY_PATH, LD_LIBRARY_PATH,
- # C_INCLUDE_PATH, CPLUS_INCLUDE_PATH, LIBPATH, SHLIB_PATH, LIB, INCLUDE,
- # LD_LIBRARY_PATH_32, LD_LIBRARY_PATH_64).
- # Maybe there is a better location for doing this ...? Feel free to move
- # it there if you want to.
-
- cat > "${T}"/00-gcc-paths.sh <<- _EOF
- #!/bin/env bash
- # GCC specific variables
- unset GCC_SPECS GCC_EXEC_PREFIX
- # include path variables
- unset CPATH C_INCLUDE_PATH CPLUS_INCLUDE_PATH INCLUDE
- # library path variables
- unset LIBRARY_PATH LD_LIBRARY_PATH LIBPATH SHLIB_PATH LIB LD_LIBRARY_PATH_32 LD_LIBRARY_PATH_64
- _EOF
-
- insinto /etc/profile.d
- doins "${T}"/00-gcc-paths.sh
-}
diff --git a/sys-devel/gcc/gcc-4.7.3-r1.ebuild b/sys-devel/gcc/gcc-4.7.3-r1.ebuild
deleted file mode 100644
index 7b804b403e..0000000000
--- a/sys-devel/gcc/gcc-4.7.3-r1.ebuild
+++ /dev/null
@@ -1,143 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc/gcc-4.7.3-r1.ebuild,v 1.16 2014/01/19 01:51:34 dirtyepic Exp $
-
-EAPI="5"
-
-PATCH_VER="1.4"
-UCLIBC_VER="1.0"
-
-# Hardened gcc 4 stuff
-PIE_VER="0.5.5"
-SPECS_VER="0.2.0"
-SPECS_GCC_VER="4.4.3"
-# arch/libc configurations known to be stable with {PIE,SSP}-by-default
-PIE_GLIBC_STABLE="x86 amd64 ppc ppc64 arm ia64"
-PIE_UCLIBC_STABLE="x86 arm amd64 ppc ppc64"
-SSP_STABLE="amd64 x86 ppc ppc64 arm
-# uclibc need tls and nptl support for SSP support"
-# uclibc need to be >= 0.9.33
-SSP_UCLIBC_STABLE="x86 amd64 ppc ppc64 arm"
-#end Hardened stuff
-
-inherit eutils toolchain flag-o-matic
-
-DESCRIPTION="The GNU Compiler Collection."
-
-LICENSE="GPL-3+ LGPL-3+ || ( GPL-3+ libgcc libstdc++ gcc-runtime-library-exception-3.1 ) FDL-1.3+"
-KEYWORDS="~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
-
-RDEPEND=""
-DEPEND="${RDEPEND}
- !prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.8 ) )
- kernel_Darwin? ( ${CATEGORY}/binutils-apple )
- kernel_linux? ( >=${CATEGORY}/binutils-2.18 )"
-
-if [[ ${CATEGORY} != cross-* ]] ; then
- PDEPEND="${PDEPEND} !prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.8 ) )"
-fi
-
-src_prepare() {
- if has_version '<sys-libs/glibc-2.12' ; then
- ewarn "Your host glibc is too old; disabling automatic fortify."
- ewarn "Please rebuild gcc after upgrading to >=glibc-2.12 #362315"
- EPATCH_EXCLUDE+=" 10_all_default-fortify-source.patch"
- fi
- # Fedora/RedHat ships glibc-2.15+ with some nasty warnings that cause
- # configure checks for most system headers to fail, resulting in bugs
- # compiling e.g. gcc itself, bug #433333
- if [[ -e /usr/include/features.h ]] ; then
- grep -qF "_FORTIFY_SOURCE requires compiling with optimization" \
- /usr/include/features.h && \
- EPATCH_EXCLUDE+=" 10_all_default-fortify-source.patch"
- fi
-
- # drop the x32 stuff once 4.7 goes stable
- if [[ ${CTARGET} != x86_64* ]] || ! has x32 $(get_all_abis TARGET) ; then
- EPATCH_EXCLUDE+=" 90_all_gcc-4.7-x32.patch"
- fi
-
- toolchain_src_prepare
-
- use vanilla && return 0
-
- # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60221
- epatch "${FILESDIR}"/gcc-4.7.2-cleanup-empty-eh-o0.patch
-
- # make sure solaris-x64 doesn't misdetect tls support, bug #505446
- epatch "${FILESDIR}"/4.7.2/solaris-x64-tls-gnu-as.patch
-
- # make sure 64-bits native targets don't screw up the linker paths
- epatch "${FILESDIR}"/4.7.1/solaris-searchpath.patch
- epatch "${FILESDIR}"/no-libs-for-startfile.patch
- if use prefix; then
- epatch "${FILESDIR}"/4.5.2/prefix-search-dirs.patch
- # try /usr/lib32 in 32bit profile on x86_64-linux (needs
- # --enable-multilib), but this does make sense in prefix only
- epatch "${FILESDIR}"/${PN}-4.7.2-linux-x86-on-amd64.patch
- fi
-
- # make it have correct install_names on Darwin
- epatch "${FILESDIR}"/4.3.3/darwin-libgcc_s-installname.patch
-
- [[ ${CHOST} == ${CTARGET} ]] && epatch "${FILESDIR}"/gcc-spec-env.patch
-}
-
-src_configure() {
- case ${CTARGET}:" ${USE} " in
- powerpc*-darwin*)
- # bug #381179
- filter-flags "-mcpu=*" "-mtune=*"
- ;;
- *-solaris*)
- # todo: some magic for native vs. GNU linking?
- EXTRA_ECONF="${EXTRA_ECONF} --with-gnu-ld --with-gnu-as"
- ;;
- i[34567]86-*-linux*:*" prefix "*)
- # to allow the linux-x86-on-amd64.patch become useful, we need
- # to enable multilib, even if there is just one multilib option.
- EXTRA_ECONF="${EXTRA_ECONF} --enable-multilib"
- if [[ ${CBUILD:-${CHOST}} == "${CHOST}" ]]; then
- # we might be on x86_64-linux, but don't do cross-compile, so
- # tell the host-compiler to really create 32bits (for stage1)
- # (real x86-linux-gcc also accept -m32).
- tc-export CC CXX
- CC="${CC} -m32"
- CXX="${CC} -m32"
- fi
- ;;
- esac
-
- # Since GCC 4.1.2 some non-posix (?) /bin/sh compatible code is used, at
- # least on Solaris, and AIX /bin/sh is ways too slow,
- # so force it to use $BASH (that portage uses) - it can't be EPREFIX
- # in case that doesn't exist yet
- export CONFIG_SHELL="${CONFIG_SHELL:-${BASH}}"
- toolchain_src_configure
-}
-
-src_install() {
- toolchain_src_install
-
- # create a small profile.d script, unsetting some of the bad
- # environment variables that the sustem could set from the outside.
- # (GCC_SPECS, GCC_EXEC_PREFIX, CPATH, LIBRARY_PATH, LD_LIBRARY_PATH,
- # C_INCLUDE_PATH, CPLUS_INCLUDE_PATH, LIBPATH, SHLIB_PATH, LIB, INCLUDE,
- # LD_LIBRARY_PATH_32, LD_LIBRARY_PATH_64).
- # Maybe there is a better location for doing this ...? Feel free to move
- # it there if you want to.
-
- cat > "${T}"/00-gcc-paths.sh <<- _EOF
- #!/bin/env bash
- # GCC specific variables
- unset GCC_SPECS GCC_EXEC_PREFIX
- # include path variables
- unset CPATH C_INCLUDE_PATH CPLUS_INCLUDE_PATH INCLUDE
- # library path variables
- unset LIBRARY_PATH LD_LIBRARY_PATH LIBPATH SHLIB_PATH LIB LD_LIBRARY_PATH_32 LD_LIBRARY_PATH_64
- _EOF
-
- insinto /etc/profile.d
- doins "${T}"/00-gcc-paths.sh
-
-}
diff --git a/sys-devel/gcc/gcc-4.8.5-r1.ebuild b/sys-devel/gcc/gcc-4.8.5-r1.ebuild
deleted file mode 100644
index 96b1a6dcfa..0000000000
--- a/sys-devel/gcc/gcc-4.8.5-r1.ebuild
+++ /dev/null
@@ -1,106 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-
-PATCH_VER="1.3"
-UCLIBC_VER="1.0"
-
-# Hardened gcc 4 stuff
-PIE_VER="0.6.2"
-SPECS_VER="0.2.0"
-SPECS_GCC_VER="4.4.3"
-# arch/libc configurations known to be stable with {PIE,SSP}-by-default
-PIE_GLIBC_STABLE="x86 amd64 mips ppc ppc64 arm ia64"
-PIE_UCLIBC_STABLE="x86 arm amd64 mips ppc ppc64"
-SSP_STABLE="amd64 x86 mips ppc ppc64 arm"
-# uclibc need tls and nptl support for SSP support
-# uclibc need to be >= 0.9.33
-SSP_UCLIBC_STABLE="x86 amd64 mips ppc ppc64 arm"
-#end Hardened stuff
-
-inherit eutils toolchain flag-o-matic
-
-KEYWORDS="~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-
-RDEPEND=""
-DEPEND="${RDEPEND}
- !prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.8 ) )
- kernel_linux? ( >=${CATEGORY}/binutils-2.20 )
- kernel_Darwin? ( ${CATEGORY}/binutils-apple )
-"
-
-if [[ ${CATEGORY} != cross-* ]] ; then
- PDEPEND="${PDEPEND} !prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.8 ) )"
-fi
-
-src_prepare() {
- if has_version '<sys-libs/glibc-2.12' ; then
- ewarn "Your host glibc is too old; disabling automatic fortify."
- ewarn "Please rebuild gcc after upgrading to >=glibc-2.12 #362315"
- EPATCH_EXCLUDE+=" 10_all_default-fortify-source.patch"
- fi
- # Fedora/RedHat ships glibc-2.15+ with some nasty warnings that cause
- # configure checks for most system headers to fail, resulting in bugs
- # compiling e.g. gcc itself, bug #433333
- if [[ -e /usr/include/features.h ]] ; then
- grep -qF "_FORTIFY_SOURCE requires compiling with optimization" \
- /usr/include/features.h && \
- EPATCH_EXCLUDE+=" 10_all_default-fortify-source.patch"
- fi
-
- toolchain_src_prepare
-
- use vanilla && return 0
-
- # make sure solaris-x64 doesn't misdetect tls support, bug #505446
- epatch "${FILESDIR}"/4.7.2/solaris-x64-tls-gnu-as.patch
-
- # make sure 64-bits native targets don't screw up the linker paths
- epatch "${FILESDIR}"/4.7.1/solaris-searchpath.patch
- epatch "${FILESDIR}"/no-libs-for-startfile.patch
- if use prefix; then
- epatch "${FILESDIR}"/4.5.2/prefix-search-dirs.patch
- # try /usr/lib32 in 32bit profile on x86_64-linux (needs
- # --enable-multilib), but this does make sense in prefix only
- epatch "${FILESDIR}"/${PN}-4.8.3-linux-x86-on-amd64.patch
- fi
-
- # make it have correct install_names on Darwin
- epatch "${FILESDIR}"/4.3.3/darwin-libgcc_s-installname.patch
-
- #Use -r1 for newer piepatchet that use DRIVER_SELF_SPECS for the hardened specs.
- [[ ${CHOST} == ${CTARGET} ]] && epatch "${FILESDIR}"/gcc-spec-env-r1.patch
-}
-
-src_configure() {
- local myconf=()
- case ${CTARGET}:" ${USE} " in
- powerpc*-darwin*)
- # bug #381179
- filter-flags "-mcpu=*" "-mtune=*"
- ;;
- *-solaris*)
- # todo: some magic for native vs. GNU linking?
- myconf+=( --with-gnu-ld --with-gnu-as )
- ;;
- i[34567]86-*-linux*:*" prefix "*)
- # to allow the linux-x86-on-amd64.patch become useful, we need
- # to enable multilib, even if there is just one multilib option.
- myconf+=( --enable-multilib )
- if [[ ${CBUILD:-${CHOST}} == "${CHOST}" ]]; then
- # we might be on x86_64-linux, but don't do cross-compile, so
- # tell the host-compiler to really create 32bits (for stage1)
- # (real x86-linux-gcc also accept -m32).
- append-flags -m32
- fi
- ;;
- esac
-
- # Since GCC 4.1.2 some non-posix (?) /bin/sh compatible code is used, at
- # least on Solaris, and AIX /bin/sh is ways too slow,
- # so force it to use $BASH (that portage uses) - it can't be EPREFIX
- # in case that doesn't exist yet
- export CONFIG_SHELL="${CONFIG_SHELL:-${BASH}}"
- toolchain_src_configure "${myconf[@]}"
-}
diff --git a/sys-devel/gcc/gcc-4.9.4.ebuild b/sys-devel/gcc/gcc-4.9.4.ebuild
deleted file mode 100644
index 87b7195f5f..0000000000
--- a/sys-devel/gcc/gcc-4.9.4.ebuild
+++ /dev/null
@@ -1,103 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-
-PATCH_VER="1.3"
-UCLIBC_VER="1.0"
-
-# Hardened gcc 4 stuff
-PIE_VER="0.6.4"
-SPECS_VER="0.2.0"
-SPECS_GCC_VER="4.4.3"
-# arch/libc configurations known to be stable with {PIE,SSP}-by-default
-PIE_GLIBC_STABLE="x86 amd64 mips ppc ppc64 arm ia64"
-PIE_UCLIBC_STABLE="x86 arm amd64 mips ppc ppc64"
-SSP_STABLE="amd64 x86 mips ppc ppc64 arm"
-# uclibc need tls and nptl support for SSP support
-# uclibc need to be >= 0.9.33
-SSP_UCLIBC_STABLE="x86 amd64 mips ppc ppc64 arm"
-#end Hardened stuff
-
-inherit eutils toolchain flag-o-matic
-
-KEYWORDS="~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-
-RDEPEND=""
-DEPEND="${RDEPEND}
- !prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.8 ) )
- kernel_linux? ( >=${CATEGORY}/binutils-2.20 )
- kernel_Darwin? ( ${CATEGORY}/binutils-apple )
-"
-
-if [[ ${CATEGORY} != cross-* ]] ; then
- PDEPEND="${PDEPEND} !prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.8 ) )"
-fi
-
-src_prepare() {
- if has_version '<sys-libs/glibc-2.12' ; then
- ewarn "Your host glibc is too old; disabling automatic fortify."
- ewarn "Please rebuild gcc after upgrading to >=glibc-2.12 #362315"
- EPATCH_EXCLUDE+=" 10_all_default-fortify-source.patch"
- fi
- # Fedora/RedHat ships glibc-2.15+ with some nasty warnings that cause
- # configure checks for most system headers to fail, resulting in bugs
- # compiling e.g. gcc itself, bug #433333
- if [[ -e /usr/include/features.h ]] ; then
- grep -qF "_FORTIFY_SOURCE requires compiling with optimization" \
- /usr/include/features.h && \
- EPATCH_EXCLUDE+=" 10_all_default-fortify-source.patch"
- fi
-
- toolchain_src_prepare
-
- use vanilla && return 0
- # Use -r1 for newer piepatchet that use DRIVER_SELF_SPECS for the hardened specs.
-
- # make sure 64-bits native targets don't screw up the linker paths
- epatch "${FILESDIR}"/no-libs-for-startfile.patch
- if use prefix; then
- epatch "${FILESDIR}"/4.5.2/prefix-search-dirs.patch
- # try /usr/lib32 in 32bit profile on x86_64-linux (needs
- # --enable-multilib), but this does make sense in prefix only
- epatch "${FILESDIR}"/${PN}-4.8.3-linux-x86-on-amd64.patch
- fi
-
- # make it have correct install_names on Darwin
- epatch "${FILESDIR}"/4.3.3/darwin-libgcc_s-installname.patch
-
- #Use -r1 for newer piepatchet that use DRIVER_SELF_SPECS for the hardened specs.
- [[ ${CHOST} == ${CTARGET} ]] && epatch "${FILESDIR}"/gcc-spec-env-r1.patch
-}
-
-src_configure() {
- local myconf=()
- case ${CTARGET}:" ${USE} " in
- powerpc*-darwin*)
- # bug #381179
- filter-flags "-mcpu=*" "-mtune=*"
- ;;
- *-solaris*)
- # todo: some magic for native vs. GNU linking?
- myconf+=( --with-gnu-ld --with-gnu-as )
- ;;
- i[34567]86-*-linux*:*" prefix "*)
- # to allow the linux-x86-on-amd64.patch become useful, we need
- # to enable multilib, even if there is just one multilib option.
- myconf+=( --enable-multilib )
- if [[ ${CBUILD:-${CHOST}} == "${CHOST}" ]]; then
- # we might be on x86_64-linux, but don't do cross-compile, so
- # tell the host-compiler to really create 32bits (for stage1)
- # (real x86-linux-gcc also accept -m32).
- append-flags -m32
- fi
- ;;
- esac
-
- # Since GCC 4.1.2 some non-posix (?) /bin/sh compatible code is used, at
- # least on Solaris, and AIX /bin/sh is ways too slow,
- # so force it to use $BASH (that portage uses) - it can't be EPREFIX
- # in case that doesn't exist yet
- export CONFIG_SHELL="${CONFIG_SHELL:-${BASH}}"
- toolchain_src_configure "${myconf[@]}"
-}
diff --git a/sys-devel/gcc/gcc-5.4.0-r4.ebuild b/sys-devel/gcc/gcc-5.4.0-r4.ebuild
deleted file mode 100644
index 81cd232418..0000000000
--- a/sys-devel/gcc/gcc-5.4.0-r4.ebuild
+++ /dev/null
@@ -1,105 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-
-PATCH_VER="1.8"
-UCLIBC_VER="1.0"
-CYGWINPORTS_GITREV="f44d762eb3551ea0d81aa8e4b428bcb7caabb628" # gcc-5.3.0-3
-
-# Hardened gcc 4 stuff
-PIE_VER="0.6.5"
-SPECS_VER="0.2.0"
-SPECS_GCC_VER="4.4.3"
-# arch/libc configurations known to be stable with {PIE,SSP}-by-default
-PIE_GLIBC_STABLE="x86 amd64 mips ppc ppc64 arm ia64"
-PIE_UCLIBC_STABLE="x86 arm amd64 mips ppc ppc64"
-SSP_STABLE="amd64 x86 mips ppc ppc64 arm"
-# uclibc need tls and nptl support for SSP support
-# uclibc need to be >= 0.9.33
-SSP_UCLIBC_STABLE="x86 amd64 mips ppc ppc64 arm"
-#end Hardened stuff
-
-inherit eutils toolchain flag-o-matic
-
-KEYWORDS="~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-
-RDEPEND=""
-DEPEND="${RDEPEND}
- !prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.8 ) )
- kernel_linux? ( >=${CATEGORY}/binutils-2.20 )
- kernel_Darwin? ( ${CATEGORY}/binutils-apple )
-"
-
-if [[ ${CATEGORY} != cross-* ]] ; then
- PDEPEND="${PDEPEND} !prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.8 ) )"
-fi
-
-src_prepare() {
- if has_version '<sys-libs/glibc-2.12' ; then
- ewarn "Your host glibc is too old; disabling automatic fortify."
- ewarn "Please rebuild gcc after upgrading to >=glibc-2.12 #362315"
- EPATCH_EXCLUDE+=" 10_all_default-fortify-source.patch"
- fi
- # Fedora/RedHat ships glibc-2.15+ with some nasty warnings that cause
- # configure checks for most system headers to fail, resulting in bugs
- # compiling e.g. gcc itself, bug #433333
- if [[ -e /usr/include/features.h ]] ; then
- grep -qF "_FORTIFY_SOURCE requires compiling with optimization" \
- /usr/include/features.h && \
- EPATCH_EXCLUDE+=" 10_all_default-fortify-source.patch"
- fi
-
- toolchain_src_prepare
-
- use vanilla && return 0
-
- # make sure 64-bits native targets don't screw up the linker paths
- epatch "${FILESDIR}"/no-libs-for-startfile.patch
- if use prefix; then
- epatch "${FILESDIR}"/4.5.2/prefix-search-dirs.patch
- # try /usr/lib32 in 32bit profile on x86_64-linux (needs
- # --enable-multilib), but this does make sense in prefix only
- epatch "${FILESDIR}"/${PN}-4.8.3-linux-x86-on-amd64.patch
- fi
-
- # make it have correct install_names on Darwin
- epatch "${FILESDIR}"/4.3.3/darwin-libgcc_s-installname.patch
-
- # Apply https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=226138,
- # upstream shipped since gcc-6.1.0.
- find libstdc++-v3 -name Makefile.in -exec sed -i -e \
- '/^AM_CPPFLAGS = \$(GLIBCXX_INCLUDES)$/s/$/ $(CPPFLAGS)/p' {} +
-}
-
-src_configure() {
- local myconf=()
- case ${CTARGET}:" ${USE} " in
- powerpc*-darwin*)
- # bug #381179
- filter-flags "-mcpu=*" "-mtune=*"
- ;;
- *-solaris*)
- # todo: some magic for native vs. GNU linking?
- myconf+=( --with-gnu-ld --with-gnu-as --enable-largefile )
- ;;
- i[34567]86-*-linux*:*" prefix "*)
- # to allow the linux-x86-on-amd64.patch become useful, we need
- # to enable multilib, even if there is just one multilib option.
- myconf+=( --enable-multilib )
- if [[ ${CBUILD:-${CHOST}} == "${CHOST}" ]]; then
- # we might be on x86_64-linux, but don't do cross-compile, so
- # tell the host-compiler to really create 32bits (for stage1)
- # (real x86-linux-gcc also accept -m32).
- append-flags -m32
- fi
- ;;
- esac
-
- # Since GCC 4.1.2 some non-posix (?) /bin/sh compatible code is used, at
- # least on Solaris, and AIX /bin/sh is ways too slow,
- # so force it to use $BASH (that portage uses) - it can't be EPREFIX
- # in case that doesn't exist yet
- export CONFIG_SHELL="${CONFIG_SHELL:-${BASH}}"
- toolchain_src_configure "${myconf[@]}"
-}
diff --git a/sys-devel/gcc/gcc-7.4.0.ebuild b/sys-devel/gcc/gcc-7.4.0.ebuild
deleted file mode 100644
index bbd5ce8c5a..0000000000
--- a/sys-devel/gcc/gcc-7.4.0.ebuild
+++ /dev/null
@@ -1,92 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-
-PATCH_VER="1.1"
-CYGWINPORTS_GITREV="11fa2eec213324d64673ad41358f726f6523667f" # gcc-7.4.0-1
-
-inherit eutils toolchain flag-o-matic
-
-KEYWORDS="~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-
-RDEPEND=""
-DEPEND="${RDEPEND}
- !prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.13 ) )
- kernel_linux? ( >=${CATEGORY}/binutils-2.20 )
- kernel_Darwin? ( ${CATEGORY}/binutils-apple )"
-
-if [[ ${CATEGORY} != cross-* ]] ; then
- PDEPEND="${PDEPEND} !prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.13 ) )"
-fi
-
-src_prepare() {
- toolchain_src_prepare
-
- use vanilla && return 0
-
- # make sure 64-bits native targets don't screw up the linker paths
- epatch "${FILESDIR}"/no-libs-for-startfile.patch
- if use prefix; then
- epatch "${FILESDIR}"/4.5.2/prefix-search-dirs.patch
- # try /usr/lib32 in 32bit profile on x86_64-linux (needs
- # --enable-multilib), but this does make sense in prefix only
- epatch "${FILESDIR}"/${PN}-4.8.3-linux-x86-on-amd64.patch
- fi
-
- # make it have correct install_names on Darwin
- epatch "${FILESDIR}"/4.3.3/darwin-libgcc_s-installname.patch
-}
-
-src_configure() {
- local myconf=()
- case ${CTARGET}:" ${USE} " in
- powerpc*-darwin*)
- # bug #381179
- filter-flags "-mcpu=*" "-mtune=*"
- # bug #657522
- # A bug in configure checks whether -no-pie works, but the
- # compiler doesn't pass -no-pie onto the linker if -fno-PIE
- # isn't passed, so the configure check always finds -no-pie
- # is accepted. (Likewise, when -fno-PIE is passed, the
- # compiler passes -no_pie onto the linker.)
- # Since our linker doesn't grok this, avoid above checks to
- # be run
- # NOTE: later ld64 does grok -no_pie, not -no-pie (as checked)
- export gcc_cv_c_no_fpie=no
- export gcc_cv_no_pie=no
- ;;
- *-solaris*)
- # todo: some magic for native vs. GNU linking?
- myconf+=( --with-gnu-ld --with-gnu-as --enable-largefile )
- # Solaris 11 defines this in its headers, but that causes a
- # mismatch whilst compiling, bug #657514
- export ac_cv_func_aligned_alloc=no
- export ac_cv_func_memalign=no
- export ac_cv_func_posix_memalign=no
- ;;
- *-cygwin*)
- # use built-in SSP with Cygwin 2.10
- # FIXME: --disable-libssp should suffice in GCC 8
- export gcc_cv_libc_provides_ssp=yes
- ;;
- i[34567]86-*-linux*:*" prefix "*)
- # to allow the linux-x86-on-amd64.patch become useful, we need
- # to enable multilib, even if there is just one multilib option.
- myconf+=( --enable-multilib )
- if [[ ${CBUILD:-${CHOST}} == "${CHOST}" ]]; then
- # we might be on x86_64-linux, but don't do cross-compile, so
- # tell the host-compiler to really create 32bits (for stage1)
- # (real x86-linux-gcc also accept -m32).
- append-flags -m32
- fi
- ;;
- esac
-
- # Since GCC 4.1.2 some non-posix (?) /bin/sh compatible code is used, at
- # least on Solaris, and AIX /bin/sh is way too slow,
- # so force it to use $BASH (that portage uses) - it can't be EPREFIX
- # in case that doesn't exist yet
- export CONFIG_SHELL="${CONFIG_SHELL:-${BASH}}"
- toolchain_src_configure "${myconf[@]}"
-}
diff --git a/sys-devel/gcc/gcc-8.3.0.ebuild b/sys-devel/gcc/gcc-8.3.0.ebuild
index 2da9f162cf..a721f4aef0 100644
--- a/sys-devel/gcc/gcc-8.3.0.ebuild
+++ b/sys-devel/gcc/gcc-8.3.0.ebuild
@@ -1,7 +1,7 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI="5"
+EAPI="7"
PATCH_VER="1.0"
CYGWINPORTS_GITREV="0de6b2ae6b6577eb0891a7ca8d551bdfa79bf5e8" # gcc-8.3.0-1
diff --git a/sys-devel/gcc/gcc-9.2.0-r3.ebuild b/sys-devel/gcc/gcc-9.2.0-r3.ebuild
index 6d345e0357..11485cf4fe 100644
--- a/sys-devel/gcc/gcc-9.2.0-r3.ebuild
+++ b/sys-devel/gcc/gcc-9.2.0-r3.ebuild
@@ -1,7 +1,7 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI="6"
+EAPI="7"
PATCH_VER="4"
diff --git a/sys-devel/gcc/metadata.xml b/sys-devel/gcc/metadata.xml
index 666aee2a93..b6eef667b0 100644
--- a/sys-devel/gcc/metadata.xml
+++ b/sys-devel/gcc/metadata.xml
@@ -1,44 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
- <maintainer type="project">
- <email>toolchain@gentoo.org</email>
- <name>Gentoo Toolchain Project</name>
- </maintainer>
- <use>
- <flag name="ada">Build the ADA language (GNAT) frontend</flag>
- <flag name="awt">Useful only when building GCJ, this enables Abstract Window Toolkit
- (AWT) peer support on top of GTK+</flag>
- <flag name="cilk">Support the Cilk Plus language (C/C++ based languages for parallel programming)</flag>
- <flag name="d">Enable support for the D programming language</flag>
- <flag name="fixed-point">Enable fixed-point arithmetic support for MIPS targets
- in gcc (Warning: significantly increases compile time!)</flag>
- <flag name="gcj">Build the GCJ Java language frontend.</flag>
- <flag name="go">Build the GCC Go language frontend.</flag>
- <flag name="graphite">Add support for the framework for loop
- optimizations based on a polyhedral intermediate representation</flag>
- <flag name="jit">Enable libgccjit so other applications can embed gcc for Just-In-Time compilation.
- This will slow down the compiler a bit as it forces all of the toolchain to be shared libs.</flag>
- <flag name="libssp">Build SSP support into a dedicated library rather than use the
- code in the C library (DO NOT ENABLE THIS IF YOU DON'T KNOW WHAT IT DOES)</flag>
- <flag name="lto">Build using Link Time Optimizations (LTO)</flag>
- <flag name="mpx">Enable support for Intel Memory Protection Extensions (MPX)</flag>
- <flag name="nopie">Disable PIE support (NOT FOR GENERAL USE)</flag>
- <flag name="nossp">Disable SSP support (NOT FOR GENERAL USE)</flag>
- <flag name="nptl">Enable support for Native POSIX Threads Library, the new threading module (requires linux-2.6 or better usually)</flag>
- <flag name="objc">Build support for the Objective C code language</flag>
- <flag name="objc++">Build support for the Objective C++ language</flag>
- <flag name="objc-gc">Build support for the Objective C code language Garbage
- Collector</flag>
- <flag name="pgo">Build GCC using Profile Guided Optimization (PGO)</flag>
- <flag name="sanitize">Build support for various sanitizer functions (ASAN/TSAN/etc...)</flag>
- <flag name="ssp">Build packages with stack smashing protector on by default</flag>
- <flag name="systemtap">enable systemtap static probe points</flag>
- <flag name="valgrind">Enable valgrind annotations for gcc internals (useful for gcc debugging).</flag>
- <flag name="vtv">Build support for virtual table verification (a C++ hardening feature)</flag>
- </use>
- <upstream>
- <remote-id type="cpe">cpe:/a:gnu:gcc</remote-id>
- <remote-id type="sourceforge">dgcc</remote-id>
- </upstream>
+ <maintainer type="project">
+ <email>toolchain@gentoo.org</email>
+ <name>Gentoo Toolchain Project</name>
+ </maintainer>
+ <use>
+ <flag name="ada">Build the ADA language (GNAT) frontend</flag>
+ <flag name="cet" restrict=">=sys-devel/gcc-10">Enable support for Intel Control Flow Enforcement Technology (CET)</flag>
+ <flag name="d">Enable support for the D programming language</flag>
+ <flag name="fixed-point">Enable fixed-point arithmetic support for MIPS targets in gcc (Warning: significantly increases compile time!)</flag>
+ <flag name="go">Build the GCC Go language frontend.</flag>
+ <flag name="graphite">Add support for the framework for loop optimizations based on a polyhedral intermediate representation</flag>
+ <flag name="jit">Enable libgccjit so other applications can embed gcc for Just-In-Time compilation. This will slow down the compiler a bit as it forces all of the toolchain to be shared libs.</flag>
+ <flag name="libssp">Build SSP support into a dedicated library rather than use the code in the C library (DO NOT ENABLE THIS IF YOU DON'T KNOW WHAT IT DOES)</flag>
+ <flag name="lto">Build using Link Time Optimizations (LTO)</flag>
+ <flag name="mpx">Enable support for Intel Memory Protection Extensions (MPX)</flag>
+ <flag name="nptl">Enable support for Native POSIX Threads Library, the new threading module (requires linux-2.6 or better usually)</flag>
+ <flag name="objc">Build support for the Objective C code language</flag>
+ <flag name="objc++">Build support for the Objective C++ language</flag>
+ <flag name="objc-gc">Build support for the Objective C code language Garbage Collector</flag>
+ <flag name="pgo">Build GCC using Profile Guided Optimization (PGO)</flag>
+ <flag name="sanitize">Build support for various sanitizer functions (ASAN/TSAN/etc...)</flag>
+ <flag name="ssp">Build packages with stack smashing protector on by default</flag>
+ <flag name="systemtap">enable systemtap static probe points</flag>
+ <flag name="valgrind">Enable valgrind annotations for gcc internals (useful for gcc debugging).</flag>
+ <flag name="vtv">Build support for virtual table verification (a C++ hardening feature)</flag>
+ </use>
+ <upstream>
+ <remote-id type="cpe">cpe:/a:gnu:gcc</remote-id>
+ <remote-id type="sourceforge">dgcc</remote-id>
+ </upstream>
</pkgmetadata>
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [gentoo-commits] repo/proj/prefix:master commit in: sys-devel/gcc/files/, sys-devel/gcc/
@ 2023-02-19 18:53 Sam James
0 siblings, 0 replies; 8+ messages in thread
From: Sam James @ 2023-02-19 18:53 UTC (permalink / raw
To: gentoo-commits
commit: d3ca44544e61178286f5c979fed2d4f36f3332b3
Author: Yifeng Li <tomli <AT> tomli <DOT> me>
AuthorDate: Sat Feb 18 22:42:05 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Feb 19 18:53:03 2023 +0000
URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=d3ca4454
sys-devel/gcc-12.1.0: patch to fix macOS 13 build.
When bootstrapping Gentoo Prefix on macOS 13.2 (Ventura) on
an Apple M1 system, it will fail at stage2 due to a GCC build
failure because GCC 12.1 is incompatible with macOS 13.
make[2]: Entering directory '/Users/apple/gentoo/tmp/var/tmp/portage/sys-devel/gcc-12.1.0/work/build/gcc'
/Users/apple/Gentoo/tmp/var/tmp/portage/sys-devel/gcc-12.1.0/work/build/./gcc/xgcc -B/Users/apple/Gentoo/tmp/var/tmp/portage/sys-devel/g
cc-12.1.0/work/build/./gcc/ -xc++ -nostdinc /dev/null -S -o /dev/null -fself-test=/Users/apple/Gentoo/tmp/var/tmp/portage/sys-devel/gcc-
12.1.0/work/gcc-12-branch-gcc-12.1-darwin-r0/gcc/testsuite/selftests
<built-in>: error: unknown value '13.0' of '-mmacosx-version-min'
This problem can be fixed by applying the upstream patch
* Darwin: Future-proof -mmacosx-version-min
> f18cbc1ee1f4 (2021-12-18) updated various parts of gcc to not impose a
> Darwin or macOS version maximum of the current known release. [...] However,
> f18cbc1ee1f4 missed config/darwin-c.c (now .cc), which continued to impose a
> maximum of macOS 12 on the -mmacosx-version-min compiler driver argument.
https://github.com/gcc-mirror/gcc/commit/6725f186cb70d48338f69456864bf469a12ee5be.patch
However, there's another separate name collision bug in fs_path.h of
libstdc++ that will produce another error, similar to the following
(I lost the original logs, this is copied from an issue I found online).
In file included from /private/tmp/gccA10-20221211-4993-1miwm67/gcc-10.4.0/build/x86_64-apple-darwin22/libstdc++-v3/include/filesystem:45,
from ../../../../../libstdc++-v3/src/c++17/fs_dir.cc:30:
/private/tmp/gccA10-20221211-4993-1miwm67/gcc-10.4.0/build/x86_64-apple-darwin22/libstdc++-v3/include/bits/fs_path.h:133:30: error: abstract declarator 'std::filesystem::__cxx11::__detail::<unnamed struct>' used as declaration
133 | struct __null_terminated { };
To fix this problem, the following upstream patch must be applied:
* libstdc++: Rename __null_terminated to avoid collision with Apple SDK
> The macOS 13 SDK (and equivalent-version iOS and other Apple OS SDKs)
> contain this definition in <sys/cdefs.h>: "#define __null_terminated" This
> collides with the use of __null_terminated in libstdc++'s experimental
> fs_path.h.
https://github.com/gcc-mirror/gcc/commit/d1201dbf55a11d391030914985ba6b443e59baa5.patch
Fixing both problems allow successful compile of sys-devel/gcc-12.1.0 in
stage2 and stage3.
This commit fixes Gentoo bug 895332 [1].
Note that sys-devel/gcc-12.2.0 has its own bugs (Gentoo bug 895334) that
prevents bootstrapping from happening. My recommendation is fixing
sys-devel/gcc-12.1.0 for now, and masking sys-devel/gcc-12.2.0 until the
problem has been thoroughly investigated.
Closes: https://bugs.gentoo.org/895332
Signed-off-by: Yifeng Li <tomli <AT> tomli.me>
Closes: https://github.com/gentoo/prefix/pull/17
Signed-off-by: Sam James <sam <AT> gentoo.org>
...rminated-name-collision-with-macos-13-sdk.patch | 85 ++++++++++++++++++++++
...ognize-mmacosx-version-min-13.0-and-newer.patch | 54 ++++++++++++++
sys-devel/gcc/gcc-12.1.0.ebuild | 4 +
3 files changed, 143 insertions(+)
diff --git a/sys-devel/gcc/files/gcc-12.1.0-avoid-null-terminated-name-collision-with-macos-13-sdk.patch b/sys-devel/gcc/files/gcc-12.1.0-avoid-null-terminated-name-collision-with-macos-13-sdk.patch
new file mode 100644
index 0000000000..1abfae345c
--- /dev/null
+++ b/sys-devel/gcc/files/gcc-12.1.0-avoid-null-terminated-name-collision-with-macos-13-sdk.patch
@@ -0,0 +1,85 @@
+https://bugs.gentoo.org/886491
+https://bugs.gentoo.org/895332
+https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=d1201dbf55a11d391030914985ba6b443e59baa5
+
+From d1201dbf55a11d391030914985ba6b443e59baa5 Mon Sep 17 00:00:00 2001
+From: Mark Mentovai <mark@mentovai.com>
+Date: Mon, 13 Jun 2022 16:40:19 +0100
+Subject: [PATCH] libstdc++: Rename __null_terminated to avoid collision with
+ Apple SDK
+
+The macOS 13 SDK (and equivalent-version iOS and other Apple OS SDKs)
+contain this definition in <sys/cdefs.h>:
+
+863 #define __null_terminated
+
+This collides with the use of __null_terminated in libstdc++'s
+experimental fs_path.h.
+
+As libstdc++'s use of this token is entirely internal to fs_path.h, the
+simplest workaround, renaming it, is most appropriate. Here, it's
+renamed to __nul_terminated, referencing the NUL ('\0') value that is
+used to terminate the strings in the context in which this tag structure
+is used.
+
+libstdc++-v3/ChangeLog:
+
+ * include/experimental/bits/fs_path.h (__detail::__null_terminated):
+ Rename to __nul_terminated to avoid colliding with a macro in
+ Apple's SDK.
+
+Signed-off-by: Mark Mentovai <mark@mentovai.com>
+(cherry picked from commit 254e88b3d7e8abcc236be3451609834371cf4d5d)
+---
+ libstdc++-v3/include/experimental/bits/fs_path.h | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/libstdc++-v3/include/experimental/bits/fs_path.h b/libstdc++-v3/include/experimental/bits/fs_path.h
+index b0825ba76e80..19d246100cb5 100644
+--- a/libstdc++-v3/include/experimental/bits/fs_path.h
++++ b/libstdc++-v3/include/experimental/bits/fs_path.h
+@@ -140,10 +140,10 @@ namespace __detail
+ inline _Source
+ _S_range_begin(_Source __begin) { return __begin; }
+
+- struct __null_terminated { };
++ struct __nul_terminated { };
+
+ template<typename _Source>
+- inline __null_terminated
++ inline __nul_terminated
+ _S_range_end(_Source) { return {}; }
+
+ template<typename _CharT, typename _Traits, typename _Alloc>
+@@ -459,11 +459,11 @@ namespace __detail
+ struct _Cvt;
+
+ static string_type
+- _S_convert(value_type* __src, __detail::__null_terminated)
++ _S_convert(value_type* __src, __detail::__nul_terminated)
+ { return string_type(__src); }
+
+ static string_type
+- _S_convert(const value_type* __src, __detail::__null_terminated)
++ _S_convert(const value_type* __src, __detail::__nul_terminated)
+ { return string_type(__src); }
+
+ template<typename _Iter>
+@@ -477,7 +477,7 @@ namespace __detail
+
+ template<typename _InputIterator>
+ static string_type
+- _S_convert(_InputIterator __src, __detail::__null_terminated)
++ _S_convert(_InputIterator __src, __detail::__nul_terminated)
+ {
+ auto __s = _S_string_from_iter(__src);
+ return _S_convert(__s.c_str(), __s.c_str() + __s.size());
+@@ -504,7 +504,7 @@ namespace __detail
+
+ template<typename _InputIterator>
+ static string_type
+- _S_convert_loc(_InputIterator __src, __detail::__null_terminated,
++ _S_convert_loc(_InputIterator __src, __detail::__nul_terminated,
+ const std::locale& __loc)
+ {
+ const std::string __s = _S_string_from_iter(__src);
diff --git a/sys-devel/gcc/files/gcc-12.1.0-recognize-mmacosx-version-min-13.0-and-newer.patch b/sys-devel/gcc/files/gcc-12.1.0-recognize-mmacosx-version-min-13.0-and-newer.patch
new file mode 100644
index 0000000000..f5c32d886c
--- /dev/null
+++ b/sys-devel/gcc/files/gcc-12.1.0-recognize-mmacosx-version-min-13.0-and-newer.patch
@@ -0,0 +1,54 @@
+https://bugs.gentoo.org/886491
+https://bugs.gentoo.org/895332
+https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=6725f186cb70d48338f69456864bf469a12ee5be
+
+From 6725f186cb70d48338f69456864bf469a12ee5be Mon Sep 17 00:00:00 2001
+From: Mark Mentovai <mark@mentovai.com>
+Date: Fri, 10 Jun 2022 15:56:42 +0100
+Subject: [PATCH] Darwin: Future-proof -mmacosx-version-min
+
+f18cbc1ee1f4 (2021-12-18) updated various parts of gcc to not impose a
+Darwin or macOS version maximum of the current known release. Different
+parts of gcc accept, variously, Darwin version numbers matching
+darwin2*, and macOS major version numbers up to 99. The current released
+version is Darwin 21 and macOS 12, with Darwin 22 and macOS 13 expected
+for public release later this year. With one major OS release per year,
+this strategy is expected to provide another 8 years of headroom.
+
+However, f18cbc1ee1f4 missed config/darwin-c.c (now .cc), which
+continued to impose a maximum of macOS 12 on the -mmacosx-version-min
+compiler driver argument. This was last updated from 11 to 12 in
+11b967577483 (2021-10-27), but kicking the can down the road one year at
+a time is not a viable strategy, and is not in line with the more recent
+technique from f18cbc1ee1f4.
+
+Prior to 556ab5125912 (2020-11-06), config/darwin-c.c did not impose a
+maximum that needed annual maintenance, as at that point, all macOS
+releases had used a major version of 10. The stricter approach imposed
+since then was valuable for a time until the particulars of the new
+versioning scheme were established and understood, but now that they
+are, it's prudent to restore a more permissive approach.
+
+gcc/ChangeLog:
+
+ * config/darwin-c.cc: Make -mmacosx-version-min more future-proof.
+
+Signed-off-by: Mark Mentovai <mark@mentovai.com>
+---
+ gcc/config/darwin-c.cc | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/gcc/config/darwin-c.cc b/gcc/config/darwin-c.cc
+index 9203c84d2c26c..1f82b36d2de10 100644
+--- a/gcc/config/darwin-c.cc
++++ b/gcc/config/darwin-c.cc
+@@ -691,7 +691,8 @@ macosx_version_as_macro (void)
+ if (!version_array)
+ goto fail;
+
+- if (version_array[MAJOR] < 10 || version_array[MAJOR] > 12)
++ /* System tools accept up to 99 as a major version. */
++ if (version_array[MAJOR] < 10 || version_array[MAJOR] > 99)
+ goto fail;
+
+ if (version_array[MAJOR] == 10 && version_array[MINOR] < 10)
diff --git a/sys-devel/gcc/gcc-12.1.0.ebuild b/sys-devel/gcc/gcc-12.1.0.ebuild
index 590c202d8c..9b85f3d9aa 100644
--- a/sys-devel/gcc/gcc-12.1.0.ebuild
+++ b/sys-devel/gcc/gcc-12.1.0.ebuild
@@ -45,6 +45,10 @@ src_prepare() {
eapply_user
+ # fix build for macOS 13 Ventura
+ eapply "${FILESDIR}"/gcc-12.1.0-recognize-mmacosx-version-min-13.0-and-newer.patch
+ eapply "${FILESDIR}"/gcc-12.1.0-avoid-null-terminated-name-collision-with-macos-13-sdk.patch
+
# make sure 64-bits native targets don't screw up the linker paths
eapply "${FILESDIR}"/gcc-12-no-libs-for-startfile.patch
if use prefix; then
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [gentoo-commits] repo/proj/prefix:master commit in: sys-devel/gcc/files/, sys-devel/gcc/
@ 2024-01-13 14:33 Fabian Groffen
0 siblings, 0 replies; 8+ messages in thread
From: Fabian Groffen @ 2024-01-13 14:33 UTC (permalink / raw
To: gentoo-commits
commit: 1469562b0aad1ca8f2a9a130df50df2ca15aa5a3
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 13 14:32:16 2024 +0000
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Sat Jan 13 14:32:16 2024 +0000
URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=1469562b
sys-devel/gcc-13.2.0: version bump
Compiles and works on Darwin x64-17, arm64-23. Non-Darwin use untested.
Bug: https://bugs.gentoo.org/916291
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>
sys-devel/gcc/Manifest | 4 +
.../gcc/files/gcc-13-fix-cross-fixincludes.patch | 19 +++
sys-devel/gcc/gcc-13.2.0.ebuild | 153 +++++++++++++++++++++
3 files changed, 176 insertions(+)
diff --git a/sys-devel/gcc/Manifest b/sys-devel/gcc/Manifest
index 50516e4616..6173450b30 100644
--- a/sys-devel/gcc/Manifest
+++ b/sys-devel/gcc/Manifest
@@ -6,3 +6,7 @@ DIST gcc-12.2-darwin-r0.tar.gz 131069986 BLAKE2B 42de71c9f0802f1a43e675d3fae7341
DIST gcc-12.2.0-musl-patches-1.tar.xz 3844 BLAKE2B 004432806696f7d0a32366270ac45695e858abee73a255e44dc6e0a225339e4cad40aab0d51dfe9a55d5aa4b4001f5726064bb2eea3212a0874b2d27e229abd7 SHA512 c354edcd641a9dfaf902a0ff4c44c75065d0cf1c36bbf6c3c35c2e23bff22b8f70bcf4458a5a0ef86371e9f2fafca8a54ca822e35820ff442c9458a2819c3606
DIST gcc-12.2.0-patches-1.tar.xz 12864 BLAKE2B a5ae0a85dfc1b6f0bd968f0d5262ebed14ec9cdb3249e3a4c571578c54eda0e53708ee7fe8e03e506366c7f3cf7926eced9b390d9dee948c1249298c0fabd9fb SHA512 f3d793b89a2a0385d596162fb0c653d4acdf21ae418cb792c1786a01fde0391bd0719715dbf07d53636f127168f5cd99108a1dc11cf6cea889b7d82385bcc258
DIST gcc-12.2.0.tar.xz 84645292 BLAKE2B 715574af9ad678f9dc8cfd19c866bf910c7edfd479e7e9681337feaa9b54e5d304ddb85483816b8d89754d502405823ae2eff0d1e444538763f40be8e428d8da SHA512 e9e857bd81bf7a370307d6848c81b2f5403db8c7b5207f54bce3f3faac3bde63445684092c2bc1a2427cddb6f7746496d9fbbef05fbbd77f2810b2998f1f9173
+DIST gcc-13.2-darwin-r0.tar.gz 137958605 BLAKE2B b6777b76baf2dc007c4080c0b7a6d448223747f0cf832e493e3b903b3bdb7f87a0e2e9cf41f9355769b178a72409b1e2866b3e73b1cc33ed0aba837f3a9e66c1 SHA512 a33177bd55d228d1df93e2a029e8af5d215ad8b2ebc84a0c90df629d6f69c5de0ed1ec9dd27bc21a62362522d83bad9a8f34407b89b13321b65f513fa2202dd2
+DIST gcc-13.2.0-musl-patches-2.tar.xz 5292 BLAKE2B c057d6574d03c05854edaa9f3fd40e9149662b04f3ac7a7db3eb078d73a7b535726d1bf52e5b12736dedb2f9898ad731f2e48a6421fcfbf7b90f929dee072fcb SHA512 a691da0c87c443a5e9d23731f4005f27871c5b12bc9102873ffa24d374aa7b9fbd187c4f5635d23fa9ffb17e351e76173c2d3fdf40646e355c4cb314b538de69
+DIST gcc-13.2.0-patches-7.tar.xz 37064 BLAKE2B 4a8700a8d44bfaa84926f8bfd0da4c5b0c0377f47fc0679456e909f7c9029b9cf1b72c0ba0bc505d9035d5c38e27f7e5b029727eaf2bc7aca417a6be966b2f43 SHA512 f440c97e6782ecb8581d41608e31a648ac426e2d870bc1d171da7794cdeff2fd0546cae0c7214e72fd3a00ead8a5c66f3f633b670b74553a2f3a40378b51f20c
+DIST gcc-13.2.0.tar.xz 87858592 BLAKE2B 0034b29d3d6cc05821f0c4253ce077805943aff7b370729dd203bda57d89c107edd657eeddc2fb1e69ea15c7b0323b961f46516c7f4af89a3ccf7fea84701be2 SHA512 d99e4826a70db04504467e349e9fbaedaa5870766cda7c5cab50cdebedc4be755ebca5b789e1232a34a20be1a0b60097de9280efe47bdb71c73251e30b0862a2
diff --git a/sys-devel/gcc/files/gcc-13-fix-cross-fixincludes.patch b/sys-devel/gcc/files/gcc-13-fix-cross-fixincludes.patch
new file mode 100644
index 0000000000..e4abe01a08
--- /dev/null
+++ b/sys-devel/gcc/files/gcc-13-fix-cross-fixincludes.patch
@@ -0,0 +1,19 @@
+Revert of https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=59e4c98173a79fcaa2c33253261409f38856c384
+for now to fix cross fixincludes builds.
+
+https://bugs.gentoo.org/905118
+--- a/gcc/Makefile.in
++++ b/gcc/Makefile.in
+@@ -532,11 +532,7 @@ LINKER_PLUGIN_API_H = $(srcdir)/../include/plugin-api.h
+ # Default native SYSTEM_HEADER_DIR, to be overridden by targets.
+ NATIVE_SYSTEM_HEADER_DIR = @NATIVE_SYSTEM_HEADER_DIR@
+ # Default cross SYSTEM_HEADER_DIR, to be overridden by targets.
+-ifeq (@includedir@,$(prefix)/include)
+- CROSS_SYSTEM_HEADER_DIR = @CROSS_SYSTEM_HEADER_DIR@
+-else
+- CROSS_SYSTEM_HEADER_DIR = @includedir@
+-endif
++CROSS_SYSTEM_HEADER_DIR = @CROSS_SYSTEM_HEADER_DIR@
+
+ # autoconf sets SYSTEM_HEADER_DIR to one of the above.
+ # Purge it of unnecessary internal relative paths
diff --git a/sys-devel/gcc/gcc-13.2.0.ebuild b/sys-devel/gcc/gcc-13.2.0.ebuild
new file mode 100644
index 0000000000..02fa04f772
--- /dev/null
+++ b/sys-devel/gcc/gcc-13.2.0.ebuild
@@ -0,0 +1,153 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+TOOLCHAIN_PATCH_DEV="sam"
+PATCH_GCC_VER="13.2.0"
+PATCH_VER="7"
+MUSL_VER="2"
+MUSL_GCC_VER="13.2.0"
+
+inherit toolchain
+
+# Don't keyword live ebuilds
+if ! tc_is_live && [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then
+ # fails to compile on Solaris and macOS, need to check why
+ : KEYWORDS="~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
+ KEYWORDS="~arm64-macos ~x64-macos ~x64-solaris"
+fi
+
+# use alternate source for Apple M1 (also works for x86_64)
+IANSGCCVER="gcc-13.2-darwin-r0"
+SRC_URI+=" elibc_Darwin? (
+https://github.com/iains/gcc-13-branch/archive/refs/tags/${IANSGCCVER}.tar.gz )"
+
+# 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
+RDEPEND="!prefix-guest? ( elibc_glibc? ( sys-libs/glibc[cet(-)?] ) )"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ kernel_linux? ( >=${CATEGORY}/binutils-2.30[cet(-)?] )
+ kernel_Darwin? (
+ || ( ${CATEGORY}/binutils-apple ${CATEGORY}/native-cctools )
+ )"
+
+src_unpack() {
+ if use elibc_Darwin ; then
+ # just use Ian's source, not the main one
+ S="${WORKDIR}/gcc-13-branch-${IANSGCCVER}"
+ fi
+ default
+}
+
+src_prepare() {
+ if [[ ${CHOST} == *-darwin* ]] ; then
+ # https://bugs.gentoo.org/898610#c17
+ # kill no_pie patch, it breaks things here
+ rm "${WORKDIR}"/patch/09_all_nopie-all-flags.patch || die
+ # fails on Darwin's sources
+ rm "${WORKDIR}"/patch/81_all_match.p*.patch
+ fi
+ # doesn't apply on official and Darwin sources
+ rm "${WORKDIR}"/patch/31_all_gm2_make_P_var.patch
+
+ toolchain_src_prepare
+
+ eapply_user
+
+ eapply "${FILESDIR}"/${PN}-13-fix-cross-fixincludes.patch
+
+ # make it have correct install_names on Darwin
+ eapply -p1 "${FILESDIR}"/4.3.3/darwin-libgcc_s-installname.patch
+
+ if [[ ${CHOST} == powerpc*-darwin* ]] ; then
+ # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=44107
+ sed -i -e 's|^ifeq (/usr/lib,|ifneq (/usr/lib,|' \
+ libgcc/config/t-slibgcc-darwin || die
+ fi
+
+ if [[ ${CHOST} == *-solaris* ]] ; then
+ # madvise is not available in the compatibility mode GCC uses,
+ # posix_madvise however, is
+ sed -i -e 's/madvise/posix_madvise/' gcc/cp/module.cc || die
+ fi
+
+ if [[ ${CHOST} == *-darwin* ]] ; then
+ # 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
+
+ # rip out specific macos version min
+ sed -i -e 's/-mmacosx-version-min=11.0//' \
+ libgcc/config/aarch64/t-darwin \
+ libgcc/config/aarch64/t-heap-trampoline \
+ || die
+ fi
+}
+
+src_configure() {
+ local myconf=()
+ case ${CTARGET}:" ${USE} " in
+ powerpc*-darwin*)
+ # bug #381179
+ filter-flags "-mcpu=*" "-mtune=*"
+ # bug #657522
+ # A bug in configure checks whether -no-pie works, but the
+ # compiler doesn't pass -no-pie onto the linker if -fno-PIE
+ # isn't passed, so the configure check always finds -no-pie
+ # is accepted. (Likewise, when -fno-PIE is passed, the
+ # compiler passes -no_pie onto the linker.)
+ # Since our linker doesn't grok this, avoid above checks to
+ # be run
+ # NOTE: later ld64 does grok -no_pie, not -no-pie (as checked)
+ export gcc_cv_c_no_fpie=no
+ export gcc_cv_no_pie=no
+ ;;
+ *-darwin20)
+ # use sysroot with the linker, #756160
+ export gcc_cv_ld_sysroot=yes
+ ;;
+ *-solaris*)
+ # todo: some magic for native vs. GNU linking?
+ myconf+=( --with-gnu-ld --with-gnu-as --enable-largefile )
+ # Solaris 11 defines this in its headers, but that causes a
+ # mismatch whilst compiling, bug #657514
+ #export ac_cv_func_aligned_alloc=no
+ #export ac_cv_func_memalign=no
+ #export ac_cv_func_posix_memalign=no
+ append-ldflags -L"${EPREFIX}"/usr/lib \
+ -Wl,-rpath -Wl,"${EPREFIX}"/usr/lib
+ ;;
+ i[34567]86-*-linux*:*" prefix "*)
+ # to allow the linux-x86-on-amd64.patch become useful, we need
+ # to enable multilib, even if there is just one multilib option.
+ myconf+=( --enable-multilib )
+ if [[ ${CBUILD:-${CHOST}} == "${CHOST}" ]]; then
+ # we might be on x86_64-linux, but don't do cross-compile, so
+ # tell the host-compiler to really create 32bits (for stage1)
+ # (real x86-linux-gcc also accept -m32).
+ append-flags -m32
+ fi
+ ;;
+ esac
+
+ if [[ ${CHOST} == *-darwin ]] ; then
+ # GCC' Darwin fork enables support for "-stdlib=libc++"
+ # unconditionally, and its default include path is invalid,
+ # causing package build failures due to missing header.
+ # But more importantly, it breaks the assumption of many build
+ # scripts and changes their CFLAGS and linking behaviors. The
+ # situation is tricky and needs careful considerations.
+ # For now, just disable support for "-stdlib=libc++".
+ myconf+=( --with-gxx-libcxx-include-dir=no )
+ fi
+
+ # Since GCC 4.1.2 some non-posix (?) /bin/sh compatible code is used, at
+ # least on Solaris, and AIX /bin/sh is way too slow,
+ # so force it to use $BASH (that portage uses) - it can't be EPREFIX
+ # in case that doesn't exist yet
+ export CONFIG_SHELL="${CONFIG_SHELL:-${BASH}}"
+ toolchain_src_configure "${myconf[@]}"
+}
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [gentoo-commits] repo/proj/prefix:master commit in: sys-devel/gcc/files/, sys-devel/gcc/
@ 2024-12-29 11:58 Fabian Groffen
0 siblings, 0 replies; 8+ messages in thread
From: Fabian Groffen @ 2024-12-29 11:58 UTC (permalink / raw
To: gentoo-commits
commit: 4118d44f4498c8501798d6982bc44e6707af63b3
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 29 11:57:23 2024 +0000
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Sun Dec 29 11:57:23 2024 +0000
URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=4118d44f
sys-devel/gcc-14.2.1_p20241221: version bump
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>
sys-devel/gcc/Manifest | 3 +
...MVE-intrinsics-Fix-support-for-predicate-.patch | 144 ++++++++++++++++++++
sys-devel/gcc/gcc-14.2.1_p20241221.ebuild | 145 +++++++++++++++++++++
3 files changed, 292 insertions(+)
diff --git a/sys-devel/gcc/Manifest b/sys-devel/gcc/Manifest
index b5ee116363..845e01cb0f 100644
--- a/sys-devel/gcc/Manifest
+++ b/sys-devel/gcc/Manifest
@@ -2,6 +2,7 @@ DIST gcc-13.2.0-musl-patches-2.tar.xz 5292 BLAKE2B c057d6574d03c05854edaa9f3fd40
DIST gcc-13.2.0-patches-16.tar.xz 44792 BLAKE2B 0b6b584d68e69685638695596b780249ca0119ad362747a82d886fd10f77ceb05d02e033e906a090c67f44b1977f40df6a95206d81a32dd15e2f5413c6c92496 SHA512 324d9e63d16c35d55edde20de049162c01b0d487b4548d06c49f0da04a761ec255bc5e020cc2e7f60d12f5d129768afdcf7c86a59126f71f388ab375c34be6de
DIST gcc-13.3.0-arm64-darwin.patch 570896 BLAKE2B 6fcecb4adbf607f06a82b926c4b198a094a136210875320d784f49ac88e940d9b3c110f5b4e43df6751e40cdd90b82d00d461178c520b8692e1be427804b4cad SHA512 6165b6201f4ef94ee254ea40410911f5e5e1a05d80d4da2fce90b3db94000c3d5c5a28c9a4ad1a43387faae68d94fbef8e4d24e1ff049b9c0014c00f6f50757b
DIST gcc-13.3.0.tar.xz 87909952 BLAKE2B 0f3728b026bd8aab0e469dda54facf157a4b753d3405a74b0be6105a6e3a493d26df4007d90ae4e05d86277d41873312638f9589d1757cee80ca84de7f2099e3 SHA512 ed5f2f4c6ed2c796fcf2c93707159e9dbd3ddb1ba063d549804dd68cdabbb6d550985ae1c8465ae9a336cfe29274a6eb0f42e21924360574ebd8e5d5c7c9a801
+DIST gcc-14-20241221.tar.xz 88198252 BLAKE2B 7491c2e1c8885e201859143bdf5cae95af4c0db77709ec7d761ad535df30042f5deb8488ba7c508de3673e4b0f2af1de8d17476f39cd47b745ddccec6a9e4470 SHA512 91fe1e1d1f8e8fad64930a2eadf942a542bd42f841fceb49f475bccac00f04692b8cd38821ea9ee05f78b5c51001d8bd39df5f71f3a3d89aab8980019cea9be8
DIST gcc-14.1.0-arm64-darwin.patch 200436 BLAKE2B ba92f8a1586f01085775c2a0a724f597a3e51468ee906169f41b46e58f2c615173120e38b4fc8e800d67cbdd97375564e009d3d1bd810293897466c817e03dcf SHA512 8ea5c3f80fa406294a95fa86264998c9090a4b7e734563e336dd670c0f8da0cb6bee8f80296905c0d7d6f17d0b895147d703951e94ba71466423d959404f5a0e
DIST gcc-14.1.0-macos-SDK-availability.patch 9044 BLAKE2B 783340d55590337b156d3fd866027a931bafc3bd7d6a14c7d7940e13ff6fffebe351dae3a6d98c0ba7c7c5b4f226179bb24a8714f5ca334170ab353e0c2f4be8 SHA512 6db397718d20eca0b4caf7de45358379d05e83bfc4cb4d800aaf82dd8b7994af5dbfd9ff56e3480722dfec78ad381457034552358fc1e8eeb0a5a3e3ad0e4cc1
DIST gcc-14.1.0-musl-patches-1.tar.xz 3600 BLAKE2B 4cd920b7ca1f122cae806707564d8e45bfd48e78c88788a12a301f6068b5a5f335d8885e67479ac536c66aeaa81f2ecb7240ae56e9fc821a7246ab66b453711f SHA512 61c48d90a55dfc2129d96aee69d939d6a89f6407f69f7bd12c1a619f28989f471fd219d731958f8e62b0fd650c32300f0ad8dc06d5df23d9fc8c1a77fe210c25
@@ -9,5 +10,7 @@ DIST gcc-14.1.0-patches-3.tar.xz 11868 BLAKE2B 06d079766bfbaddd066cd70f2d3f5e9ef
DIST gcc-14.1.0-patches-4.tar.xz 11620 BLAKE2B c819fbdea1f3bf10c8d4214d4c33cf28c1410171d2833b6f8c1225eeefe749ddb815067b3fdb750e5839761aee8d39ffc51ffb492f88e630076818a61b18362b SHA512 0d6e1b04591607dfc8022124b186ce499467c32db7667ee1a640fe2e07706597edc0e4ad5c7ebcb75c8f5fc6e45e9b9ef715402c71ff9ab21fe380007fe5d84f
DIST gcc-14.1.0.tar.xz 92265736 BLAKE2B 7efd6574b8bca081de6e31480ec0565c6d7fb773383e8e1fdcc17e35bba2bf44b3f4f995cdbcccd001689926e96a6563ef3d099902fe3b37ab09dcf553ab0596 SHA512 e9e224f2b26646fcf038d28dfa08b94c623bc57941f99894a321d01c600f7c68aff6b8837fd25e73e540de1f8de5606e98694a62cdcdfb525ce768b3ef6879ea
DIST gcc-14.2.0-arm64-darwin.patch 203103 BLAKE2B a040283f1ffdd0e912767b64515c18d194eb9cf2f6c55b93e7a9fab8436920b4461539ebf2482e26119001ea6f42f7294670351d853b42ca333f870365e9cc9b SHA512 c96d92289492d76f6e4e6376148c53d7e962fd15d03b1ecfe16f8036a0ff0c1e9277bf00566ecfe0d54765a679ce7d7470f6e696f8e3fe7b419000b924260fcf
+DIST gcc-14.2.0-patches-7.tar.xz 14244 BLAKE2B 11236e91e1fe83fec8ffaa40ec0cdd4b52a00a951e9aa9a7a0a932b234b8f1a9603333a7ccf55859f4ef53dd4d8ad1fd5c1d2514b6e45fce5b86bb58622a0ecc SHA512 5a4d86d943e31fa068b5a784c0132bd83c23243dcb3cf972557a42e004469a415e1b3185f31b1bb36f916594d475f266a2fda031a414e4a15e0bbfe471269eee
DIST gcc-14.2.0.tar.xz 92306460 BLAKE2B 87baf2a06dfa75d8fb6cd62c747ef1f57d3b9bbbe33a360d9ed3de4b4dbeaa8d920504c67e409bd9863414202c14fd854b46108e984418171205119216d03d3b SHA512 932bdef0cda94bacedf452ab17f103c0cb511ff2cec55e9112fc0328cbf1d803b42595728ea7b200e0a057c03e85626f937012e49a7515bc5dd256b2bf4bc396
+DIST gcc-14.2.1-arm64-darwin.patch 199458 BLAKE2B 7ba878a19c1451e84f0af531b58177bf8c5358211ab704b8e58ff85bd453634b86f743dcb7bc9c89960fede115c9aa60209489b9fab8885e081e0cae2507359f SHA512 af8f3a7ce7776d004336686fd28080c6e41ef73aaae6e6c49db3495a99509162f9e16246d18034b0d5ec03bf109e7bf14b075564b1836d1edbe9034b202152d9
DIST gcc-validate-failures-a447cd6dee206facb66720bdacf0c765a8b09f33.py 27537 BLAKE2B 96c7474de0bc50ab890a91551412398c979396c43aa237a4b6d8baa98ce7fda2cc9f5a755a03fd9d055d885ee2fb40ba29644a0649c24398361ce75a20fae634 SHA512 409434953351cf1f2287f1e4a4fbde5b28a27add35ddd284080acec71b33cb4ec5e1c07f41a79fac060bd6f1eedd198812495141923e410ded907429fe515f83
diff --git a/sys-devel/gcc/files/gcc-14.2.1_p20241221-arm-Revert-arm-MVE-intrinsics-Fix-support-for-predicate-.patch b/sys-devel/gcc/files/gcc-14.2.1_p20241221-arm-Revert-arm-MVE-intrinsics-Fix-support-for-predicate-.patch
new file mode 100644
index 0000000000..026cf14cb8
--- /dev/null
+++ b/sys-devel/gcc/files/gcc-14.2.1_p20241221-arm-Revert-arm-MVE-intrinsics-Fix-support-for-predicate-.patch
@@ -0,0 +1,144 @@
+https://gcc.gnu.org/PR118176
+
+From ecd031a9470257324484c66b51c6baff943e01ab Mon Sep 17 00:00:00 2001
+Message-ID: <ecd031a9470257324484c66b51c6baff943e01ab.1734954594.git.sam@gentoo.org>
+From: Christophe Lyon <christophe.lyon@linaro.org>
+Date: Mon, 23 Dec 2024 08:11:34 +0000
+Subject: [PATCH] Revert "arm: [MVE intrinsics] Fix support for predicate
+ constants [PR target/114801]"
+
+This reverts commit 0631c5770e8162dbe67c73dee0327313c19822c2.
+---
+ gcc/config/arm/arm-mve-builtins.cc | 32 +--------------
+ .../gcc.target/arm/mve/pr108443-run.c | 2 +-
+ gcc/testsuite/gcc.target/arm/mve/pr108443.c | 4 +-
+ gcc/testsuite/gcc.target/arm/mve/pr114801.c | 39 -------------------
+ 4 files changed, 4 insertions(+), 73 deletions(-)
+ delete mode 100644 gcc/testsuite/gcc.target/arm/mve/pr114801.c
+
+diff --git a/gcc/config/arm/arm-mve-builtins.cc b/gcc/config/arm/arm-mve-builtins.cc
+index ec856f7d6168..e1826ae40527 100644
+--- a/gcc/config/arm/arm-mve-builtins.cc
++++ b/gcc/config/arm/arm-mve-builtins.cc
+@@ -2107,37 +2107,7 @@ function_expander::add_input_operand (insn_code icode, rtx x)
+ mode = GET_MODE (x);
+ }
+ else if (VALID_MVE_PRED_MODE (mode))
+- {
+- if (CONST_INT_P (x))
+- {
+- if (mode == V8BImode || mode == V4BImode)
+- {
+- /* In V8BI or V4BI each element has 2 or 4 bits, if those bits
+- aren't all the same, gen_lowpart might ICE. Canonicalize all
+- the 2 or 4 bits to all ones if any of them is non-zero. V8BI
+- and V4BI multi-bit masks are interpreted byte-by-byte at
+- instruction level, but such constants should describe lanes,
+- rather than bytes. See the section on MVE intrinsics in the
+- Arm ACLE specification. */
+- unsigned HOST_WIDE_INT xi = UINTVAL (x);
+- xi |= ((xi & 0x5555) << 1) | ((xi & 0xaaaa) >> 1);
+- if (mode == V4BImode)
+- xi |= ((xi & 0x3333) << 2) | ((xi & 0xcccc) >> 2);
+- if (xi != UINTVAL (x))
+- warning_at (location, 0, "constant predicate argument %d"
+- " (%wx) does not map to %d lane numbers,"
+- " converted to %wx",
+- opno, UINTVAL (x) & 0xffff,
+- mode == V8BImode ? 8 : 4,
+- xi & 0xffff);
+-
+- x = gen_int_mode (xi, HImode);
+- }
+- x = gen_lowpart (mode, x);
+- }
+- else
+- x = force_lowpart_subreg (mode, x, GET_MODE (x));
+- }
++ x = gen_lowpart (mode, x);
+
+ m_ops.safe_grow (m_ops.length () + 1, true);
+ create_input_operand (&m_ops.last (), x, mode);
+diff --git a/gcc/testsuite/gcc.target/arm/mve/pr108443-run.c b/gcc/testsuite/gcc.target/arm/mve/pr108443-run.c
+index b894f019b8bb..cb4b45bd3056 100644
+--- a/gcc/testsuite/gcc.target/arm/mve/pr108443-run.c
++++ b/gcc/testsuite/gcc.target/arm/mve/pr108443-run.c
+@@ -16,7 +16,7 @@ __attribute__ ((noipa)) partial_write (uint32_t *a, uint32x4_t v, unsigned short
+
+ int main (void)
+ {
+- unsigned short p = 0x00FF;
++ unsigned short p = 0x00CC;
+ uint32_t a[] = {0, 0, 0, 0};
+ uint32_t b[] = {0, 0, 0, 0};
+ uint32x4_t v = vdupq_n_u32 (0xFFFFFFFFU);
+diff --git a/gcc/testsuite/gcc.target/arm/mve/pr108443.c b/gcc/testsuite/gcc.target/arm/mve/pr108443.c
+index 0c0e2dd6eb8f..c5fbfa4a1bb7 100644
+--- a/gcc/testsuite/gcc.target/arm/mve/pr108443.c
++++ b/gcc/testsuite/gcc.target/arm/mve/pr108443.c
+@@ -7,8 +7,8 @@
+ void
+ __attribute__ ((noipa)) partial_write_cst (uint32_t *a, uint32x4_t v)
+ {
+- vstrwq_p_u32 (a, v, 0x00FF);
++ vstrwq_p_u32 (a, v, 0x00CC);
+ }
+
+-/* { dg-final { scan-assembler {mov\tr[0-9]+, #255} } } */
++/* { dg-final { scan-assembler {mov\tr[0-9]+, #204} } } */
+
+diff --git a/gcc/testsuite/gcc.target/arm/mve/pr114801.c b/gcc/testsuite/gcc.target/arm/mve/pr114801.c
+deleted file mode 100644
+index ab3130fd4ce8..000000000000
+--- a/gcc/testsuite/gcc.target/arm/mve/pr114801.c
++++ /dev/null
+@@ -1,39 +0,0 @@
+-/* { dg-do compile } */
+-/* { dg-require-effective-target arm_v8_1m_mve_ok } */
+-/* { dg-options "-O2" } */
+-/* { dg-add-options arm_v8_1m_mve } */
+-/* { dg-final { check-function-bodies "**" "" "" } } */
+-
+-#include <arm_mve.h>
+-
+-/*
+-** test_32:
+-**...
+-** mov r[0-9]+, #65295 @ movhi
+-**...
+-*/
+-uint32x4_t test_32() {
+- /* V4BI predicate converted to 0xff0f. */
+- return vdupq_m_n_u32(vdupq_n_u32(0xffffffff), 0, 0x4f02); /* { dg-warning {constant predicate argument 3 \(0x4f02\) does not map to 4 lane numbers, converted to 0xff0f} } */
+-}
+-
+-/*
+-** test_16:
+-**...
+-** mov r[0-9]+, #12339 @ movhi
+-**...
+-*/
+-uint16x8_t test_16() {
+- /* V8BI predicate converted to 0x3033. */
+- return vdupq_m_n_u16(vdupq_n_u16(0xffff), 0, 0x3021); /* { dg-warning {constant predicate argument 3 \(0x3021\) does not map to 8 lane numbers, converted to 0x3033} } */
+-}
+-
+-/*
+-** test_8:
+-**...
+-** mov r[0-9]+, #23055 @ movhi
+-**...
+-*/
+-uint8x16_t test_8() {
+- return vdupq_m_n_u8(vdupq_n_u8(0xff), 0, 0x5a0f);
+-}
+
+base-commit: e883a7082fecfd85694b275bec4a2e428ac9a081
+prerequisite-patch-id: 4000f228fd3953eb9877fab7b9493cd86f6bc771
+prerequisite-patch-id: d61e09af01bb7358c1df6abf5d2c4b7849ab4676
+prerequisite-patch-id: 54a4cfb376547141937d7e321d7b4554c1e3afe7
+prerequisite-patch-id: 3117f4e58bd5c0a1aca48af82106bb7f779842fa
+prerequisite-patch-id: a470cf090a6867789c0722d012786c6066d3e706
+--
+2.47.1
+
diff --git a/sys-devel/gcc/gcc-14.2.1_p20241221.ebuild b/sys-devel/gcc/gcc-14.2.1_p20241221.ebuild
new file mode 100644
index 0000000000..e99242970c
--- /dev/null
+++ b/sys-devel/gcc/gcc-14.2.1_p20241221.ebuild
@@ -0,0 +1,145 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+TOOLCHAIN_PATCH_DEV="sam"
+TOOLCHAIN_HAS_TESTS=1
+PATCH_GCC_VER="14.2.0"
+PATCH_VER="7"
+MUSL_VER="1"
+MUSL_GCC_VER="14.1.0"
+PYTHON_COMPAT=( python3_{10..12} )
+
+if [[ -n ${TOOLCHAIN_GCC_RC} ]] ; then
+ # Cheesy hack for RCs
+ MY_PV=$(ver_cut 1).$((($(ver_cut 2) + 1))).$((($(ver_cut 3) - 1)))-RC-$(ver_cut 5)
+ MY_P=${PN}-${MY_PV}
+ GCC_TARBALL_SRC_URI="mirror://gcc/snapshots/${MY_PV}/${MY_P}.tar.xz"
+ TOOLCHAIN_SET_S=no
+ S="${WORKDIR}"/${MY_P}
+fi
+
+inherit toolchain
+
+if tc_is_live ; then
+ # Needs to be after inherit (for now?), bug #830908
+ EGIT_BRANCH=releases/gcc-$(ver_cut 1)
+elif [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then
+ # m68k doesnt build (ICE, bug 932733)
+ KEYWORDS="~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
+ :;
+fi
+
+# use alternate source for Apple M1 (also works for x86_64)
+SRC_URI+=" elibc_Darwin? ( https://dev.gentoo.org/~grobian/distfiles/gcc-14.2.1-arm64-darwin.patch )"
+IUSE+=" system-bootstrap"
+
+if [[ ${CATEGORY} != cross-* ]] ; then
+ # 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
+ RDEPEND="!prefix-guest? ( elibc_glibc? ( sys-libs/glibc[cet(-)?] ) )"
+ DEPEND="${RDEPEND}"
+fi
+
+src_prepare() {
+ # apply big arm64-darwin patch first thing
+ use elibc_Darwin && eapply "${DISTDIR}"/${PN}-14.2.1-arm64-darwin.patch
+
+ # run as with - on pipe (for Clang 16)
+ eapply "${FILESDIR}"/${PN}-14.2.0-darwin-as-dash-pipe.patch
+
+ # make sure 64-bits native targets don't screw up the linker paths
+ eapply "${FILESDIR}"/gcc-12-no-libs-for-startfile.patch
+
+ local p upstreamed_patches=(
+ # add them here
+ )
+ for p in "${upstreamed_patches[@]}"; do
+ rm -v "${WORKDIR}/patch/${p}" || die
+ done
+
+ toolchain_src_prepare
+
+ # make it have correct install_names on Darwin
+ eapply -p1 "${FILESDIR}"/4.3.3/darwin-libgcc_s-installname.patch
+
+ if [[ ${CHOST} == powerpc*-darwin* ]] ; then
+ # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=44107
+ sed -i -e 's|^ifeq (/usr/lib,|ifneq (/usr/lib,|' \
+ libgcc/config/t-slibgcc-darwin || die
+ fi
+
+ if [[ ${CHOST} == *-solaris* ]] ; then
+ # madvise is not available in the compatibility mode GCC uses,
+ # posix_madvise however, is
+ sed -i -e 's/madvise/posix_madvise/' gcc/cp/module.cc || die
+ fi
+
+ if [[ ${CHOST} == *-darwin* ]] ; then
+ use system-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/EGREP 'ld64|dyld'/& | head -n1/" \
+ gcc/configure{.ac,} || die
+
+ # rip out specific macos version min
+ sed -i -e 's/-mmacosx-version-min=11.0//' \
+ libgcc/config/aarch64/t-darwin \
+ libgcc/config/aarch64/t-heap-trampoline \
+ || die
+ fi
+
+ eapply "${FILESDIR}"/${PN}-13-fix-cross-fixincludes.patch
+ eapply "${FILESDIR}"/gcc-14.2.1_p20241221-arm-Revert-arm-MVE-intrinsics-Fix-support-for-predicate-.patch
+ eapply_user
+}
+
+src_configure() {
+ local myconf=()
+ case ${CTARGET}:" ${USE} " in
+ powerpc*-darwin*)
+ # bug #381179
+ filter-flags "-mcpu=*" "-mtune=*"
+ # bug #657522
+ # A bug in configure checks whether -no-pie works, but the
+ # compiler doesn't pass -no-pie onto the linker if -fno-PIE
+ # isn't passed, so the configure check always finds -no-pie
+ # is accepted. (Likewise, when -fno-PIE is passed, the
+ # compiler passes -no_pie onto the linker.)
+ # Since our linker doesn't grok this, avoid above checks to
+ # be run
+ # NOTE: later ld64 does grok -no_pie, not -no-pie (as checked)
+ export gcc_cv_c_no_fpie=no
+ export gcc_cv_no_pie=no
+ ;;
+ *-darwin20)
+ # use sysroot with the linker, #756160
+ export gcc_cv_ld_sysroot=yes
+ ;;
+ *-solaris*)
+ # todo: some magic for native vs. GNU linking?
+ myconf+=( --with-gnu-ld --with-gnu-as --enable-largefile )
+ ;;
+ i[34567]86-*-linux*:*" prefix "*)
+ # to allow the linux-x86-on-amd64.patch become useful, we need
+ # to enable multilib, even if there is just one multilib option.
+ myconf+=( --enable-multilib )
+ if [[ ${CBUILD:-${CHOST}} == "${CHOST}" ]]; then
+ # we might be on x86_64-linux, but don't do cross-compile, so
+ # tell the host-compiler to really create 32bits (for stage1)
+ # (real x86-linux-gcc also accept -m32).
+ append-flags -m32
+ fi
+ ;;
+ esac
+
+ # Since GCC 4.1.2 some non-posix (?) /bin/sh compatible code is used, at
+ # least on Solaris, and AIX /bin/sh is way too slow,
+ # so force it to use $BASH (that portage uses) - it can't be EPREFIX
+ # in case that doesn't exist yet
+ export CONFIG_SHELL="${CONFIG_SHELL:-${BASH}}"
+ toolchain_src_configure "${myconf[@]}"
+}
^ permalink raw reply related [flat|nested] 8+ messages in thread
end of thread, other threads:[~2024-12-29 11:58 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-19 18:53 [gentoo-commits] repo/proj/prefix:master commit in: sys-devel/gcc/files/, sys-devel/gcc/ Sam James
-- strict thread matches above, loose matches on Subject: below --
2024-12-29 11:58 Fabian Groffen
2024-01-13 14:33 Fabian Groffen
2022-06-06 16:51 Fabian Groffen
2021-09-12 8:41 Sam James
2021-09-05 10:49 Fabian Groffen
2020-06-21 18:16 Fabian Groffen
2018-06-07 12:54 Fabian Groffen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox