commit:     1c76f7d638667398b9ca228a7addfd76c593605d
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Mon Dec  8 12:28:37 2025 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Mon Dec  8 12:28:37 2025 +0000
URL:        https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=1c76f7d6

sys-devel/gcc-15.2.0: version bump

Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>

 sys-devel/gcc/Manifest          |   3 ++
 sys-devel/gcc/gcc-15.2.0.ebuild | 111 ++++++++++++++++++++++++++++++++++++++++
 2 files changed, 114 insertions(+)

diff --git a/sys-devel/gcc/Manifest b/sys-devel/gcc/Manifest
index 821673db02..6e58c3a93a 100644
--- a/sys-devel/gcc/Manifest
+++ b/sys-devel/gcc/Manifest
@@ -20,4 +20,7 @@ DIST gcc-15.1.0-arm64-darwin.patch 201747 BLAKE2B 
ad3be735c358306501b51f801c6ab3
 DIST gcc-15.1.0-musl-patches-1.tar.xz 3036 BLAKE2B 
f7e8b794feb3c30252dd3e35b990c8a134d337e285a2778ad5575b04667cf01040bf4187252151cd57097cd6d440851843156c9631736f4f065ca8b7ce2f0678
 SHA512 
4d3f1660d89484f63ad6c238884415673cdfdabb8833cce2fe114193b52f11b3518b034881024527f6553de93936d15ed707d4d2b1e8221908a08ec67810464b
 DIST gcc-15.1.0-patches-1.tar.xz 18628 BLAKE2B 
ee5fc9d6a06374ccc8d85cd1e269514fde8fed9b1810867a199ac747c09fc166e11e54ba531d42ee2ffbab3ca80277f9ad3c873fbaa3530ff60e5f2bc25c41ba
 SHA512 
72992f0698f632c98abd6d8c7a7a38a109b2f064775a0c5029e44dc29cd88ae061cddd603d47eabced5af5f8571e0b73c9778080873c69dd4dc4766c60339b28
 DIST gcc-15.1.0.tar.xz 98268344 BLAKE2B 
a902ce99db4e93615879e435bcd0b96d5a16ea0af42598ca0e6d12913b2ce3651a98574c3264b2717b848e6b5a823b403ccca0adde463938d5b41aa3f1da0d34
 SHA512 
ddd35ca6c653dffa88f7c7ef9ee4cd806e156e0f3b30f4d63e75a8363361285cd566ee73127734cde6a934611de815bee3e32e24bfd2e0ab9f7ff35c929821c1
+DIST gcc-15.2.0-musl-patches-1.tar.xz 7168 BLAKE2B 
6b7cfb123c3a691693240db815e6852a1e6c3820baa499368c463e0a0c1490c701053cfea10bf1d33f89dd2ba7bbddf63c4e6e0976590e3aaf1fee78b9282079
 SHA512 
ab80ffd69b9ead1fe06a9433faaa97ae53947d214999e77ea363fa6435de080d031a1aa6869e1dc088e800317952f2dc249a9e872113db56fb76f0a432240871
+DIST gcc-15.2.0-patches-4.tar.xz 19912 BLAKE2B 
255d6435fe5b205d23d04eb885c55b421b1e6ffc30623fad5fe8a4cee5582f210e9851165b0976629d7e49288366a14635acdf1ad70f6d2fe288bdf88a9416a5
 SHA512 
f36c0a1e8abbb25cebfd93965950c072f33d8dbbc0be285e8e374a3602fe7e7cae3dfe44f24856d2231bcbfb40fe0c1de3b629e2f573d97f82212a7acf52ccc8
+DIST gcc-15.2.0.tar.xz 101056276 BLAKE2B 
e270320978ca690e6e8f5ef06414dc13caf561f16403a3783c76fbf3dcee57e755a2d5bba922bf7fcae0bb6120443755d819b003791ae823d54589dd799804de
 SHA512 
89047a2e07bd9da265b507b516ed3635adb17491c7f4f67cf090f0bd5b3fc7f2ee6e4cc4008beef7ca884b6b71dffe2bb652b21f01a702e17b468cca2d10b2de
 DIST gcc-validate-failures-a447cd6dee206facb66720bdacf0c765a8b09f33.py 27537 
BLAKE2B 
96c7474de0bc50ab890a91551412398c979396c43aa237a4b6d8baa98ce7fda2cc9f5a755a03fd9d055d885ee2fb40ba29644a0649c24398361ce75a20fae634
 SHA512 
409434953351cf1f2287f1e4a4fbde5b28a27add35ddd284080acec71b33cb4ec5e1c07f41a79fac060bd6f1eedd198812495141923e410ded907429fe515f83

diff --git a/sys-devel/gcc/gcc-15.2.0.ebuild b/sys-devel/gcc/gcc-15.2.0.ebuild
new file mode 100644
index 0000000000..ed4e8484ff
--- /dev/null
+++ b/sys-devel/gcc/gcc-15.2.0.ebuild
@@ -0,0 +1,111 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# Maintenance notes and explanations of GCC handling are on the wiki:
+# https://wiki.gentoo.org/wiki/Project:Toolchain/sys-devel/gcc
+
+TOOLCHAIN_PATCH_DEV="sam"
+TOOLCHAIN_HAS_TESTS=1
+PATCH_GCC_VER="15.2.0"
+PATCH_VER="4"
+MUSL_VER="1"
+MUSL_GCC_VER="15.2.0"
+PYTHON_COMPAT=( python3_{11..14} )
+
+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=master
+elif [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then
+       # Don't keyword live ebuilds
+       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://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/gcc/gcc-15.1.0.diff
 -> ${PN}-15.1.0-arm64-darwin.patch )"
+
+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() {
+       local p upstreamed_patches=(
+               # add them here
+       )
+       for p in "${upstreamed_patches[@]}"; do
+               rm -v "${WORKDIR}/patch/${p}" || die
+       done
+
+       toolchain_src_prepare
+
+       # apply big arm64-darwin patch first thing
+       use elibc_Darwin && eapply "${DISTDIR}"/${PN}-15.1.0-arm64-darwin.patch
+
+       # run as with - on pipe (for Clang 16)
+       eapply "${FILESDIR}"/${PN}-14.2.0-darwin-as-dash-pipe.patch
+
+       # fix build with libintl-0.23
+       eapply "${FILESDIR}"/${PN}-14.2.0-libintl-setlocale.patch
+
+       # make sure 64-bits native targets don't screw up the linker paths
+       eapply "${FILESDIR}"/gcc-12-no-libs-for-startfile.patch
+
+       # make it have correct install_names on Darwin
+       eapply -p1 "${FILESDIR}"/4.3.3/darwin-libgcc_s-installname.patch
+
+       if [[ ${CHOST} == *-solaris* ]] ; then
+               # codylib requires network socket libs to link
+               sed -i -e 's:(LDFLAGS) :&-L/lib/64 -lsocket -lnsl : ' \
+                       c++tools/Makefile.in || die
+               sed -i -e '/^LIBS =/s:=:= -L/lib/64 -lsocket -lnsl:' \
+                       gcc/Makefile.in || die
+       fi
+
+       eapply "${FILESDIR}"/${PN}-13-fix-cross-fixincludes.patch
+       eapply_user
+}
+
+src_configure() {
+       local myconf=()
+       case ${CTARGET}:" ${USE} " in
+               *-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[@]}"
+}

Reply via email to