diff options
author | Sam James <sam@gentoo.org> | 2023-10-03 20:02:53 +0100 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2023-10-03 20:03:10 +0100 |
commit | ccf0a4e094c6cb18fdb7b4eb3dfb4692d2197ba6 (patch) | |
tree | 5903d590dd075c8dcf8b4cdc41ccdae7de6d2f9e /sys-devel/gcc | |
parent | dev-libs/icinga-php-library: stabilize 0.13.0 for amd64, x86 (diff) | |
download | gentoo-ccf0a4e094c6cb18fdb7b4eb3dfb4692d2197ba6.tar.gz gentoo-ccf0a4e094c6cb18fdb7b4eb3dfb4692d2197ba6.tar.bz2 gentoo-ccf0a4e094c6cb18fdb7b4eb3dfb4692d2197ba6.zip |
sys-devel/gcc: backport USE=pgo bootstrap fix for 14.0.0_pre20231001
Closes: https://bugs.gentoo.org/914998
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sys-devel/gcc')
-rw-r--r-- | sys-devel/gcc/files/gcc-14.0.0_pre20231001-pgo-bootstrap.patch | 45 | ||||
-rw-r--r-- | sys-devel/gcc/gcc-14.0.0_pre20231001.ebuild | 1 |
2 files changed, 46 insertions, 0 deletions
diff --git a/sys-devel/gcc/files/gcc-14.0.0_pre20231001-pgo-bootstrap.patch b/sys-devel/gcc/files/gcc-14.0.0_pre20231001-pgo-bootstrap.patch new file mode 100644 index 000000000000..31ad7d855268 --- /dev/null +++ b/sys-devel/gcc/files/gcc-14.0.0_pre20231001-pgo-bootstrap.patch @@ -0,0 +1,45 @@ +https://bugs.gentoo.org/914998 +https://gcc.gnu.org/PR111642 +https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=e465e5e4a969334f64cf0d6611de5273d73ea732 + +From e465e5e4a969334f64cf0d6611de5273d73ea732 Mon Sep 17 00:00:00 2001 +From: Richard Sandiford <richard.sandiford@arm.com> +Date: Mon, 2 Oct 2023 07:20:45 +0100 +Subject: [PATCH] Fix profiledbootstrap poly_int fallout [PR111642] + +rtl-tests.cc and simplify-rtx.cc used partial specialisation +to try to restrict the NUM_POLY_INT_COEFFS>1 tests without +resorting to preprocessor tests. That now triggers an error +in some configurations, since the NUM_POLY_INT_COEFFS>1 tests +used the global poly_int64, whose definition does not depend +on the template parameter. + +This patch uses local types that do depend on the template parameter. + +gcc/ + PR bootstrap/111642 + * rtl-tests.cc (const_poly_int_tests<N>::run): Use a local + poly_int64 typedef. + * simplify-rtx.cc (simplify_const_poly_int_tests<N>::run): Likewise. +--- a/gcc/rtl-tests.cc ++++ b/gcc/rtl-tests.cc +@@ -246,6 +246,7 @@ template<unsigned int N> + void + const_poly_int_tests<N>::run () + { ++ using poly_int64 = poly_int<N, HOST_WIDE_INT>; + rtx x1 = gen_int_mode (poly_int64 (1, 1), QImode); + rtx x255 = gen_int_mode (poly_int64 (1, 255), QImode); + +--- a/gcc/simplify-rtx.cc ++++ b/gcc/simplify-rtx.cc +@@ -8689,6 +8689,7 @@ template<unsigned int N> + void + simplify_const_poly_int_tests<N>::run () + { ++ using poly_int64 = poly_int<N, HOST_WIDE_INT>; + rtx x1 = gen_int_mode (poly_int64 (1, 1), QImode); + rtx x2 = gen_int_mode (poly_int64 (-80, 127), QImode); + rtx x3 = gen_int_mode (poly_int64 (-79, -128), QImode); +-- +2.39.3 diff --git a/sys-devel/gcc/gcc-14.0.0_pre20231001.ebuild b/sys-devel/gcc/gcc-14.0.0_pre20231001.ebuild index 02c5c891469e..b7a4582ecb18 100644 --- a/sys-devel/gcc/gcc-14.0.0_pre20231001.ebuild +++ b/sys-devel/gcc/gcc-14.0.0_pre20231001.ebuild @@ -61,4 +61,5 @@ src_prepare() { toolchain_src_prepare eapply_user + eapply "${FILESDIR}"/${P}-pgo-bootstrap.patch } |