From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 293D11582EF for ; Sun, 23 Feb 2025 05:42:51 +0000 (UTC) Received: from lists.gentoo.org (bobolink.gentoo.org [140.211.166.189]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: relay-lists.gentoo.org@gentoo.org) by smtp.gentoo.org (Postfix) with ESMTPSA id 089FC343236 for ; Sun, 23 Feb 2025 05:42:51 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id 02FFA110472; Sun, 23 Feb 2025 05:42:43 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by bobolink.gentoo.org (Postfix) with ESMTPS id EFBA6110472 for ; Sun, 23 Feb 2025 05:42:42 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 647F134317D for ; Sun, 23 Feb 2025 05:42:42 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id C20932733 for ; Sun, 23 Feb 2025 05:42:40 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1740289211.8d5d23794deead62777d595495b884dda33fa39b.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-devel/gcc/files/, sys-devel/gcc/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-devel/gcc/Manifest sys-devel/gcc/files/gcc-15.0.1_pre20250209-coro.patch sys-devel/gcc/files/gcc-15.0.1_pre20250209-range-for-mariadb.patch sys-devel/gcc/gcc-15.0.0_pre20250112-r3.ebuild sys-devel/gcc/gcc-15.0.1_pre20250119.ebuild sys-devel/gcc/gcc-15.0.1_pre20250126.ebuild sys-devel/gcc/gcc-15.0.1_pre20250202.ebuild sys-devel/gcc/gcc-15.0.1_pre20250209-r1.ebuild X-VCS-Directories: sys-devel/gcc/ sys-devel/gcc/files/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 8d5d23794deead62777d595495b884dda33fa39b X-VCS-Branch: master Date: Sun, 23 Feb 2025 05:42:40 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 0f1ff378-0622-4c14-9f42-a5a86d8b4533 X-Archives-Hash: 18f592fced56b58758720647d6f0ffd4 commit: 8d5d23794deead62777d595495b884dda33fa39b Author: Sam James gentoo org> AuthorDate: Sun Feb 23 05:39:51 2025 +0000 Commit: Sam James gentoo org> CommitDate: Sun Feb 23 05:40:11 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8d5d2379 sys-devel/gcc: drop old 15 snapshots Signed-off-by: Sam James gentoo.org> sys-devel/gcc/Manifest | 10 - .../gcc/files/gcc-15.0.1_pre20250209-coro.patch | 124 ----- .../gcc-15.0.1_pre20250209-range-for-mariadb.patch | 530 --------------------- sys-devel/gcc/gcc-15.0.0_pre20250112-r3.ebuild | 53 --- sys-devel/gcc/gcc-15.0.1_pre20250119.ebuild | 53 --- sys-devel/gcc/gcc-15.0.1_pre20250126.ebuild | 53 --- sys-devel/gcc/gcc-15.0.1_pre20250202.ebuild | 53 --- sys-devel/gcc/gcc-15.0.1_pre20250209-r1.ebuild | 55 --- 8 files changed, 931 deletions(-) diff --git a/sys-devel/gcc/Manifest b/sys-devel/gcc/Manifest index 28b5bfb1322c..e9c4027d29ae 100644 --- a/sys-devel/gcc/Manifest +++ b/sys-devel/gcc/Manifest @@ -21,18 +21,8 @@ DIST gcc-14-20250222.tar.xz 88217556 BLAKE2B 38023332b91bf6ff50d06b0967f7c4ed2f5 DIST gcc-14.1.0-musl-patches-1.tar.xz 3600 BLAKE2B 4cd920b7ca1f122cae806707564d8e45bfd48e78c88788a12a301f6068b5a5f335d8885e67479ac536c66aeaa81f2ecb7240ae56e9fc821a7246ab66b453711f SHA512 61c48d90a55dfc2129d96aee69d939d6a89f6407f69f7bd12c1a619f28989f471fd219d731958f8e62b0fd650c32300f0ad8dc06d5df23d9fc8c1a77fe210c25 DIST gcc-14.2.0-patches-7.tar.xz 14244 BLAKE2B 11236e91e1fe83fec8ffaa40ec0cdd4b52a00a951e9aa9a7a0a932b234b8f1a9603333a7ccf55859f4ef53dd4d8ad1fd5c1d2514b6e45fce5b86bb58622a0ecc SHA512 5a4d86d943e31fa068b5a784c0132bd83c23243dcb3cf972557a42e004469a415e1b3185f31b1bb36f916594d475f266a2fda031a414e4a15e0bbfe471269eee DIST gcc-14.2.0-patches-8.tar.xz 14540 BLAKE2B 09f66035343d4cab694b8ab382170f8e2d546ddffedf3477f26edbd6a798ddf94294f569c2661729d40088d590bc17a4eb651710d8d9f66f33703734a1a82b67 SHA512 7a9a2724ef8db3c57b033d90751192969c16e5eaa8f4777b7f16470222ff3a18771b461bd89feaad701e7f0d573b883b487981588129933c732fb76117728b86 -DIST gcc-15-20250112.tar.xz 90584884 BLAKE2B 35200ad43eaca0b97d330d22abb517ee5f8d196b83d40650e5a2e39b5a847b2c686108d15edf998df511992930bf3464b7e63d4562c17a6330a22a693b795122 SHA512 cd2b282eb7cd352fb326df692b653572319edc179ae6dec0c96ead858da4a85134098e128afa9dd76ff691262fd3cfce176c38420a78f56121b039a2a297f63e -DIST gcc-15-20250119.tar.xz 90709176 BLAKE2B da815cd472c0bb4101fb65fac73e93d8da8981c268880222501deb48f03865824773f93ae182ec60465e2b122a1503936dc10337b9b87dfdd15cde5e18641026 SHA512 9f3bb4ff5b04fe84ec3ce5342a29ca1d98f1988c0b3703c63b3f5bd5d58d035ed7c676cdf6bf730f5399a7b461e2929f28494f9ca4a87a6783c6e30114d2c838 -DIST gcc-15-20250126.tar.xz 90895328 BLAKE2B 472b5c0ad2da8525a40530089f02bcdf6b8b3d3e31c1f5f86339d624c3a461ab24d35d815554513ba6dbe807f8f3a7f9e123f63ec0fe33796bee9e6da411deab SHA512 e55a19e07bd10b6c5f4a639d0fe548495297a4a1efe4c2cd4e891f27a2962bd929baeaf312b4f3a9e0a51b105e470de37a717fd8161ff75759aaa6b48c937d8a -DIST gcc-15-20250202.tar.xz 91011652 BLAKE2B 414fac76d3bb3887658387f80c64b587e75f71a8e1f2dc2c455c06a9d333125fdb113b30115ad1c3586fe92c786768c5f01eb1cb7e2cb6811adfb5fb1c46b391 SHA512 403c45199be4fb3f4b29495d26720f75bce20cea42fe0f47959db81f24769e20291a70ca2d63eccbeda9efd5abfb344ef7337c62118093092cd3438a1ef8fff4 -DIST gcc-15-20250209.tar.xz 91287472 BLAKE2B e589600b828d560f9de5af01d340f5ac710c23c45fb5e66fe2876e3e73052f435e25c7c630c09b6fbf05381299effae6415a3592a4222687c15e96f54896752e SHA512 fcadf48cdd2cc55a7f0266eaa7643ffeb3c4606c3a6f6780a501b30ab8babe4b15d1cfe55038a65ae789e600119d86819af2ffe2b0800512bd9b3803e2407ec7 DIST gcc-15-20250216.tar.xz 91404792 BLAKE2B 1a007a432c7f7ac6ba0169caf2561e26267ae5c75403ecd52227dbee255eff4c1bca5db9d6ce2e772ee357dc06e648d7ebfb3629117b13d48343a474a17901c6 SHA512 8dcb3968e157a2cb6a06e4ba76a0fd95936025d99f48333aacc554f347d19df8e6b9a0c9c454acd730a5608122ff4c12a712ccdf09919f8e310cf6688c00df84 DIST gcc-15.0.0-musl-patches-2.tar.xz 3076 BLAKE2B 0073248fe4f7dd827980559017b5aa1fb5c4c46acc9ad5c410dc152fd1e44966d3066bf7152338573cb45b1c36027de5f0c519abd414d97a37bccef07f6a5281 SHA512 295f1a669020bbe2874e9b03afd46b5d083073b276fca3543f3767a2d74f35df81cf0a67abad50c200cf7a3af36ec98ff9977cb7d5c19f334af7d3bb1926a3de -DIST gcc-15.0.0-patches-41.tar.xz 33308 BLAKE2B d95b2798837a40380d06818fb047b7a5ea2e5a20de12a760b168c4dbb39c7af6b45621034d17250754f6dbc83dacdd7a75ff41c505b158bcf2090eca678d5f05 SHA512 203bedbab8e5d139ac3421e6347a2aecba48f5757ea524241feff7154eb918dad0c7f9f7505bf9041ab67b7c57170f5ea26f8160af3b268aec2b9a1113325733 -DIST gcc-15.0.0-patches-42.tar.xz 26904 BLAKE2B 21fad98bfa977cb359dfeecec5b35d4470429acf103f99e3519a34f87926225e83257f23eb2983adf68d2a8a3089f7769dedfde7302ef9f55c30b59bba47d1bb SHA512 3ede6bf4c908a179b4b9bf8d281385a6ecf64be481479c88ad0b250b6c93050ff76dd2cf6fc9b12bf8b503a123cad2b8c418abc4ab233524d7bd78e1d9f31009 -DIST gcc-15.0.0-patches-43.tar.xz 25892 BLAKE2B 1d0dbbe277179aefaab20e03bf152ded962c69fe4b3afcdcf7211a71327149977109fe0e8b2bc198ee16a59ab2569d2b698f216712eaa65c2cdb6de209aa1ffb SHA512 ddf3e6d2876c4d567830de91b39acedda280d739f7948ec02d04b409be10d8e1bb41a510d1b5f78b26e79de18aa2b281f9ce2182088b6b514f2f46389af8c22e -DIST gcc-15.0.0-patches-44.tar.xz 25092 BLAKE2B 4010f1f7ab17e47879db78f11f99ff4c8fe1258dc326aae9af6e25be098d8cc5806223d014a668cf6d2f8e1a36a40ca0a6a5aa87e70f15164460c728d329793e SHA512 329ffc475fde3d5c19382c83fae2ce60fd3c0f1e336f7e87ca2df4689c73747807f1b9665ee00995356b5fbcee3bb1e3092c100d1b08f98f1d0b17d1ec8c8581 -DIST gcc-15.0.0-patches-45.tar.xz 25044 BLAKE2B f270b48434ec3ca3b1c52e62efa09a38625d40290fabf059914116423d14173c63cd45fcd496768cdc19eafdb10fabfe651d03ec56bb6b44a0e70eb00814b1dd SHA512 bb301b36c3c033f8d0abde9729f3c22d4867d4f6f9cfcf4456ee0a58331af25205db5d87fe1727fdbc3da04fa84c7434da83cc48c6674671a2db1a7e9b093a0b DIST gcc-15.0.0-patches-46.tar.xz 22212 BLAKE2B 159b2693ded0b1dbddd271ca56d7f6db3569a8f79155521737b968ad131eee2730d3441dacef821b9dcd31b17ca0bf16a7b24001e7cb4ae1b36c55750184a3f6 SHA512 26d293ee368c75570e606949480feed18a69baad4687beaf2f50629bfc72d542bbce4b1cb6580fe7e578409a108891dc9762bb15c53b611434c83db5dd83d695 DIST gcc-8.5.0-patches-4.tar.xz 18616 BLAKE2B 7594cbaea5daecf1a0b3d526c06aeba0a84c6da66aee2e105a51fda6be8d30a37ccc3814281b284a4582d892a1d556bca063551584edfc2525bed8ea5b6888e7 SHA512 1aa5742c361186637e7855f06feb1a4547e7d4d5de6e51f3d049e0ef3c19e2eff179465f52781739f59422035b7f8e4c0efa3844849f920f3c96acfdc37ca6a6 DIST gcc-8.5.0.tar.xz 63841008 BLAKE2B aa81a1a730fd7371360f6abed6ba78b5843fd18c58d5de5687acc320741b9e430e85df3535a1ef7a26051409be8d2f0945f503e5968480d919103123a99d4b12 SHA512 92f599680e6b7fbce88bcdda810f468777d541e5fddfbb287f7977d51093de2a5178bd0e6a08dfe37090ea10a0508a43ccd00220041abbbec33f1179bfc174d8 diff --git a/sys-devel/gcc/files/gcc-15.0.1_pre20250209-coro.patch b/sys-devel/gcc/files/gcc-15.0.1_pre20250209-coro.patch deleted file mode 100644 index bc51deefafe7..000000000000 --- a/sys-devel/gcc/files/gcc-15.0.1_pre20250209-coro.patch +++ /dev/null @@ -1,124 +0,0 @@ -https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=556248d7d2cf557423993eb68f6a55ae6bda0cee - -From 556248d7d2cf557423993eb68f6a55ae6bda0cee Mon Sep 17 00:00:00 2001 -From: Jason Merrill -Date: Tue, 11 Feb 2025 13:51:32 +0100 -Subject: [PATCH] c++: don't default -frange-for-ext-temps in -std=gnu++20 - [PR188574] - -Since -frange-for-ext-temps has been causing trouble, let's not enable it -by default in pre-C++23 GNU modes for GCC 15, and also allow disabling it in -C++23 and up. - - PR c++/188574 - -gcc/c-family/ChangeLog: - - * c-opts.cc (c_common_post_options): Only enable - -frange-for-ext-temps by default in C++23. - -gcc/ChangeLog: - - * doc/invoke.texi: Adjust -frange-for-ext-temps documentation. - -gcc/testsuite/ChangeLog: - - * g++.dg/cpp23/range-for3.C: Use -frange-for-ext-temps. - * g++.dg/cpp23/range-for4.C: Adjust expected result. - -libgomp/ChangeLog: - - * testsuite/libgomp.c++/range-for-4.C: Adjust expected result. ---- - gcc/c-family/c-opts.cc | 17 +++-------------- - gcc/doc/invoke.texi | 5 ++--- - gcc/testsuite/g++.dg/cpp23/range-for3.C | 4 ++-- - gcc/testsuite/g++.dg/cpp23/range-for4.C | 4 ++-- - libgomp/testsuite/libgomp.c++/range-for-4.C | 2 +- - 5 files changed, 10 insertions(+), 22 deletions(-) - -diff --git a/gcc/c-family/c-opts.cc b/gcc/c-family/c-opts.cc -index 87b231861a64..d43b3aef1024 100644 ---- a/gcc/c-family/c-opts.cc -+++ b/gcc/c-family/c-opts.cc -@@ -1213,20 +1213,9 @@ c_common_post_options (const char **pfilename) - if (cxx_dialect >= cxx20) - flag_concepts = 1; - -- /* Enable lifetime extension of range based for temporaries for C++23. -- Diagnose -std=c++23 -fno-range-for-ext-temps. */ -- if (cxx_dialect >= cxx23) -- { -- if (OPTION_SET_P (flag_range_for_ext_temps) -- && !flag_range_for_ext_temps) -- error ("%<-fno-range-for-ext-temps%> is incompatible with C++23"); -- flag_range_for_ext_temps = 1; -- } -- /* Otherwise default to enabled in GNU modes but allow user to override. */ -- else if (cxx_dialect >= cxx11 -- && !flag_iso -- && !OPTION_SET_P (flag_range_for_ext_temps)) -- flag_range_for_ext_temps = 1; -+ /* Enable lifetime extension of range based for temporaries for C++23. */ -+ SET_OPTION_IF_UNSET (&global_options, &global_options_set, -+ flag_range_for_ext_temps, cxx_dialect >= cxx23); - - /* -fimmediate-escalation has no effect when immediate functions are not - supported. */ -diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi -index 0aef2abf05b9..56d43cb67796 100644 ---- a/gcc/doc/invoke.texi -+++ b/gcc/doc/invoke.texi -@@ -3548,9 +3548,8 @@ easier, you can use @option{-fno-pretty-templates} to disable them. - Enable lifetime extension of C++ range based for temporaries. - With @option{-std=c++23} and above this is part of the language standard, - so lifetime of the temporaries is extended until the end of the loop --regardless of this option. This option allows enabling that behavior also --in earlier versions of the standard and is enabled by default in the --GNU dialects, from @option{-std=gnu++11} until @option{-std=gnu++20}. -+by default. This option allows enabling that behavior also -+in earlier versions of the standard. - - @opindex fno-rtti - @opindex frtti -diff --git a/gcc/testsuite/g++.dg/cpp23/range-for3.C b/gcc/testsuite/g++.dg/cpp23/range-for3.C -index 301e25886ec6..f95b21b3ceee 100644 ---- a/gcc/testsuite/g++.dg/cpp23/range-for3.C -+++ b/gcc/testsuite/g++.dg/cpp23/range-for3.C -@@ -1,7 +1,7 @@ - // P2718R0 - Wording for P2644R1 Fix for Range-based for Loop - // { dg-do run { target c++11 } } --// Verify -frange-for-ext-temps is set by default in -std=gnu++* modes. --// { dg-options "" } -+// Verify -frange-for-ext-temps works in earlier standards. -+// { dg-additional-options "-frange-for-ext-temps" } - - #define RANGE_FOR_EXT_TEMPS 1 - #include "range-for1.C" -diff --git a/gcc/testsuite/g++.dg/cpp23/range-for4.C b/gcc/testsuite/g++.dg/cpp23/range-for4.C -index f8c380d32c72..16204974bac9 100644 ---- a/gcc/testsuite/g++.dg/cpp23/range-for4.C -+++ b/gcc/testsuite/g++.dg/cpp23/range-for4.C -@@ -1,7 +1,7 @@ - // P2718R0 - Wording for P2644R1 Fix for Range-based for Loop - // { dg-do run { target c++11 } } --// Verify -frange-for-ext-temps is set by default in -std=gnu++* modes. -+// Verify -frange-for-ext-temps is not set by default in -std=gnu++* modes. - // { dg-options "" } - --#define RANGE_FOR_EXT_TEMPS 1 -+#define RANGE_FOR_EXT_TEMPS 0 - #include "range-for2.C" -diff --git a/libgomp/testsuite/libgomp.c++/range-for-4.C b/libgomp/testsuite/libgomp.c++/range-for-4.C -index 3c10e7349af7..aa6e4da523c1 100644 ---- a/libgomp/testsuite/libgomp.c++/range-for-4.C -+++ b/libgomp/testsuite/libgomp.c++/range-for-4.C -@@ -3,5 +3,5 @@ - // { dg-additional-options "-std=gnu++17" } - // { dg-require-effective-target tls_runtime } - --#define RANGE_FOR_EXT_TEMPS 1 -+#define RANGE_FOR_EXT_TEMPS 0 - #include "range-for-1.C" --- -2.43.5 diff --git a/sys-devel/gcc/files/gcc-15.0.1_pre20250209-range-for-mariadb.patch b/sys-devel/gcc/files/gcc-15.0.1_pre20250209-range-for-mariadb.patch deleted file mode 100644 index 8ffe1b558b2e..000000000000 --- a/sys-devel/gcc/files/gcc-15.0.1_pre20250209-range-for-mariadb.patch +++ /dev/null @@ -1,530 +0,0 @@ -https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=26baa2c09b39abf037afad349a318dc5734eae25 - -From 26baa2c09b39abf037afad349a318dc5734eae25 Mon Sep 17 00:00:00 2001 -From: Jakub Jelinek -Date: Thu, 13 Feb 2025 10:21:29 +0100 -Subject: [PATCH] c++: Fix up regressions caused by for/while loops with - declarations [PR118822] - -The recent PR86769 r15-7426 changes regressed the following two testcases, -the first one is more important as it is derived from real-world code. - -The first problem is that the chosen -prep = do_pushlevel (sk_block); -// emit something -body = push_stmt_list (); -// emit further stuff -body = pop_stmt_list (body); -prep = do_poplevel (prep); -way of constructing the {FOR,WHILE}_COND_PREP and {FOR,WHILE}_BODY -isn't reliable. If during parsing a label is seen in the body and then -some decl with destructors, sk_cleanup transparent scope is added, but -the correspondiong result from push_stmt_list is saved in -*current_binding_level and pop_stmt_list then pops even that statement list -but only do_poplevel actually attempts to pop the sk_cleanup scope and so we -ICE. -The reason for not doing do_pushlevel (sk_block); do_pushlevel (sk_block); -is that variables should be in the same scope (otherwise various e.g. -redeclaration*.C tests FAIL) and doing do_pushlevel (sk_block); do_pushlevel -(sk_cleanup); wouldn't work either as do_poplevel would silently unwind even -the cleanup one. - -The second problem is that my assumption that the declaration in the -condition will have zero or one cleanup is just wrong, at least for -structured bindings used as condition, there can be as many cleanups as -there are names in the binding + 1. - -So, the following patch changes the earlier approach. Nothing is removed -from the {FOR,WHILE}_COND_PREP subtrees while doing adjust_loop_decl_cond, -push_stmt_list isn't called either; all it does is remember as an integer -the number of cleanups (CLEANUP_STMT at the end of the STATEMENT_LISTs) -from querying stmt_list_stack and finding the initial *body_p in there -(that integer is stored into {FOR,WHILE}_COND_CLEANUP), and temporarily -{FOR,WHILE}_BODY is set to the last statement (if any) in the innermost -STATEMENT_LIST at the adjust_loop_decl_cond time; then at -finish_{for,while}_stmt a new finish_loop_cond_prep routine takes care of -do_poplevel for the scope (which is in {FOR,WHILE}_COND_PREP) and finds -given {FOR,WHILE}_COND_CLEANUP number and {FOR,WHILE}_BODY tree the right -spot where body statements start and moves that into {FOR,WHILE}_BODY. -Finally genericize_c_loop then inserts the cond, body, continue label, expr -into the right subtree of {FOR,WHILE}_COND_PREP. -The constexpr evaluation unfortunately had to be changed as well, because -we don't want to evaluate everything in BIND_EXPR_BODY (*_COND_PREP ()) -right away, we want to evaluate it with the exception of the CLEANUP_STMT -cleanups at the end (given {FOR,WHILE}_COND_CLEANUP levels), and defer -the evaluation of the cleanups until after cond, body, expr are evaluated. - -2025-02-13 Jakub Jelinek - - PR c++/118822 - PR c++/118833 -gcc/ - * tree-iterator.h (tsi_split_stmt_list): Declare. - * tree-iterator.cc (tsi_split_stmt_list): New function. -gcc/c-family/ - * c-common.h (WHILE_COND_CLEANUP): Change description in comment. - (FOR_COND_CLEANUP): Likewise. - * c-gimplify.cc (genericize_c_loop): Adjust for COND_CLEANUP - being CLEANUP_STMT/TRY_FINALLY_EXPR trailing nesting depth - instead of actual cleanup. -gcc/cp/ - * semantics.cc (adjust_loop_decl_cond): Allow multiple trailing - CLEANUP_STMT levels in *BODY_P. Set *CLEANUP_P to the number - of levels rather than one particular cleanup, keep the cleanups - in *PREP_P. Set *BODY_P to the last stmt in the cur_stmt_list - or NULL if *CLEANUP_P and the innermost cur_stmt_list is empty. - (finish_loop_cond_prep): New function. - (finish_while_stmt, finish_for_stmt): Use it. Don't call - set_one_cleanup_loc. - * constexpr.cc (cxx_eval_loop_expr): Adjust handling of - {FOR,WHILE}_COND_{PREP,CLEANUP}. -gcc/testsuite/ - * g++.dg/expr/for9.C: New test. - * g++.dg/cpp26/decomp12.C: New test. ---- - gcc/c-family/c-common.h | 6 +- - gcc/c-family/c-gimplify.cc | 41 +++------ - gcc/cp/constexpr.cc | 97 +++++++++++++++++-- - gcc/cp/semantics.cc | 128 +++++++++++++++++++------- - gcc/testsuite/g++.dg/cpp26/decomp12.C | 46 +++++++++ - gcc/testsuite/g++.dg/expr/for9.C | 25 +++++ - gcc/tree-iterator.cc | 22 +++++ - gcc/tree-iterator.h | 1 + - 8 files changed, 297 insertions(+), 69 deletions(-) - create mode 100644 gcc/testsuite/g++.dg/cpp26/decomp12.C - create mode 100644 gcc/testsuite/g++.dg/expr/for9.C - -diff --git a/gcc/c-family/c-common.h b/gcc/c-family/c-common.h -index bc238430b7a7..ea6c29750567 100644 ---- a/gcc/c-family/c-common.h -+++ b/gcc/c-family/c-common.h -@@ -1518,7 +1518,8 @@ extern tree build_userdef_literal (tree suffix_id, tree value, - - /* WHILE_STMT accessors. These give access to the condition of the - while statement, the body, and name of the while statement, and -- condition preparation statements and its cleanup, respectively. */ -+ condition preparation statements and number of its nested cleanups, -+ respectively. */ - #define WHILE_COND(NODE) TREE_OPERAND (WHILE_STMT_CHECK (NODE), 0) - #define WHILE_BODY(NODE) TREE_OPERAND (WHILE_STMT_CHECK (NODE), 1) - #define WHILE_NAME(NODE) TREE_OPERAND (WHILE_STMT_CHECK (NODE), 2) -@@ -1533,7 +1534,8 @@ extern tree build_userdef_literal (tree suffix_id, tree value, - - /* FOR_STMT accessors. These give access to the init statement, - condition, update expression, body and name of the for statement, -- and condition preparation statements and its cleanup, respectively. */ -+ and condition preparation statements and number of its nested cleanups, -+ respectively. */ - #define FOR_INIT_STMT(NODE) TREE_OPERAND (FOR_STMT_CHECK (NODE), 0) - #define FOR_COND(NODE) TREE_OPERAND (FOR_STMT_CHECK (NODE), 1) - #define FOR_EXPR(NODE) TREE_OPERAND (FOR_STMT_CHECK (NODE), 2) -diff --git a/gcc/c-family/c-gimplify.cc b/gcc/c-family/c-gimplify.cc -index d53e0c2dc567..dc5e80dfa6be 100644 ---- a/gcc/c-family/c-gimplify.cc -+++ b/gcc/c-family/c-gimplify.cc -@@ -258,8 +258,10 @@ expr_loc_or_loc (const_tree expr, location_t or_loc) - for C++ for/while loops with variable declaration as condition. COND_PREP - is a BIND_EXPR with the declaration and initialization of the condition - variable, into which COND, BODY, continue label if needed and INCR if -- non-NULL should be appended, and COND_CLEANUP are statements which should -- be evaluated after that or if anything in COND, BODY or INCR throws. */ -+ non-NULL should be appended, and COND_CLEANUP is number of nested -+ CLEANUP_STMT -> TRY_FINALLY_EXPR statements at the end. If non-NULL, -+ COND, BODY, continue label if needed and INCR if non-NULL should be -+ appended to the body of the COND_CLEANUP's nested TRY_FINALLY_EXPR. */ - - static void - genericize_c_loop (tree *stmt_p, location_t start_locus, tree cond, tree body, -@@ -278,7 +280,6 @@ genericize_c_loop (tree *stmt_p, location_t start_locus, tree cond, tree body, - walk_tree_1 (&cond_prep, func, data, NULL, lh); - walk_tree_1 (&cond, func, data, NULL, lh); - walk_tree_1 (&incr, func, data, NULL, lh); -- walk_tree_1 (&cond_cleanup, func, data, NULL, lh); - - blab = begin_bc_block (bc_break, start_locus); - clab = begin_bc_block (bc_continue, start_locus); -@@ -309,36 +310,24 @@ genericize_c_loop (tree *stmt_p, location_t start_locus, tree cond, tree body, - EXPR; - goto top; - -- or -- -- try { -- if (COND); else break; -- BODY; -- cont: -- EXPR; -- } finally { -- COND_CLEANUP -- } -- -- appended into COND_PREP body. */ -+ appended into COND_PREP body or body of some TRY_FINALLY_EXPRs -+ at the end of COND_PREP. */ - gcc_assert (cond_is_first && TREE_CODE (cond_prep) == BIND_EXPR); - tree top = build1 (LABEL_EXPR, void_type_node, - create_artificial_label (start_locus)); - exit = build1 (GOTO_EXPR, void_type_node, LABEL_EXPR_LABEL (top)); - append_to_statement_list (top, &outer_stmt_list); - append_to_statement_list (cond_prep, &outer_stmt_list); -- stmt_list = BIND_EXPR_BODY (cond_prep); -- BIND_EXPR_BODY (cond_prep) = NULL_TREE; - stmt_list_p = &BIND_EXPR_BODY (cond_prep); -- if (cond_cleanup && TREE_SIDE_EFFECTS (cond_cleanup)) -- { -- t = build2_loc (EXPR_LOCATION (cond_cleanup), TRY_FINALLY_EXPR, -- void_type_node, NULL_TREE, cond_cleanup); -- append_to_statement_list (t, &stmt_list); -- *stmt_list_p = stmt_list; -- stmt_list_p = &TREE_OPERAND (t, 0); -- stmt_list = NULL_TREE; -- } -+ if (cond_cleanup) -+ for (unsigned depth = tree_to_uhwi (cond_cleanup); depth; --depth) -+ { -+ t = tsi_stmt (tsi_last (*stmt_list_p)); -+ gcc_assert (TREE_CODE (t) == TRY_FINALLY_EXPR); -+ stmt_list_p = &TREE_OPERAND (t, 0); -+ } -+ stmt_list = *stmt_list_p; -+ *stmt_list_p = NULL_TREE; - tree after_cond = create_artificial_label (cond_locus); - tree goto_after_cond = build1 (GOTO_EXPR, void_type_node, after_cond); - t = build1 (GOTO_EXPR, void_type_node, get_bc_label (bc_break)); -diff --git a/gcc/cp/constexpr.cc b/gcc/cp/constexpr.cc -index f142dd32bc80..299b13456873 100644 ---- a/gcc/cp/constexpr.cc -+++ b/gcc/cp/constexpr.cc -@@ -7153,6 +7153,7 @@ cxx_eval_loop_expr (const constexpr_ctx *ctx, tree t, - - tree body, cond = NULL_TREE, expr = NULL_TREE; - tree cond_prep = NULL_TREE, cond_cleanup = NULL_TREE; -+ unsigned cond_cleanup_depth = 0; - int count = 0; - switch (TREE_CODE (t)) - { -@@ -7188,11 +7189,25 @@ cxx_eval_loop_expr (const constexpr_ctx *ctx, tree t, - } - if (cond_prep) - gcc_assert (TREE_CODE (cond_prep) == BIND_EXPR); -- auto cleanup_cond = [=] { -+ auto cleanup_cond = [&] { - /* Clean up the condition variable after each iteration. */ -- if (cond_cleanup && !*non_constant_p) -- cxx_eval_constant_expression (ctx, cond_cleanup, vc_discard, -- non_constant_p, overflow_p); -+ if (cond_cleanup_depth && !*non_constant_p) -+ { -+ auto_vec cleanups (cond_cleanup_depth); -+ tree s = BIND_EXPR_BODY (cond_prep); -+ unsigned i; -+ for (i = cond_cleanup_depth; i; --i) -+ { -+ tree_stmt_iterator iter = tsi_last (s); -+ s = tsi_stmt (iter); -+ cleanups.quick_push (CLEANUP_EXPR (s)); -+ s = CLEANUP_BODY (s); -+ } -+ tree c; -+ FOR_EACH_VEC_ELT_REVERSE (cleanups, i, c) -+ cxx_eval_constant_expression (ctx, c, vc_discard, non_constant_p, -+ overflow_p); -+ } - if (cond_prep) - for (tree decl = BIND_EXPR_VARS (cond_prep); - decl; decl = DECL_CHAIN (decl)) -@@ -7227,9 +7242,77 @@ cxx_eval_loop_expr (const constexpr_ctx *ctx, tree t, - for (tree decl = BIND_EXPR_VARS (cond_prep); - decl; decl = DECL_CHAIN (decl)) - ctx->global->clear_value (decl); -- cxx_eval_constant_expression (ctx, BIND_EXPR_BODY (cond_prep), -- vc_discard, non_constant_p, -- overflow_p, jump_target); -+ if (cond_cleanup) -+ { -+ /* If COND_CLEANUP is non-NULL, we need to evaluate DEPTH -+ nested STATEMENT_LISTs from inside of BIND_EXPR_BODY, -+ but defer the evaluation of CLEANUP_EXPRs of CLEANUP_STMT -+ at the end of those STATEMENT_LISTs. */ -+ cond_cleanup_depth = 0; -+ tree s = BIND_EXPR_BODY (cond_prep); -+ for (unsigned depth = tree_to_uhwi (cond_cleanup); -+ depth; --depth) -+ { -+ for (tree_stmt_iterator i = tsi_start (s); -+ !tsi_end_p (i); ++i) -+ { -+ tree stmt = *i; -+ if (TREE_CODE (stmt) == DEBUG_BEGIN_STMT) -+ continue; -+ if (tsi_one_before_end_p (i)) -+ { -+ /* The last statement in the STATEMENT_LIST -+ has to be a CLEANUP_STMT (verified in -+ finish_loop_cond_prep). We want to -+ evaluate just its CLEANUP_BODY part but not -+ CLEANUP_EXPR part just yet. */ -+ gcc_assert (TREE_CODE (stmt) == CLEANUP_STMT); -+ /* If the CLEANUP_STMT is not actually to be -+ evaluated, don't increment cond_cleanup_depth -+ so that we don't evaluate the CLEANUP_EXPR -+ for it later either. */ -+ if (*jump_target) -+ { -+ depth = 1; -+ break; -+ } -+ ++cond_cleanup_depth; -+ /* If not in the innermost one, next iteration -+ will handle CLEANUP_BODY similarly. */ -+ if (depth > 1) -+ { -+ s = CLEANUP_BODY (stmt); -+ break; -+ } -+ /* The innermost one can be evaluated normally. */ -+ cxx_eval_constant_expression (ctx, -+ CLEANUP_BODY (stmt), -+ vc_discard, -+ non_constant_p, -+ overflow_p, -+ jump_target); -+ break; -+ } -+ /* And so should be evaluated statements which aren't -+ last in the STATEMENT_LIST. */ -+ cxx_eval_constant_expression (ctx, stmt, vc_discard, -+ non_constant_p, overflow_p, -+ jump_target); -+ if (*non_constant_p -+ || returns (jump_target) -+ || breaks (jump_target) -+ || continues (jump_target)) -+ { -+ depth = 1; -+ break; -+ } -+ } -+ } -+ } -+ else -+ cxx_eval_constant_expression (ctx, BIND_EXPR_BODY (cond_prep), -+ vc_discard, non_constant_p, -+ overflow_p, jump_target); - } - - if (cond) -diff --git a/gcc/cp/semantics.cc b/gcc/cp/semantics.cc -index 8a2d86576fb0..7c7d3e3c4326 100644 ---- a/gcc/cp/semantics.cc -+++ b/gcc/cp/semantics.cc -@@ -790,8 +790,8 @@ finish_cond (tree *cond_p, tree expr) - while (A x = 42) { } - for (; A x = 42;) { } - move the *BODY_P statements as a BIND_EXPR into {FOR,WHILE}_COND_PREP -- and if there is any CLEANUP_STMT at the end, remove that and -- put the cleanup into {FOR,WHILE}_COND_CLEANUP. -+ and if there are any CLEANUP_STMT at the end, remember their count in -+ {FOR,WHILE}_COND_CLEANUP. - genericize_c_loop will then handle it appropriately. In particular, - the {FOR,WHILE}_COND, {FOR,WHILE}_BODY, if used continue label and - FOR_EXPR will be appended into the {FOR,WHILE}_COND_PREP BIND_EXPR, -@@ -807,26 +807,88 @@ adjust_loop_decl_cond (tree *body_p, tree *prep_p, tree *cleanup_p) - return; - - gcc_assert (!processing_template_decl); -- if (*body_p != cur_stmt_list) -- { -- /* There can be either no cleanup at all, if the condition -- declaration doesn't have non-trivial destructor, or a single -- one if it does. In that case extract it into *CLEANUP_P. */ -- gcc_assert (stmt_list_stack->length () > 1 -- && (*stmt_list_stack)[stmt_list_stack->length () -- - 2] == *body_p); -- tree_stmt_iterator last = tsi_last (*body_p); -- gcc_assert (tsi_one_before_end_p (last) -- && TREE_CODE (tsi_stmt (last)) == CLEANUP_STMT -- && CLEANUP_BODY (tsi_stmt (last)) == cur_stmt_list -- && tsi_end_p (tsi_last (cur_stmt_list)) -- && !CLEANUP_EH_ONLY (tsi_stmt (last))); -- *cleanup_p = CLEANUP_EXPR (tsi_stmt (last)); -- tsi_delink (&last); -+ *prep_p = *body_p; -+ if (*prep_p != cur_stmt_list) -+ { -+ /* There can be just one CLEANUP_STMT, or there could be multiple -+ nested CLEANUP_STMTs, e.g. for structured bindings used as -+ condition. */ -+ gcc_assert (stmt_list_stack->length () > 1); -+ for (unsigned i = stmt_list_stack->length () - 2; ; --i) -+ { -+ tree t = (*stmt_list_stack)[i]; -+ tree_stmt_iterator last = tsi_last (t); -+ gcc_assert (tsi_one_before_end_p (last) -+ && TREE_CODE (tsi_stmt (last)) == CLEANUP_STMT -+ && (CLEANUP_BODY (tsi_stmt (last)) -+ == (*stmt_list_stack)[i + 1]) -+ && !CLEANUP_EH_ONLY (tsi_stmt (last))); -+ if (t == *prep_p) -+ { -+ *cleanup_p = build_int_cst (long_unsigned_type_node, -+ stmt_list_stack->length () - 1 - i); -+ break; -+ } -+ gcc_assert (i >= 1); -+ } - } - current_binding_level->keep = true; -- *prep_p = *body_p; -- *body_p = push_stmt_list (); -+ tree_stmt_iterator iter = tsi_last (cur_stmt_list); -+ /* Temporarily store in {FOR,WHILE}_BODY the last statement of -+ the innnermost statement list or NULL if it has no statement. -+ This is used in finish_loop_cond_prep to find out the splitting -+ point and then {FOR,WHILE}_BODY will be changed to the actual -+ body. */ -+ if (tsi_end_p (iter)) -+ *body_p = NULL_TREE; -+ else -+ *body_p = tsi_stmt (iter); -+} -+ -+/* Finalize {FOR,WHILE}_{BODY,COND_PREP} after the loop body. -+ The above function initialized *BODY_P to the last statement -+ in *PREP_P at that point. -+ Call do_poplevel on *PREP_P and move everything after that -+ former last statement into *BODY_P. genericize_c_loop -+ will later put those parts back together. -+ CLEANUP is {FOR,WHILE}_COND_CLEANUP. */ -+ -+static void -+finish_loop_cond_prep (tree *body_p, tree *prep_p, tree cleanup) -+{ -+ *prep_p = do_poplevel (*prep_p); -+ gcc_assert (TREE_CODE (*prep_p) == BIND_EXPR); -+ if (BIND_EXPR_BODY (*prep_p) == *body_p) -+ { -+ gcc_assert (cleanup == NULL_TREE); -+ *body_p = build_empty_stmt (input_location); -+ return; -+ } -+ tree stmt_list = BIND_EXPR_BODY (*prep_p); -+ gcc_assert (TREE_CODE (stmt_list) == STATEMENT_LIST); -+ if (cleanup) -+ { -+ tree_stmt_iterator iter = tsi_last (stmt_list); -+ gcc_assert (TREE_CODE (tsi_stmt (iter)) == CLEANUP_STMT); -+ for (unsigned depth = tree_to_uhwi (cleanup); depth > 1; --depth) -+ { -+ gcc_assert (TREE_CODE (CLEANUP_BODY (tsi_stmt (iter))) -+ == STATEMENT_LIST); -+ iter = tsi_last (CLEANUP_BODY (tsi_stmt (iter))); -+ gcc_assert (TREE_CODE (tsi_stmt (iter)) == CLEANUP_STMT); -+ } -+ if (*body_p == NULL_TREE) -+ { -+ *body_p = CLEANUP_BODY (tsi_stmt (iter)); -+ CLEANUP_BODY (tsi_stmt (iter)) = build_empty_stmt (input_location); -+ return; -+ } -+ stmt_list = CLEANUP_BODY (tsi_stmt (iter)); -+ } -+ tree_stmt_iterator iter = tsi_start (stmt_list); -+ while (tsi_stmt (iter) != *body_p) -+ tsi_next (&iter); -+ *body_p = tsi_split_stmt_list (input_location, iter); - } - - /* Finish a goto-statement. */ -@@ -1437,14 +1499,13 @@ void - finish_while_stmt (tree while_stmt) - { - end_maybe_infinite_loop (boolean_true_node); -- WHILE_BODY (while_stmt) -- = (WHILE_COND_PREP (while_stmt) -- ? pop_stmt_list (WHILE_BODY (while_stmt)) -- : do_poplevel (WHILE_BODY (while_stmt))); -- finish_loop_cond (&WHILE_COND (while_stmt), WHILE_BODY (while_stmt)); - if (WHILE_COND_PREP (while_stmt)) -- WHILE_COND_PREP (while_stmt) = do_poplevel (WHILE_COND_PREP (while_stmt)); -- set_one_cleanup_loc (WHILE_COND_CLEANUP (while_stmt), input_location); -+ finish_loop_cond_prep (&WHILE_BODY (while_stmt), -+ &WHILE_COND_PREP (while_stmt), -+ WHILE_COND_CLEANUP (while_stmt)); -+ else -+ WHILE_BODY (while_stmt) = do_poplevel (WHILE_BODY (while_stmt)); -+ finish_loop_cond (&WHILE_COND (while_stmt), WHILE_BODY (while_stmt)); - } - - /* Begin a do-statement. Returns a newly created DO_STMT if -@@ -1709,17 +1770,16 @@ finish_for_stmt (tree for_stmt) - RANGE_FOR_BODY (for_stmt) = do_poplevel (RANGE_FOR_BODY (for_stmt)); - else - { -- FOR_BODY (for_stmt) -- = (FOR_COND_PREP (for_stmt) -- ? pop_stmt_list (FOR_BODY (for_stmt)) -- : do_poplevel (FOR_BODY (for_stmt))); -+ if (FOR_COND_PREP (for_stmt)) -+ finish_loop_cond_prep (&FOR_BODY (for_stmt), -+ &FOR_COND_PREP (for_stmt), -+ FOR_COND_CLEANUP (for_stmt)); -+ else -+ FOR_BODY (for_stmt) = do_poplevel (FOR_BODY (for_stmt)); - if (FOR_COND (for_stmt)) - finish_loop_cond (&FOR_COND (for_stmt), - FOR_EXPR (for_stmt) ? integer_one_node - : FOR_BODY (for_stmt)); -- if (FOR_COND_PREP (for_stmt)) -- FOR_COND_PREP (for_stmt) = do_poplevel (FOR_COND_PREP (for_stmt)); -- set_one_cleanup_loc (FOR_COND_CLEANUP (for_stmt), input_location); - } - - /* Pop the scope for the body of the loop. */ -diff --git a/gcc/tree-iterator.cc b/gcc/tree-iterator.cc -index db2219c62489..b7e2b421c5ee 100644 ---- a/gcc/tree-iterator.cc -+++ b/gcc/tree-iterator.cc -@@ -284,6 +284,28 @@ tsi_delink (tree_stmt_iterator *i) - i->ptr = next; - } - -+/* Split a STATEMENT_LIST in I.contrainer into two, all statements -+ from the start until I.ptr inclusive will remain in the original -+ one, all statements after I.ptr are removed from that STATEMENT_LIST -+ and returned as a new STATEMENT_LIST. If I is the last statement, -+ an empty statement with LOC location is returned. */ -+ -+tree -+tsi_split_stmt_list (location_t loc, tree_stmt_iterator i) -+{ -+ if (tsi_one_before_end_p (i)) -+ return build_empty_stmt (loc); -+ tsi_next (&i); -+ tree ret = NULL_TREE; -+ while (!tsi_end_p (i)) -+ { -+ tree t = tsi_stmt (i); -+ tsi_delink (&i); -+ append_to_statement_list_force (t, &ret); -+ } -+ return ret; -+} -+ - /* Return the first expression in a sequence of COMPOUND_EXPRs, or in - a STATEMENT_LIST, disregarding DEBUG_BEGIN_STMTs, recursing into a - STATEMENT_LIST if that's the first non-DEBUG_BEGIN_STMT. */ -diff --git a/gcc/tree-iterator.h b/gcc/tree-iterator.h -index 27795e9ee2b8..d1bc9014c65b 100644 ---- a/gcc/tree-iterator.h -+++ b/gcc/tree-iterator.h -@@ -138,6 +138,7 @@ extern void tsi_link_after (tree_stmt_iterator *, tree, - enum tsi_iterator_update); - - extern void tsi_delink (tree_stmt_iterator *); -+extern tree tsi_split_stmt_list (location_t, tree_stmt_iterator); - - extern tree alloc_stmt_list (void); - extern void free_stmt_list (tree); --- -2.43.5 diff --git a/sys-devel/gcc/gcc-15.0.0_pre20250112-r3.ebuild b/sys-devel/gcc/gcc-15.0.0_pre20250112-r3.ebuild deleted file mode 100644 index e5348afa3eab..000000000000 --- a/sys-devel/gcc/gcc-15.0.0_pre20250112-r3.ebuild +++ /dev/null @@ -1,53 +0,0 @@ -# Copyright 1999-2025 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="41" -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 - -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_user -} diff --git a/sys-devel/gcc/gcc-15.0.1_pre20250119.ebuild b/sys-devel/gcc/gcc-15.0.1_pre20250119.ebuild deleted file mode 100644 index f62140512804..000000000000 --- a/sys-devel/gcc/gcc-15.0.1_pre20250119.ebuild +++ /dev/null @@ -1,53 +0,0 @@ -# Copyright 1999-2025 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="42" -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 - -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_user -} diff --git a/sys-devel/gcc/gcc-15.0.1_pre20250126.ebuild b/sys-devel/gcc/gcc-15.0.1_pre20250126.ebuild deleted file mode 100644 index bd26365ddc1e..000000000000 --- a/sys-devel/gcc/gcc-15.0.1_pre20250126.ebuild +++ /dev/null @@ -1,53 +0,0 @@ -# Copyright 1999-2025 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="43" -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 - -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_user -} diff --git a/sys-devel/gcc/gcc-15.0.1_pre20250202.ebuild b/sys-devel/gcc/gcc-15.0.1_pre20250202.ebuild deleted file mode 100644 index 3af8354bedc2..000000000000 --- a/sys-devel/gcc/gcc-15.0.1_pre20250202.ebuild +++ /dev/null @@ -1,53 +0,0 @@ -# Copyright 1999-2025 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="44" -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 - -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_user -} diff --git a/sys-devel/gcc/gcc-15.0.1_pre20250209-r1.ebuild b/sys-devel/gcc/gcc-15.0.1_pre20250209-r1.ebuild deleted file mode 100644 index c30b842f308f..000000000000 --- a/sys-devel/gcc/gcc-15.0.1_pre20250209-r1.ebuild +++ /dev/null @@ -1,55 +0,0 @@ -# Copyright 1999-2025 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="45" -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 - -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_user - eapply "${FILESDIR}"/${P}-coro.patch - eapply "${FILESDIR}"/${P}-range-for-mariadb.patch -}