From ccfa8907650e4c6a15c958cd5ba45d20b67b0e9b Mon Sep 17 00:00:00 2001 From: Laszlo Valko Date: Thu, 26 Sep 2024 01:40:15 +0200 Subject: [PATCH] Added gcc-11.3.1_p20230427. --- sys-devel/gcc/Manifest | 5 + sys-devel/gcc/gcc-11.3.1_p20230427.ebuild | 64 ++++++++++++ sys-devel/gcc/metadata.xml | 115 ++++++++++++++++++++++ 3 files changed, 184 insertions(+) create mode 100644 sys-devel/gcc/Manifest create mode 100644 sys-devel/gcc/gcc-11.3.1_p20230427.ebuild create mode 100644 sys-devel/gcc/metadata.xml diff --git a/sys-devel/gcc/Manifest b/sys-devel/gcc/Manifest new file mode 100644 index 0000000..bfa94ab --- /dev/null +++ b/sys-devel/gcc/Manifest @@ -0,0 +1,5 @@ +DIST gcc-11-20230427.tar.xz 76165128 BLAKE2B dd896b418c1fce35a61005d5b5c90cfd1246d37d23c2a8fc08bacd7d7ca84c353f3ccf5de2370ae5e5ca95c7ae3deab3565b3f65eb78b611dbe5ad4a256516f0 SHA512 fada917a832be5d2e15ee32f24e19fc87b851dc8e6fc75d1be6d25d3510dba408ae3ef3b245ff239c51aa3d243c95f12269695611e5c8965ba55f5aa4730778d +DIST gcc-11.4.0-musl-patches-2.tar.xz 4308 BLAKE2B a2335e155fc57816fed822a648e0eaefafcba9d04e1ad0fd7baeea5a694ab6f5e3c1678cb406f2a1bd17bab25cb01699d032713a1ccf337948dfda2093844607 SHA512 17b84f907cb1bd763873655e6f35fd3ed55a40b602b70a626f04f83b4cc89c6261db1661de78d4d969187a8c56e9f6305b742515a3836b962248a21df0df5d0c +DIST gcc-11.4.0-patches-9.tar.xz 14704 BLAKE2B 9aa2ecbac493d3040694e9930738e57d59a764b90ab92b91709c319b883f28ad108767e5d11e8b62af40bf1e583d5ff83a03e8c895f904bc6f41315ce9ab4f0a SHA512 ac8b7c6c382ffacc4e9d08299440fc237fa366ec36fb8eb7a8d426b64a4186384a262e6380dc83ed7f7240125ce26a8435c8a4e0e13976ef2652067a7129bd17 +EBUILD gcc-11.3.1_p20230427.ebuild 1605 BLAKE2B 65fc39711c23a635257ca2620c8f5f040c5a90c8df18f5c2b5584f646872a95ace4454d32a658d78afbe167e19193a11a02e777489af98165aa8565088822b9b SHA512 641ebcf7e7f93e51719cd20a72f8e94c31233fb57208b5ebee59994464c98254b04a2669c029239f1337c30a353903545a51dc4a7565dbe3f49b02365f643a21 +MISC metadata.xml 5254 BLAKE2B b64569d62dd67c2f2dab441bb2c4a65bcd61b4c9d8ad7543e8f91c583501d72ed1474abf785e68c48de298d8391de3d94b9b4020086b2b0fa9cc477114a92e9e SHA512 f1307b7865dc4c2c843b5f498196bf5710e45e3292181b43687ebe85b5e9b26203c9c83ee7872efe2cd93595eca430de91e3a5fd6900f0f62c875308ccbb0303 diff --git a/sys-devel/gcc/gcc-11.3.1_p20230427.ebuild b/sys-devel/gcc/gcc-11.3.1_p20230427.ebuild new file mode 100644 index 0000000..0b049cf --- /dev/null +++ b/sys-devel/gcc/gcc-11.3.1_p20230427.ebuild @@ -0,0 +1,64 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +TOOLCHAIN_PATCH_DEV="sam" +PATCH_GCC_VER="11.4.0" +PATCH_VER="9" +MUSL_VER="2" +MUSL_GCC_VER="11.4.0" + +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="~alpha amd64 arm arm64 hppa ~ia64 ~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}" + BDEPEND=">=${CATEGORY}/binutils-2.30[cet(-)?]" +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 +} diff --git a/sys-devel/gcc/metadata.xml b/sys-devel/gcc/metadata.xml new file mode 100644 index 0000000..67374f7 --- /dev/null +++ b/sys-devel/gcc/metadata.xml @@ -0,0 +1,115 @@ + + + + + toolchain@gentoo.org + Gentoo Toolchain Project + + + Build the ADA language (GNAT) frontend + + Enable support for Intel Control Flow Enforcement Technology (CET). + + Only effective on amd64/x86. + + Only provides benefits on newer CPUs. For Intel, the CPU + must be at least as new as Tiger Lake. For AMD, it must be + at least as new as Zen 3. This is harmless on older CPUs, + but provides no benefit either. + + When combined with USE=hardened, GCC will set -fcf-protection + by default when building software. The effect is minimal + on systems which do not support it, other than a possible + small increase in codesize for the NOPs. The generated + code is therefore compatible with i686 at the earliest. + + Enable support for the D programming language + + Enables GCC's 'checking' facility via --enable-checking=yes,extra,rtl. + + This adds checks to various compiler passes for integrity and input + validation. This can help catch possible miscompilations early as + well as latent bugs which could become real problems in future, but + at the cost of slower compile times when using GCC. + + Unrelated to backtraces. + + + Build packages with stack clash protection on by default as + a hardening measure. + + This enables -fstack-clash-protection by default which protects against + large memory allocations allowing stack smashing. + + May cause slightly increased codesize, but modern compilers + have been adapted to optimize well for this case, as + this mitigation is now quite common. + + See https://developers.redhat.com/blog/2020/05/22/stack-clash-mitigation-in-gcc-part-3 + and https://www.qualys.com/2017/06/19/stack-clash/stack-clash.txt. + + + Request full relocation on start from ld.so by default. + + This sets the -z,now (BIND_NOW) flag by default on all linker invocations. By + resolving all dynamic symbols at application startup, parts of the program + can be made read-only as a hardening measure. + + This is closely related to RELRO which is also separately + enabled by default. + + In some applications with many unresolved symbols (heavily plugin based, + for example), startup time may be impacted. + + Enable fixed-point arithmetic support for MIPS targets in gcc (Warning: significantly increases compile time!) + Build the GCC Go language frontend. + Add support for the framework for loop optimizations based on a polyhedral intermediate representation + Use accelerated 128-bit IEEE long double ABI (ppc64le only) + Enable libgccjit so other applications can embed gcc for Just-In-Time compilation. + 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) + + Build using Link Time Optimizations (LTO). + + Note that GCC is always built with support for building + other programs with LTO. This USE flag is for whether + GCC itself is built and optimized with LTO. + + Build the GCC Modula-2 language frontend. + Enable support for Intel Memory Protection Extensions (MPX) + Enable support for Native POSIX Threads Library, the new threading module (requires linux-2.6 or better usually) + Build support for the Objective C code language + Build support for the Objective C++ language + Build support for the Objective C code language Garbage Collector + + Build GCC using Profile Guided Optimization (PGO). + + GCC will build itself and then analyze the just-built + binary and then rebuild itself using the data obtained + from analysis of codepaths taken. + + It does not affect whether GCC itself supports PGO + when building other software. + + This substantially increases the build time needed for + building GCC itself. + + Build support for the Rust language, installs gccrs. + + Build support for various sanitizer functions (ASAN/TSAN/etc...) + to find runtime problems in applications. + + Build packages with stack smashing protection on by default + enable systemtap static probe points + + Build support for virtual table verification (a C++ hardening feature). + + This does not control whether GCC defaults to using VTV> + + Note that actually using VTV breaks ABI and hence the whole + system must be built with -fvtable-verify. + + + + cpe:/a:gnu:gcc + +