summaryrefslogtreecommitdiff
path: root/sys-devel/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'sys-devel/gcc')
-rw-r--r--sys-devel/gcc/Manifest5
-rw-r--r--sys-devel/gcc/files/gcc-15.0.0_pre20240922-middle-end-check-explicitly-for-external-or-constant.patch93
-rw-r--r--sys-devel/gcc/gcc-15.0.0_pre20240922-r1.ebuild57
-rw-r--r--sys-devel/gcc/gcc-15.0.0_pre20240922.ebuild56
4 files changed, 211 insertions, 0 deletions
diff --git a/sys-devel/gcc/Manifest b/sys-devel/gcc/Manifest
index c19d5e5c6369..92a0d0454239 100644
--- a/sys-devel/gcc/Manifest
+++ b/sys-devel/gcc/Manifest
@@ -1,5 +1,6 @@
AUX gcc-13-fix-cross-fixincludes.patch 883 BLAKE2B 1ae33195320754c55f42e1206bcfdf98914af5190df5939a4c7b072a2bc25216c354ea5d76f5171e1b8a150ca7764bdf57cea1bc137c237a5e8bb44713885f1b SHA512 ca9625001f0a10826d75691fdba35ca5783ed2f80e605b935785f8dc7591b0e650dca28bf1fc7e688e27547dddc7ab38232459b4f1865ed10a148978d0e09703
AUX gcc-15.0.0_pre20240623-PR115602.patch 4018 BLAKE2B 3c88950585713918c77f6e6f00ae9365edd97ec61f88b89d3e99eaec8ef62db315dfd285c16ab5563ee88d69f8f0857dbfd5055d84950ef6023d4d5d804b819d SHA512 56fafe0d602c925608be21a573983de5fdb5ffb3ba4130fd2f77b35ed1e7de6385b2e71e78276c726b80e108d12213d4bb5af196762fb1d8579e06fd18c2f735
+AUX gcc-15.0.0_pre20240922-middle-end-check-explicitly-for-external-or-constant.patch 3041 BLAKE2B a069c8816b8acc32bd6df4f63d6ec50b0ff0cffe6794d64e2628ddb7ecba7f2cc84c060695f491fece1d2e80e25cd1890511342aab96328fba54b471680c5c52 SHA512 45fda79abe54ea276bdd56523630c548137bd76d6f6ea1429f4750dbf1e1e810f4729d4761019f058c64e193e7e52be5bc46b310e55d353b6156172bacfb029f
AUX gcc-configure-texinfo.patch 341 BLAKE2B d2ea3b2ea08f5d3a498ba27d0fb95e325097e2104e55caa28b66515cb48662649140d90b639369aedc54b2b1178fa4b49cda442f5f504e09d88a2efa45a5057c SHA512 e8d34c5077409df5495cf0c5fbf5e77f841c5698108fa6a5fde33eb28202c685603bdefd8368918e55f30c4b995e895d71d64c715c1ec2b017e09eb2c54c09ff
DIST gcc-10.5.0-musl-patches-2.tar.xz 3452 BLAKE2B 5387e516d07d81477b3f39b8b3bd986bf861d32cd25dc5481c97bd3620d00c918c5661e86857f66dbf28a655401a53e43417f638c443e44cbfdbf5e950caac4d SHA512 86f2ce31cc4fc4fb5a6043fb527bf822d895e1a6220652024f78a1cbd5a962edb6be8dc5f43c32053e075f39bb2350ea8f14e7d57e0473dd2933a7b44676bde5
DIST gcc-10.5.0-patches-6.tar.xz 18208 BLAKE2B 4cac3340108fb378c76ad62b728429f3c97f348d178744e7536575f3576ca8aa682b878b7df3b1c162dccae64a3cb56c66d8d60eae323e1ece2de4278084fdbd SHA512 9d6c84325fbc118cee01347468ce729c278e5b026b16da945fe54050726e26f86a46ee7b71a01a47cf927b70bfcce459c49a6bc4fb93dcfaa047c76d4c5bc5bc
@@ -24,6 +25,8 @@ DIST gcc-14.1.0-patches-4.tar.xz 11620 BLAKE2B c819fbdea1f3bf10c8d4214d4c33cf28c
DIST gcc-14.1.0-patches-5.tar.xz 12504 BLAKE2B 9453bb75c195e43e9b95cee89eee0722dadb8088ce258ae3334ad1023742b41fc0efea45ca4dbd73a20834aa09f72b5fd2d771e1bc58c0cff89a9d2b16ae8dd1 SHA512 b30b5ff1c0234ccfd440ede9e2c13c5fe3d72711ac94996694b3b325ec47f23c6549c41a70f7e08aea16e10fd45d348dcaaef7a7e49a981622d50b21a0971a30
DIST gcc-15-20240908.tar.xz 89408188 BLAKE2B bd8e48c9f4bde4091c1d0196220873e4b312ee7c62c3ad74d29c1110e24055d0806b51ad3e1be28a17b28199cf4169b23892b43b29cf0791d27a6daab827102e SHA512 e249c638a0bc9c114a2a54c9836b71c93964394a497264556a3ac515e48659582876d18ce4b703c9d5dfad2d0afcf8bdf763be55bde4c18ece2c228b3513c276
DIST gcc-15-20240915.tar.xz 89475916 BLAKE2B 544761cc41adac4a680941c3775348b3c0a9cc28a8e1a2c75c33b7c5583a35cd15d6b2f6abc7c0fe6553d5538a632ac0d074e7d23c19a7572f69101fc6b8dac1 SHA512 7eb8229f7dad11614c8526b139567e0c8fb5d20416b0190a7b4a76a2755475363c0621454c950d7e3afa9b0283ba32ebf9e15f4a616be367368cc5fd34f4733f
+DIST gcc-15-20240922-rollup-patches.tar.xz 14856 BLAKE2B f36d082d0cfb3a1261b757c5186c912cfe248220aeab8f823d8135fe8e0dc1a20dfb1a83ef465d89188246d4d14884b3b356959633ef68c7983f00ce89bc8023 SHA512 1765d248e7547cf99b5b127954af462365b18d3866b1a2f2b5b3523d24ca80b7072f80ed9a945bb3e98fc5d7ecc3ebaaafc85444caffd9c07c2e820bc7f89cda
+DIST gcc-15-20240922.tar.xz 89501588 BLAKE2B a988848bb7b2dd789d82fe95f8c341943d9d017fb146c24623add792b80f96e0f84a487a2580d2dd02ee3543357958c947e3b73e4606905071ddb321a1e76ac5 SHA512 62cd7241a3eb485e50fdbe22f13fd525aea6154b29fd839e6e35e7f1ef72e8504d9b599692e25bb934c92d0ce8d8a5f4057e97646b1506e6faa9c19449476f8e
DIST gcc-15.0.0-musl-patches-2.tar.xz 3076 BLAKE2B 0073248fe4f7dd827980559017b5aa1fb5c4c46acc9ad5c410dc152fd1e44966d3066bf7152338573cb45b1c36027de5f0c519abd414d97a37bccef07f6a5281 SHA512 295f1a669020bbe2874e9b03afd46b5d083073b276fca3543f3767a2d74f35df81cf0a67abad50c200cf7a3af36ec98ff9977cb7d5c19f334af7d3bb1926a3de
DIST gcc-15.0.0-patches-12.tar.xz 12980 BLAKE2B 325743e1d4264e80ce91e866bb3cbb9d0e72e186fee0d29e6dace6c48b975992dcd7081fe2a924519d5c1503dedc14a4b41f584dd7d97924664bcc6f6537a8bc SHA512 e18401c517b05e13c203b147f9ba6991c867a8c0a50a7e1a67ea497243d46cbbac674c3498651946f941423241d36b6bc55571a8131fc3604c92604be288f60d
DIST gcc-8.5.0-patches-4.tar.xz 18616 BLAKE2B 7594cbaea5daecf1a0b3d526c06aeba0a84c6da66aee2e105a51fda6be8d30a37ccc3814281b284a4582d892a1d556bca063551584edfc2525bed8ea5b6888e7 SHA512 1aa5742c361186637e7855f06feb1a4547e7d4d5de6e51f3d049e0ef3c19e2eff179465f52781739f59422035b7f8e4c0efa3844849f920f3c96acfdc37ca6a6
@@ -44,6 +47,8 @@ EBUILD gcc-14.2.1_p20240921.ebuild 1439 BLAKE2B bb301f0a5817ca5f13b7ba3d921238cc
EBUILD gcc-14.3.9999.ebuild 1410 BLAKE2B 9bae23ee70f670946a0b160e4d4d8a074584097a6b9a1f41c3e08a43271539d30ce7bb3651419a6950c74d24748e8423056dbc857e5c7ae96c7e42992d7395fc SHA512 72b07844e93065dd3dea5fc96f70d9502876932f3b9b8fe898ee0911d3750b47fc7e6fce802c8d8e93481a74ba46de0f9fb15cf48de1c3b347180a4d4c1303cf
EBUILD gcc-15.0.0_pre20240908.ebuild 1360 BLAKE2B 968d28147681b5a6090ddf0362c655aedb5c54883a463d8279df03ba98e967bb201130faaf0d863c815d8a8168c89e476c31c1fbf79ebdeda6430a36cc100467 SHA512 15bd66cda74f11d735c8ede352979ee0b94470bf0497fe8cc07e76e00093e32c5acf5e760e21ad60c73e6187f61e082a76caf7d2970b3e991ff8678ba0c81755
EBUILD gcc-15.0.0_pre20240915.ebuild 1360 BLAKE2B 968d28147681b5a6090ddf0362c655aedb5c54883a463d8279df03ba98e967bb201130faaf0d863c815d8a8168c89e476c31c1fbf79ebdeda6430a36cc100467 SHA512 15bd66cda74f11d735c8ede352979ee0b94470bf0497fe8cc07e76e00093e32c5acf5e760e21ad60c73e6187f61e082a76caf7d2970b3e991ff8678ba0c81755
+EBUILD gcc-15.0.0_pre20240922-r1.ebuild 1623 BLAKE2B 0b852e93d8286cc195cafd1ec64f34f1ee8692ebf01d384153560e89aabeebc9d2743609a2e338f37cef27e51c9bb527270d54aaeff2458cc715b8594c7c2c60 SHA512 079cf0810db3bfd1d6f5e1c43c2065df7f8227f75358828c7a5bdd29c9762e884cc47d85f81674e2db17640ed55c6500a1b36c2cbab26b5c76877205cabb2665
+EBUILD gcc-15.0.0_pre20240922.ebuild 1519 BLAKE2B fa815699c48c899de559b9e4b709e0a222c77c57739abde8794d00ca7bc280ead3bb0ddbe59b20473983062845960b3d96ea93280dd906a8760057a249dd3f13 SHA512 d5477d099fc02574bfcb0fe7c829087ad94a2a5d801982a94075190ece5ca3e45c4699de5d73ab0488ac43ee66ac5ee69bc296f49a33ea897a2cf2c09fb25807
EBUILD gcc-15.0.9999.ebuild 1332 BLAKE2B 6f17f77603522bac72d4d57094cc086263a9bfe6273c04d91b169ebc23d78fa2943c0950d4a40fe846d9d92648e54ca54ad1cecd5446ed5710062f9dca569b4b SHA512 4e4a673229a36dee68238e10efb2d9e0ff1c530411395e5230bbf567c92342a4b79d0ecb0ec91573c52fd8b5efd5cf6d20e612971848c9529378e0c42c0e213d
EBUILD gcc-8.5.0-r1.ebuild 549 BLAKE2B ff92dcaf33780ec98032b59fa9b9de925e44375d50fdf82f6bedc1747cd37399753b5db4aa6c2af8e983b4a8a1ff38090e8d913252320b4d7f3eb24af2c22c57 SHA512 856d099e61a03b38fe468a82dc94c52d51e4678499c9a10a54ca009ef4cc67e24f8aaf984dc5eea2604b6db36f4eaf29ac8cf81ef7651b2221758f4f07898996
EBUILD gcc-9.5.0.ebuild 1257 BLAKE2B b398cea6cb4227fd126b85feb3e735f6b505236f54aecc9983e46fd30dbfcd8f16e80680c231567212c7cbd524b0d485574f7c5c5830137f9ebeea089a641e90 SHA512 0faea0a2389563bede22ba172ae6ab490a693c221bf6700152e9f63b23fad8d74a595a50c40cdf2eed32ee5e9cdddfdb6e2907629036c94034327f5772c93f6f
diff --git a/sys-devel/gcc/files/gcc-15.0.0_pre20240922-middle-end-check-explicitly-for-external-or-constant.patch b/sys-devel/gcc/files/gcc-15.0.0_pre20240922-middle-end-check-explicitly-for-external-or-constant.patch
new file mode 100644
index 000000000000..6dcc1a46c96a
--- /dev/null
+++ b/sys-devel/gcc/files/gcc-15.0.0_pre20240922-middle-end-check-explicitly-for-external-or-constant.patch
@@ -0,0 +1,93 @@
+https://inbox.sourceware.org/gcc-patches/patch-18806-tamar@arm.com/T/#u
+https://gcc.gnu.org/PR116817
+
+From 9a5d1eb943dcaf26551b534eb62cbf1dd8443335 Mon Sep 17 00:00:00 2001
+Message-ID: <9a5d1eb943dcaf26551b534eb62cbf1dd8443335.1727104663.git.sam@gentoo.org>
+From: Tamar Christina <tamar.christina@arm.com>
+Date: Mon, 23 Sep 2024 15:29:52 +0100
+Subject: [PATCH] middle-end: check explicitly for external or constants when
+ checking for loop invariant [PR116817]
+
+Hi All,
+
+The previous check if a value was external was checking
+!vect_get_internal_def (vinfo, var) but this of course isn't completely right
+as they could reductions etc.
+
+This changes the check to just explicitly look at externals and constants.
+Note that reductions remain unhandled here, but we don't support codegen of
+boolean reductions today anyway.
+
+So at the time we do then this would have the be handled as well in lowering.
+
+Bootstrapped Regtested on aarch64-none-linux-gnu and no issues.
+
+Ok for master?
+
+Thanks,
+Tamar
+
+gcc/ChangeLog:
+
+ PR tree-optimization/116817
+ * tree-vect-patterns.cc (vect_recog_bool_pattern): Check for const or
+ externals.
+
+gcc/testsuite/ChangeLog:
+
+PR tree-optimization/116817
+ * g++.dg/vect/pr116817.cc: New test.
+---
+ gcc/testsuite/g++.dg/vect/pr116817.cc | 16 ++++++++++++++++
+ gcc/tree-vect-patterns.cc | 5 ++++-
+ 2 files changed, 20 insertions(+), 1 deletion(-)
+ create mode 100644 gcc/testsuite/g++.dg/vect/pr116817.cc
+
+diff --git a/gcc/testsuite/g++.dg/vect/pr116817.cc b/gcc/testsuite/g++.dg/vect/pr116817.cc
+new file mode 100644
+index 00000000000..7e28982fb13
+--- /dev/null
++++ b/gcc/testsuite/g++.dg/vect/pr116817.cc
+@@ -0,0 +1,16 @@
++/* { dg-do compile } */
++/* { dg-additional-options "-O3" } */
++
++int main_ulData0;
++unsigned *main_pSrcBuffer;
++int main(void) {
++ int iSrc = 0;
++ bool bData0;
++ for (; iSrc < 4; iSrc++) {
++ if (bData0)
++ main_pSrcBuffer[iSrc] = main_ulData0;
++ else
++ main_pSrcBuffer[iSrc] = 0;
++ bData0 = !bData0;
++ }
++}
+diff --git a/gcc/tree-vect-patterns.cc b/gcc/tree-vect-patterns.cc
+index e7e877dd2ad..b913d6de003 100644
+--- a/gcc/tree-vect-patterns.cc
++++ b/gcc/tree-vect-patterns.cc
+@@ -6062,12 +6062,15 @@ vect_recog_bool_pattern (vec_info *vinfo,
+ if (get_vectype_for_scalar_type (vinfo, type) == NULL_TREE)
+ return NULL;
+
++ stmt_vec_info var_def_info = vinfo->lookup_def (var);
+ if (check_bool_pattern (var, vinfo, bool_stmts))
+ var = adjust_bool_stmts (vinfo, bool_stmts, type, stmt_vinfo);
+ else if (integer_type_for_mask (var, vinfo))
+ return NULL;
+ else if (TREE_CODE (TREE_TYPE (var)) == BOOLEAN_TYPE
+- && !vect_get_internal_def (vinfo, var))
++ && var_def_info
++ && (STMT_VINFO_DEF_TYPE (var_def_info) == vect_external_def
++ || STMT_VINFO_DEF_TYPE (var_def_info) == vect_constant_def))
+ {
+ /* If the condition is already a boolean then manually convert it to a
+ mask of the given integer type but don't set a vectype. */
+
+base-commit: 358db2e3ed4acf44282d1d9ebbc4a1a3b6e38d21
+--
+2.46.1
+
diff --git a/sys-devel/gcc/gcc-15.0.0_pre20240922-r1.ebuild b/sys-devel/gcc/gcc-15.0.0_pre20240922-r1.ebuild
new file mode 100644
index 000000000000..de217fae9b75
--- /dev/null
+++ b/sys-devel/gcc/gcc-15.0.0_pre20240922-r1.ebuild
@@ -0,0 +1,57 @@
+# 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="12"
+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
+
+SRC_URI+=" https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/gcc-15-20240922-rollup-patches.tar.xz"
+
+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 "${WORKDIR}"/gcc-15-20240922-rollup-patches
+ eapply "${FILESDIR}"/gcc-15.0.0_pre20240922-middle-end-check-explicitly-for-external-or-constant.patch
+ eapply_user
+}
diff --git a/sys-devel/gcc/gcc-15.0.0_pre20240922.ebuild b/sys-devel/gcc/gcc-15.0.0_pre20240922.ebuild
new file mode 100644
index 000000000000..0078bac5b176
--- /dev/null
+++ b/sys-devel/gcc/gcc-15.0.0_pre20240922.ebuild
@@ -0,0 +1,56 @@
+# 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="12"
+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
+
+SRC_URI+=" https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/gcc-15-20240922-rollup-patches.tar.xz"
+
+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 "${WORKDIR}"/gcc-15-20240922-rollup-patches
+ eapply_user
+}