summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-devel')
-rw-r--r--sys-devel/gcc/Manifest5
-rw-r--r--sys-devel/gcc/gcc-13.3.0.ebuild174
2 files changed, 177 insertions, 2 deletions
diff --git a/sys-devel/gcc/Manifest b/sys-devel/gcc/Manifest
index cdd006894a..1b263733fb 100644
--- a/sys-devel/gcc/Manifest
+++ b/sys-devel/gcc/Manifest
@@ -6,13 +6,14 @@ 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-20240323.tar.xz 84414636 BLAKE2B cd95fc9d83d9e2477597543af5ec4e9ac82029eca6deb8cd8f82b71132e3a54e5a770be201c9e596c48f936a169f60e19979128527f41086a9a12deebbfebb26 SHA512 b25fb0efbe7346f72407ad1102d877f2ed5b40a8bff88018db4541d15cd47a849d7aeb8706be3c2ca6256fc073fe6881c8ba74db220c80b01666195d3be038d4
DIST gcc-13.2-darwin-r0.tar.gz 137958605 BLAKE2B b6777b76baf2dc007c4080c0b7a6d448223747f0cf832e493e3b903b3bdb7f87a0e2e9cf41f9355769b178a72409b1e2866b3e73b1cc33ed0aba837f3a9e66c1 SHA512 a33177bd55d228d1df93e2a029e8af5d215ad8b2ebc84a0c90df629d6f69c5de0ed1ec9dd27bc21a62362522d83bad9a8f34407b89b13321b65f513fa2202dd2
DIST gcc-13.2.0-arm64-darwin.patch 470156 BLAKE2B 5ba9c380d488c1ceda2f4ece68701a51d1de3d82f6aa9c96f33c4f2066e7053356c00158eec524298c16c916ff1d14bb3560eedb90f09bade44970156e86c604 SHA512 4428340c79cad8f4324bb4f5962640805f45e4a2a2be165abb0386e283f863fad9dbff8eefa508ee30ba966691f604fdadfb4d42bc9cc4c29536feaae5c1f55a
DIST gcc-13.2.0-musl-patches-2.tar.xz 5292 BLAKE2B c057d6574d03c05854edaa9f3fd40e9149662b04f3ac7a7db3eb078d73a7b535726d1bf52e5b12736dedb2f9898ad731f2e48a6421fcfbf7b90f929dee072fcb SHA512 a691da0c87c443a5e9d23731f4005f27871c5b12bc9102873ffa24d374aa7b9fbd187c4f5635d23fa9ffb17e351e76173c2d3fdf40646e355c4cb314b538de69
-DIST gcc-13.2.0-patches-14.tar.xz 46928 BLAKE2B fce23bc5315f35b04a4976550c4b44578944a1b17e40c7553351eeb8a1ef0f3a2538da5a5e1ae6f37b784ff11bbd8a44b8f6eec542be63e34d984dee69e1cd81 SHA512 d7d52bb2915fd89c06b0134bede8db939cadbb1f2dcddf923bee2c3f9f577ff9e5e986b60420d892539edf82867a0d1bd635807814bc618b06a2b37cdaca893a
+DIST gcc-13.2.0-patches-16.tar.xz 44792 BLAKE2B 0b6b584d68e69685638695596b780249ca0119ad362747a82d886fd10f77ceb05d02e033e906a090c67f44b1977f40df6a95206d81a32dd15e2f5413c6c92496 SHA512 324d9e63d16c35d55edde20de049162c01b0d487b4548d06c49f0da04a761ec255bc5e020cc2e7f60d12f5d129768afdcf7c86a59126f71f388ab375c34be6de
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
+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-20240225.tar.xz 87651536 BLAKE2B 01283581b8684e0dce73b2d9a586e473f3c87753435d905e193816911edc06f9bd2a8d542a95d69f47f1c884124349520f410925b13b7bb51b913e603000d32f SHA512 f424b0935d8fdcf9ff55067467eac20a518a11c2cb14928a47e1a218cde1f4238091f25861daf417d1125c5d5d5465d32fc1b3cb04504b3ca99fe27a7a7d5792
DIST gcc-14.0.0-musl-patches-1.tar.xz 3576 BLAKE2B 692baee8a7709905d53aeb150d73a3721c4ba47ee5f397cfb1b5be905cf003ca02b60c94ee294d90ac39645cd5cdf186c7a3aa950c47d8cf680c128ed705b807 SHA512 0592ab98a7142e404623a6511c67dff61e9ade32c3fb2c0e75b456306e0af3799ad13252b50b3d2fdd31e5815d7f0b16b0ad63ab8386fe4d78729fc9c182d617
DIST gcc-14.0.0-patches-24.tar.xz 14280 BLAKE2B f5594e07f91a7871fc4470d84ecbf6576f53620c92f60821d2fdcf140869827d27a323d535af11b74f4b671ee7308e501f24841ceb0607ca3ebc032bd97d85b4 SHA512 d887b53a0849246bc79ee2510d7deffabc58fe7598e9e147e4a97fc3714341017627df3dae9a39ae5d3185946cb6e11d01a28aa1287958c401e641fa4312f48b
diff --git a/sys-devel/gcc/gcc-13.3.0.ebuild b/sys-devel/gcc/gcc-13.3.0.ebuild
new file mode 100644
index 0000000000..5004a9daf0
--- /dev/null
+++ b/sys-devel/gcc/gcc-13.3.0.ebuild
@@ -0,0 +1,174 @@
+# Copyright 1999-2024 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"
+MUSL_GCC_VER="13.2.0"
+PATCH_VER="16"
+MUSL_VER="2"
+PYTHON_COMPAT=( python3_{10..12} )
+
+if [[ ${PV} == *.9999 ]] ; then
+ MY_PV_2=$(ver_cut 2)
+ MY_PV_3=1
+ if [[ ${MY_PV_2} == 0 ]] ; then
+ MY_PV_2=0
+ MY_PV_3=0
+ else
+ MY_PV_2=$((${MY_PV_2} - 1))
+ fi
+
+ # e.g. 12.2.9999 -> 12.1.1
+ TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.${MY_PV_3}
+elif [[ -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
+ # 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/formula-patches/bda0faddfbfb392e7b9c9101056b2c5ab2500508/gcc/gcc-${PV}.diff -> gcc-${PV}-arm64-darwin.patch )"
+IUSE+=" 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}"
+ BDEPEND="amd64? ( >=${CATEGORY}/binutils-2.30[cet(-)?] )
+ kernel_Darwin? (
+ || ( ${CATEGORY}/binutils-apple ${CATEGORY}/native-cctools )
+ )"
+fi
+
+src_prepare() {
+ # apply big arm64-darwin patch first thing
+ use elibc_Darwin && eapply "${DISTDIR}"/gcc-${PV}-arm64-darwin.patch
+
+ # make sure 64-bits native targets don't screw up the linker paths
+ eapply "${FILESDIR}"/gcc-12-no-libs-for-startfile.patch
+
+ 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/8[12]_all_*match.pd*.patch || die
+ rm "${WORKDIR}"/patch/86_all_*seq*.patch || die
+ rm "${WORKDIR}"/patch/87_all_*MATCHPD*.patch || die
+ rm "${WORKDIR}"/patch/90_all_*genemit*.patch || die
+ fi
+
+ 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 bootstrap && eapply "${FILESDIR}"/${PN}-13-darwin14-bootstrap.patch
+
+ # our ld64 is a slight bit different, so tweak expression to not
+ # get confused and break the build
+ sed -i -e 's/grep ld64/grep :ld64/' gcc/configure || die
+
+ # 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_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 )
+ # 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
+
+ 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[@]}"
+}