From 6508ba6ead139a99f92370d82862c8fa3f90e9ad Mon Sep 17 00:00:00 2001 From: Sam James Date: Mon, 21 Oct 2024 12:46:44 +0100 Subject: sys-devel/gcc: fix header compatibility with Clang for 15 Bug: https://gcc.gnu.org/PR117220 Signed-off-by: Sam James --- sys-devel/gcc/Manifest | 1 + sys-devel/gcc/gcc-15.0.0_pre20241020-r1.ebuild | 53 ++++++++++++++++++++++++++ 2 files changed, 54 insertions(+) create mode 100644 sys-devel/gcc/gcc-15.0.0_pre20241020-r1.ebuild (limited to 'sys-devel') diff --git a/sys-devel/gcc/Manifest b/sys-devel/gcc/Manifest index eaae9255773f..fa9501673d6b 100644 --- a/sys-devel/gcc/Manifest +++ b/sys-devel/gcc/Manifest @@ -40,6 +40,7 @@ DIST gcc-15.0.0-patches-14.tar.xz 14764 BLAKE2B 3da7b4d81ea45ca1254ab9f290ca0c94 DIST gcc-15.0.0-patches-15.tar.xz 13116 BLAKE2B ec558b7ddf5907f63c4cde12a5a2b2d563d4db127b6da55682d066db12c5556ab2e70ef62cf019f20479cfd3d6c76a0f7da17dd5e729506b1abc0fad55ed82c4 SHA512 9fcf9f3e5f9d070061b9c636147f8b43fc8254314b51dce52a7a59d525309160da9fc950b64cac04644027a2b66b675bcc741c5883ade2d630cf2d4286b35d5b DIST gcc-15.0.0-patches-16.tar.xz 16392 BLAKE2B 1f97157c41a56fb0458711bdf9963ad2cc52373e2f8f2bf35eb1ecfd915aef92384ca4a5d2f7b35bfb51b76f372c4f94dbddb9271ce56ed66a288586b0d09563 SHA512 cf2e0929dd6595d7619f12289b2d50571bcc84bf1051fe9d7c57c18a2e2c076644c673758e258411c6542e53519fdf4bcb2112be98cb44e4c4806355a147f9ed DIST gcc-15.0.0-patches-17.tar.xz 19144 BLAKE2B b66b93a4de5013870941a76bb271dc773f87c7929d50cdf30517dae59bea52be6640d4ebccfb9aa686c5993ec1bd9d1c1f913b85b0b651fc8fa79cdd5d10a58f SHA512 538442ec20f030bf1332dbda2943d408cd3febe2f8860caad73a0910ee39621e30263b3ece22dcd5e71a7e74b439380c80dc4c0bad27d874463666d20dc6ae5b +DIST gcc-15.0.0-patches-18.tar.xz 19588 BLAKE2B 4b5a9a0a46250ca274512eb9ba3cdeebddb7e348756f38bf4afeb44377ff686c11da4953accb282a64a7c07aed593d76b823dc4cf5690a81eb3f620c080d4703 SHA512 53731849a95e13a4409aaf5976ccd84861ac45612fe3d019021a17774c4fdd660796d2e87702b0fe5708941382f21f0d57d56341c5d16b02af8f4a782513add3 DIST gcc-8.5.0-patches-4.tar.xz 18616 BLAKE2B 7594cbaea5daecf1a0b3d526c06aeba0a84c6da66aee2e105a51fda6be8d30a37ccc3814281b284a4582d892a1d556bca063551584edfc2525bed8ea5b6888e7 SHA512 1aa5742c361186637e7855f06feb1a4547e7d4d5de6e51f3d049e0ef3c19e2eff179465f52781739f59422035b7f8e4c0efa3844849f920f3c96acfdc37ca6a6 DIST gcc-8.5.0.tar.xz 63841008 BLAKE2B aa81a1a730fd7371360f6abed6ba78b5843fd18c58d5de5687acc320741b9e430e85df3535a1ef7a26051409be8d2f0945f503e5968480d919103123a99d4b12 SHA512 92f599680e6b7fbce88bcdda810f468777d541e5fddfbb287f7977d51093de2a5178bd0e6a08dfe37090ea10a0508a43ccd00220041abbbec33f1179bfc174d8 DIST gcc-9.5.0-patches-2.tar.xz 14324 BLAKE2B 1d3bf3e673108ad2fcdcb86daefb4603d1c9f6aa815e34d1591054d466b76d6f50cce124ab4760528c4951ea16eb00888a3e6485417f81ebf250548732df4a8e SHA512 a6d6f650aaf0bd193a17ac279649f0544a282cea295824384c59341c3000eac4b574b60e00dd427585d928f9768166abf85168b47772132790ad98854acacbbf diff --git a/sys-devel/gcc/gcc-15.0.0_pre20241020-r1.ebuild b/sys-devel/gcc/gcc-15.0.0_pre20241020-r1.ebuild new file mode 100644 index 000000000000..c9069a189797 --- /dev/null +++ b/sys-devel/gcc/gcc-15.0.0_pre20241020-r1.ebuild @@ -0,0 +1,53 @@ +# 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="15.0.0" +PATCH_VER="18" +MUSL_VER="2" +MUSL_GCC_VER="15.0.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=master +elif [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then + # Don't keyword live ebuilds + #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" + :; +fi + +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="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 + + eapply_user +} -- cgit v1.2.3-65-gdbad