diff options
author | Fabian Groffen <grobian@gentoo.org> | 2022-10-03 19:25:05 +0200 |
---|---|---|
committer | Fabian Groffen <grobian@gentoo.org> | 2022-10-03 19:25:52 +0200 |
commit | b7358eaa12d8dd6acab55904759addcf636b343d (patch) | |
tree | 786eef7cf6e06762f238d99b45af834839630857 /sys-devel | |
parent | sys-devel/gcc-config: add 2.6 (diff) | |
download | prefix-b7358eaa12d8dd6acab55904759addcf636b343d.tar.gz prefix-b7358eaa12d8dd6acab55904759addcf636b343d.tar.bz2 prefix-b7358eaa12d8dd6acab55904759addcf636b343d.zip |
sys-devel/gcc-12.2.0: bump, disabled keywords
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
Diffstat (limited to 'sys-devel')
-rw-r--r-- | sys-devel/gcc/Manifest | 4 | ||||
-rw-r--r-- | sys-devel/gcc/gcc-12.2.0.ebuild | 131 |
2 files changed, 135 insertions, 0 deletions
diff --git a/sys-devel/gcc/Manifest b/sys-devel/gcc/Manifest index a99ad15681..2b4ecba53e 100644 --- a/sys-devel/gcc/Manifest +++ b/sys-devel/gcc/Manifest @@ -8,6 +8,10 @@ DIST gcc-12.1-darwin-r0.tar.gz 131006433 BLAKE2B fe94275821772586b90d003e5179a72 DIST gcc-12.1.0-musl-patches-4.tar.xz 4448 BLAKE2B ddad7bccea7474a0552e069df25e66b4af68470da655aaf7669c2ceca7d0588cebb171e8a949c8935eeadff23af4d3de41d44245c06d48044cfc1d1fadc6540a SHA512 bb3b9e4a81efd2d0ceb405220a9c15453d780d8bc01ed5ebf4837a318e0f8ad8cc36d6ad3f2eed5051bb6dc82f223d8b61321b8f602890a770eefd69c0c144b9 DIST gcc-12.1.0-patches-7.tar.xz 11584 BLAKE2B 4487726f8225d6bb2fde91fce8343c34ebece8cca08b258115a55b0f0c594e3a205efe26738c2b06cb8c6ea9d13b451514e073bb3a94d664a56120d9826515df SHA512 4882754d2f55c8144a5af4bcfbc1ee7802f08fc5acca96151cc6323a98e94b9246a69e067bcbf92dcdb8021499b8e1197cd7bd682876aca3e6f1f63a405c1dae DIST gcc-12.1.0.tar.xz 82701928 BLAKE2B dca5df8fea680dbeda721742cce5c97de7eb4be490a32a158e06b88e2b9dd092150b7cfe490bb69e48e2f75d8bba231c8a54cd46b48ddcdc01bf9553ab57019d SHA512 2121d295292814a6761edf1fba08c5f633ebe16f52b80e7b73a91050e71e1d2ed98bf17eebad263e191879561c02b48906c53faa4c4670c486a26fc75df23900 +DIST gcc-12.2-darwin-r0.tar.gz 131069986 BLAKE2B 42de71c9f0802f1a43e675d3fae7341cfebb8dfe88face13b665b19e8812ee74a6527e027a05f1524770d1b9067332c69682d6e888dc510afbab686caa0d856a SHA512 c8a7234762d9e1fbdb1ef3c29574e42cc11b456386d77f7599adcba0cfb1363076cc8afc13f6773e9ea2f8caaeafa37a8e64e9f5c33c028f21a47d9bdca84b31 +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-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 diff --git a/sys-devel/gcc/gcc-12.2.0.ebuild b/sys-devel/gcc/gcc-12.2.0.ebuild new file mode 100644 index 0000000000..1cb1b0da53 --- /dev/null +++ b/sys-devel/gcc/gcc-12.2.0.ebuild @@ -0,0 +1,131 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +TOOLCHAIN_PATCH_DEV="sam" +PATCH_VER="1" +PATCH_GCC_VER="12.2.0" +MUSL_VER="1" +MUSL_GCC_VER="12.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 ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +fi + +# use alternate source for Apple M1 (also works for x86_64) +IANSGCCVER="gcc-12.2-darwin-r0" +SRC_URI+=" elibc_Darwin? ( +https://github.com/iains/gcc-12-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-12-branch-${IANSGCCVER}" + fi + default +} + +src_prepare() { + toolchain_src_prepare + + eapply_user + + # 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 + 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 + 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 + + 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() { + 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 + ;; + arm64-*-darwin*) + # only supported from darwin21, so no conflict with above + # case switch + # for the time being use system flex, for our doesn't work + # here (while it does fine elsewhere), #778014 + export ac_cv_prog_FLEX=/usr/bin/flex + ;; + *-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[@]}" +} |