diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/gcc/Manifest b/sdk_container/src/third_party/portage-stable/sys-devel/gcc/Manifest index 86369106b0..29a725d2ed 100644 --- a/sdk_container/src/third_party/portage-stable/sys-devel/gcc/Manifest +++ b/sdk_container/src/third_party/portage-stable/sys-devel/gcc/Manifest @@ -6,23 +6,27 @@ DIST gcc-11.5.0-patches-1.tar.xz 13664 BLAKE2B 64fd9c2d074aca58ecd8c0035ccf2d2b8 DIST gcc-11.5.0.tar.xz 82399864 BLAKE2B f4a61faad32aac9e9cb553c1a1a011df0a057f6e2cac92a13cc7e285d08191dd4a117f41a8faac2359c0e2a16f954c7fef354dda9df8c63bff1c5cefda82602c SHA512 88f17d5a5e69eeb53aaf0a9bc9daab1c4e501d145b388c5485ebeb2cc36178fbb2d3e49ebef4a8c007a05e88471a06b97cf9b08870478249f77fbfa3d4abd9a8 DIST gcc-12-20241219.tar.xz 79920016 BLAKE2B 71044352515f33eaf0bcc64cc6eacdecb8b7b1dbca6d8836b629f76e60320f5090178ff37b6804fbda0913c0f55afca37588647974fd72e9961edd338ccf6ffb SHA512 e0c08366f392083feb1ae242242e9bd335681234808ed44d4e75afe157be2814bef321d2327186d217f38bbb6176706e1258228904d31fdb3bb37c8e245dacb0 DIST gcc-12-20250220.tar.xz 79919964 BLAKE2B 01ac8e2865b46d8dde41b73b5b5dd8c6bd533dc1ecff9a05455ad10fc125ad1ba4bb15de637ca639a82057fbd354a6225c0dcd0144c313b91833aa712f2e133a SHA512 0ba3b3b1eca1a62da5f0f0238c5980bcb6f2efbc1e0dffefd04b107bc48d4dfaf72cc9037689d7725a4aa9e4478d0b43339eccfea718bb45a113aef14604d215 +DIST gcc-12-20250227.tar.xz 79915940 BLAKE2B 0adb19847cb3f317316549f657434654b9923806366a4b95e496effea9c07995b7d3de65c40cc2f62ba1e87cfb0f8cd8a1a833284042fdc5e6fce2bd7e7e9543 SHA512 d01cad1771762f5b56c783d6a3b39415be1c7619229b5ff056fe40ef0bf821c67a2d1a2272c2227a44f92825582579625352d19e2342d11f76a079556dae0ae8 DIST gcc-12.4.0-musl-patches-1.tar.xz 3068 BLAKE2B e5e39c24934072ea89e4467d0dc5196f3dadfb5ffba0c856d051648a2fbf57d434a57e95227cdf2b8cea45f0f5555aec2bc372d2f6cb0b69efd87831d248d364 SHA512 b9db204845a25be043d76cae826d42eebeeb4f9be7c3049af6fe7601a552bedfd24731156a6a36b4b5e2e2af656a589a5c556d2b0b3ded33ba290a773ee87c62 DIST gcc-12.4.0-patches-1.tar.xz 15576 BLAKE2B 98c29888de7701b365be7ac9062f0cee3340d58c85485e26f0d02f1483ec64cc9c10651488a4fd937551afe30f4e19777e6766871a724ae3ba6c290c16f4fdf1 SHA512 3f7c5d36e56e07ea9dd143a5d13342a6c1ccbf0643abd1c0bcbfb46bb7c7b1308aef6e3e882031c9c191610f01af906b19be5aa2b139cf617614f46e97463aec DIST gcc-12.4.0-patches-2.tar.xz 14876 BLAKE2B 6bf5abbb2abba4b9fe9fa153ac4112fe5f563e97cd4e1b885ccd0d88abf1124fa91f20d6be972e2242410447be73bca60014785f8551b8087ed0d4cc3e868225 SHA512 dfd5f02d4c1076fad4ee998b2f620171dd3eb65a1160312def9dae89b18327a06db853f569e0e3c049e5ab06c61488bb6faecec52bafe737fddeb43628c54a1f DIST gcc-12.4.0.tar.xz 83377372 BLAKE2B 0d5aa9995bf53fa2dc976a846240cfb8fafd125ad6c54f45dc9d770215eae3e9ea0db82a9a4f79c51b4d5f8461a1d730c17db6841bc31bd96dba11d9ed7544ae SHA512 5bd29402cad2deb5d9388d0236c7146414d77e5b8d5f1c6c941c7a1f47691c3389f08656d5f6e8e2d6717bf2c81f018d326f632fb468f42925b40bd217fc4853 DIST gcc-13-20241220.tar.xz 84504500 BLAKE2B 60d6dcdcafa36399a0c0de7fef3a4eb4ca8e0b6780cd31c9eace2965c53115205bf64e8247b833a4375c1e3ad2d94820b5bdc97a4689be95d8ab55a676afa689 SHA512 10fe009dc3b8872b24350e4fb999f71b848bd5a03e48e8292f76e6eca3dbdef8383a3b13b813aada983ebdbe3ecab1642961b3210cd1e0063a86655a44493017 DIST gcc-13-20250221.tar.xz 84535136 BLAKE2B 8f56681b291231c7922680e77fa29f84510c37911713635cd3806a366fcc74f708c3c3dd6020cfcaf6a6adb84099a83e8de455ba201281264e9eff916c4b0c36 SHA512 4527db4becbe2a49c42e82fd817089cc4b861693560829350d0787685ccad0cd6c6ced2ec9a7ce538589f7b431c0e118dd2bc157435328065941e98e3facce96 +DIST gcc-13-20250301.tar.xz 84525780 BLAKE2B c366f4de63b7956abb1bf2d1039acdf90c7a801adbb2793e4c199b0f743d143327aac9c2b078991f802da758ed4326dd913d9f60aec4fc471eff9af72f781a8e SHA512 075bfb3c5aeaf1c9bf7ab69ef117fcc1fd3ce1042edc9442d95df717e622c2ea9cfabbabf8be5eda32b3cf115d7d3e73907fd577a69f0beb6895f7ec2c5fc813 DIST gcc-13.2.0-musl-patches-2.tar.xz 5292 BLAKE2B c057d6574d03c05854edaa9f3fd40e9149662b04f3ac7a7db3eb078d73a7b535726d1bf52e5b12736dedb2f9898ad731f2e48a6421fcfbf7b90f929dee072fcb SHA512 a691da0c87c443a5e9d23731f4005f27871c5b12bc9102873ffa24d374aa7b9fbd187c4f5635d23fa9ffb17e351e76173c2d3fdf40646e355c4cb314b538de69 DIST gcc-13.2.0-patches-3.tar.xz 30956 BLAKE2B 29ce043b46645640ca1e983397af3e158588ad87575f0bc59451ea4a7dd5e3bb5b190ed031de6a22cd790d423ba111e95d222187dd09985dceb12db9f0a2d907 SHA512 4ffecae7be320124ad0c4e71e39e142b7aa8db0e70b5f486f491d7a33ea31efc6464c6abeea77df02a8bd5cf81f08225d625c8af5c27f9afa32c0d7d989f7a3c DIST gcc-13.2.0.tar.xz 87858592 BLAKE2B 0034b29d3d6cc05821f0c4253ce077805943aff7b370729dd203bda57d89c107edd657eeddc2fb1e69ea15c7b0323b961f46516c7f4af89a3ccf7fea84701be2 SHA512 d99e4826a70db04504467e349e9fbaedaa5870766cda7c5cab50cdebedc4be755ebca5b789e1232a34a20be1a0b60097de9280efe47bdb71c73251e30b0862a2 DIST gcc-13.3.0-patches-2.tar.xz 44440 BLAKE2B ebde73f6c3cd1a5fdc5bbce36414a59dda0925cba9d422d3689fc9c14fece44ee2391982a674411aa99bf47ffd49200f3ce51cc908beb8298adfff78e709a84c SHA512 eb56e0d7e69b5c3cca21f4cbff21c1204cf64ede7e66d689f45cf5ff37de8a59f24eb1f4b30d9c4222fd4126654fe4ffc146851f504761014995553c1202e8fd DIST gcc-14-20241221.tar.xz 88198252 BLAKE2B 7491c2e1c8885e201859143bdf5cae95af4c0db77709ec7d761ad535df30042f5deb8488ba7c508de3673e4b0f2af1de8d17476f39cd47b745ddccec6a9e4470 SHA512 91fe1e1d1f8e8fad64930a2eadf942a542bd42f841fceb49f475bccac00f04692b8cd38821ea9ee05f78b5c51001d8bd39df5f71f3a3d89aab8980019cea9be8 DIST gcc-14-20250222.tar.xz 88217556 BLAKE2B 38023332b91bf6ff50d06b0967f7c4ed2f511ffd6cf29cc09a429572a2a69db39f3e6e0e0067752012d105abbbd64c17d21f1c6086e7754c9e90fa94343384f9 SHA512 517abef61c8a45a19fc3bc5aec276a82bed3e4d3e1cd2f468c9a5e92b8b727bf90c5914507b1c5b58721ee29dc6e4756184bc6a1ebef7b4800ff2e08762e5fe4 +DIST gcc-14-20250301.tar.xz 88230928 BLAKE2B 2b65e7cccbf431a74df73adac53995873e78240d7abd97e9c9c576806c389b3c1abb6d47710a25a26f2ee399de750a07c3fb7916a580875d08a3a83354d89c1c SHA512 6b2afe19ce95a595307ae10b89054927116d33b499f1ef8233936d719271c04cb8f66890068ef2252c59ab0276dd0e6210990cb88abdfb4965818c25949f431e 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-20250216.tar.xz 91404792 BLAKE2B 1a007a432c7f7ac6ba0169caf2561e26267ae5c75403ecd52227dbee255eff4c1bca5db9d6ce2e772ee357dc06e648d7ebfb3629117b13d48343a474a17901c6 SHA512 8dcb3968e157a2cb6a06e4ba76a0fd95936025d99f48333aacc554f347d19df8e6b9a0c9c454acd730a5608122ff4c12a712ccdf09919f8e310cf6688c00df84 DIST gcc-15-20250223.tar.xz 91424896 BLAKE2B 0527c35ef3e24a9defe99bdccc39ba4c839cd867428f5424e3f8089381b3c3f68407bc2e8ddb9db72ea4860deed558b1ae584a41fa0623d127a055e9227d2216 SHA512 7e3296bcf7ed7868a5d4540525143995d6fd7d7144e223ae3666e3e4e716eef6ef1ea0389527df6d410442fc998ad5db6e07f52582819dfeadb0cba2d87d3208 +DIST gcc-15-20250302.tar.xz 91196748 BLAKE2B d6eef1753179f813ef1908c4ddc56144161abde36e602930bf4e53cccc7c352ee882bfa376528f20c34aa3544b1cb703c0fa062bb67245b0a3499125d4dd2bfc SHA512 407857cfe454cfa690eab0b01183811c7ef618921b64152f322e67bd27b708e57ee3de57274827340e387c5f906643bf2dc362b541d4d08f6a7283bc3da8bcb3 DIST gcc-15.0.0-musl-patches-2.tar.xz 3076 BLAKE2B 0073248fe4f7dd827980559017b5aa1fb5c4c46acc9ad5c410dc152fd1e44966d3066bf7152338573cb45b1c36027de5f0c519abd414d97a37bccef07f6a5281 SHA512 295f1a669020bbe2874e9b03afd46b5d083073b276fca3543f3767a2d74f35df81cf0a67abad50c200cf7a3af36ec98ff9977cb7d5c19f334af7d3bb1926a3de 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 diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/gcc/files/gcc-15.0.1_pre20250223-c-Fix-range-for-with-PMFs-PR118923.patch b/sdk_container/src/third_party/portage-stable/sys-devel/gcc/files/gcc-15.0.1_pre20250223-c-Fix-range-for-with-PMFs-PR118923.patch new file mode 100644 index 0000000000..04cf198fb6 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-devel/gcc/files/gcc-15.0.1_pre20250223-c-Fix-range-for-with-PMFs-PR118923.patch @@ -0,0 +1,231 @@ +From a41b3f54c13890b1327bb3d4fbae8f7feb37d00b Mon Sep 17 00:00:00 2001 +Message-ID: +From: Jakub Jelinek +Date: Tue, 25 Feb 2025 09:26:46 +0100 +Subject: [PATCH] c++: Fix range for with PMFs [PR118923] + +The following testcases segfault because the new range for -frange-for-ext-temps +temporary extension extends even the internal TARGET_EXPRs created by +get_member_function_from_ptrfunc. + +The following patch fixes that by using get_internal_target_expr for those +instead of force_target_expr (similarly in cp_finish_decl and +build_comparison_op) and using force_target_expr inside of +get_internal_target_expr. + +2025-02-25 Jakub Jelinek + + PR c++/118923 + * tree.cc (get_internal_target_expr): Use force_target_expr + instead of build_target_expr_with_type. + * typeck.cc (get_member_function_from_ptrfunc): Use + get_internal_target_expr instead of force_target_expr. + * decl.cc (cp_finish_decl): Likewise. + * method.cc (build_comparison_op): Likewise. + + * g++.dg/cpp0x/pr118923.C: New test. + * g++.dg/cpp1y/pr118923.C: New test. +--- + gcc/cp/decl.cc | 6 +-- + gcc/cp/method.cc | 2 +- + gcc/cp/tree.cc | 3 +- + gcc/cp/typeck.cc | 6 +-- + gcc/testsuite/g++.dg/cpp0x/pr118923.C | 66 +++++++++++++++++++++++++++ + gcc/testsuite/g++.dg/cpp1y/pr118923.C | 38 +++++++++++++++ + 6 files changed, 110 insertions(+), 11 deletions(-) + create mode 100644 gcc/testsuite/g++.dg/cpp0x/pr118923.C + create mode 100644 gcc/testsuite/g++.dg/cpp1y/pr118923.C + +diff --git a/gcc/cp/decl.cc b/gcc/cp/decl.cc +index 05ad9bb24d59..936e48e907e2 100644 +--- a/gcc/cp/decl.cc ++++ b/gcc/cp/decl.cc +@@ -9377,8 +9377,7 @@ cp_finish_decl (tree decl, tree init, bool init_const_expr_p, + tree guard = NULL_TREE; + if (cleanups || cleanup) + { +- guard = force_target_expr (boolean_type_node, +- boolean_false_node, tf_none); ++ guard = get_internal_target_expr (boolean_false_node); + add_stmt (guard); + guard = TARGET_EXPR_SLOT (guard); + } +@@ -9407,8 +9406,7 @@ cp_finish_decl (tree decl, tree init, bool init_const_expr_p, + popped that all, so push those extra cleanups around + the whole sequence with a guard variable. */ + gcc_assert (TREE_CODE (sl) == STATEMENT_LIST); +- guard = force_target_expr (integer_type_node, +- integer_zero_node, tf_none); ++ guard = get_internal_target_expr (integer_zero_node); + add_stmt (guard); + guard = TARGET_EXPR_SLOT (guard); + for (unsigned i = 0; i < n_extra_cleanups; ++i) +diff --git a/gcc/cp/method.cc b/gcc/cp/method.cc +index 3914bbb1ef23..05c19cf0661e 100644 +--- a/gcc/cp/method.cc ++++ b/gcc/cp/method.cc +@@ -1597,7 +1597,7 @@ build_comparison_op (tree fndecl, bool defining, tsubst_flags_t complain) + /* Some other array, will need runtime loop. */ + else + { +- idx = force_target_expr (sizetype, maxval, complain); ++ idx = get_internal_target_expr (maxval); + loop_indexes = tree_cons (idx, NULL_TREE, loop_indexes); + } + expr_type = TREE_TYPE (expr_type); +diff --git a/gcc/cp/tree.cc b/gcc/cp/tree.cc +index 5628a576f01b..5863b6878f02 100644 +--- a/gcc/cp/tree.cc ++++ b/gcc/cp/tree.cc +@@ -982,8 +982,7 @@ tree + get_internal_target_expr (tree init) + { + init = convert_bitfield_to_declared_type (init); +- tree t = build_target_expr_with_type (init, TREE_TYPE (init), +- tf_warning_or_error); ++ tree t = force_target_expr (TREE_TYPE (init), init, tf_warning_or_error); + TARGET_EXPR_INTERNAL_P (t) = true; + return t; + } +diff --git a/gcc/cp/typeck.cc b/gcc/cp/typeck.cc +index a9c32ff930d5..bbaca960bd7c 100644 +--- a/gcc/cp/typeck.cc ++++ b/gcc/cp/typeck.cc +@@ -4219,16 +4219,14 @@ get_member_function_from_ptrfunc (tree *instance_ptrptr, tree function, + && !DECL_P (instance_ptr) + && !TREE_CONSTANT (instance_ptr))) + instance_ptr = instance_save_expr +- = force_target_expr (TREE_TYPE (instance_ptr), instance_ptr, +- complain); ++ = get_internal_target_expr (instance_ptr); + + /* See above comment. */ + if (TREE_SIDE_EFFECTS (function) + || (!nonvirtual + && !DECL_P (function) + && !TREE_CONSTANT (function))) +- function +- = force_target_expr (TREE_TYPE (function), function, complain); ++ function = get_internal_target_expr (function); + + /* Start by extracting all the information from the PMF itself. */ + e3 = pfn_from_ptrmemfunc (function); +diff --git a/gcc/testsuite/g++.dg/cpp0x/pr118923.C b/gcc/testsuite/g++.dg/cpp0x/pr118923.C +new file mode 100644 +index 000000000000..55d3052b61f3 +--- /dev/null ++++ b/gcc/testsuite/g++.dg/cpp0x/pr118923.C +@@ -0,0 +1,66 @@ ++// PR c++/118923 ++// { dg-do run { target c++11 } } ++// { dg-additional-options "-frange-for-ext-temps" { target c++23 } } ++// { dg-additional-options "-fno-range-for-ext-temps" { target c++20_down } } ++ ++int g; ++ ++struct A { ++ int a[3]; ++ A (int x, int y, int z) : a{x, y, z} { if ((g++ & 7) != 4) __builtin_abort (); } ++ A (const A &x) = delete; ++ ~A () { if ((g++ & 7) != 7 - 2 * (__cpp_range_based_for >= 202211)) __builtin_abort (); } ++ int *begin () { return a; } ++ int *end () { return a + 3; } ++}; ++ ++struct B { ++ B () { if ((g++ & 7) != 3) __builtin_abort (); } ++ B (const B &) = delete; ++ ~B () { if ((g++ & 7) != 5 + (__cpp_range_based_for >= 202211)) __builtin_abort (); } ++}; ++ ++struct C { ++ A foo (const B &) { return { 1, 2, 3 }; } ++ A bar (const B &) { return { 4, 5, 6 }; } ++ bool baz () { return b; } ++ bool b = false; ++ static C c; ++}; ++ ++C C::c; ++ ++struct D { ++ D () { if ((g++ & 5) != 0) __builtin_abort (); } ++ D (const D &) = delete; ++ ~D () { if ((g & 7) != 1 && (g & 7) != 6 + (__cpp_range_based_for >= 202211)) __builtin_abort (); g++; } ++}; ++ ++inline C * ++qux (const D &) ++{ ++ return &C::c; ++} ++ ++void ++foo () ++{ ++ int z = 1; ++ auto d = qux (D {})->baz () ? &C::bar : &C::foo; ++ for (const int &r : (qux (D {})->*d) (B {})) ++ if (z++ != r) ++ __builtin_abort (); ++ C::c.b = true; ++ d = qux (D {})->baz () ? &C::bar : &C::foo; ++ for (const int &r : (qux (D {})->*d) (B {})) ++ if (z++ != r) ++ __builtin_abort (); ++} ++ ++int ++main () ++{ ++ foo (); ++ if (g != 16) ++ __builtin_abort (); ++} +diff --git a/gcc/testsuite/g++.dg/cpp1y/pr118923.C b/gcc/testsuite/g++.dg/cpp1y/pr118923.C +new file mode 100644 +index 000000000000..b375f47a7d0f +--- /dev/null ++++ b/gcc/testsuite/g++.dg/cpp1y/pr118923.C +@@ -0,0 +1,38 @@ ++// PR c++/118923 ++// { dg-do run { target c++14 } } ++ ++struct A { ++ int a[3] = { 0, 0, 0 }; ++ int *begin () { return a; } ++ int *end () { return a + 3; } ++}; ++ ++struct B { ++ A foo () { return { 1, 2, 3 }; } ++ A bar () { return { 1, 2, 3 }; } ++ bool baz () { return b; } ++ bool b = false; ++ static B c; ++}; ++ ++B B::c; ++ ++inline B * ++qux () ++{ ++ return &B::c; ++} ++ ++void ++foo () ++{ ++ auto d = qux ()->baz () ? &B::foo : &B::bar; ++ for (const int &r : (qux ()->*d) ()) ++ ; ++} ++ ++int ++main () ++{ ++ foo (); ++} +-- +2.48.1 + diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-12.4.1_p20250227.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-12.4.1_p20250227.ebuild new file mode 100644 index 0000000000..2ea8273862 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-12.4.1_p20250227.ebuild @@ -0,0 +1,65 @@ +# 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="12.4.0" +PATCH_VER="2" +MUSL_VER="1" +MUSL_GCC_VER="12.4.0" +PYTHON_COMPAT=( python3_{10..12} ) + +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 ~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/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-13.3.1_p20250301.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-13.3.1_p20250301.ebuild new file mode 100644 index 0000000000..4ffc7cf0e2 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-13.3.1_p20250301.ebuild @@ -0,0 +1,66 @@ +# 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="13.3.0" +MUSL_GCC_VER="13.2.0" +PATCH_VER="2" +MUSL_VER="2" +PYTHON_COMPAT=( python3_{10..12} ) + +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 ~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 "${FILESDIR}"/${PN}-13-fix-cross-fixincludes.patch + eapply_user +} diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-14.2.1_p20250301.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-14.2.1_p20250301.ebuild new file mode 100644 index 0000000000..ec135f5bd0 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-14.2.1_p20250301.ebuild @@ -0,0 +1,54 @@ +# 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="14.2.0" +PATCH_VER="8" +MUSL_VER="1" +MUSL_GCC_VER="14.1.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=releases/gcc-$(ver_cut 1) +elif [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then + # m68k doesnt build (ICE, bug 932733) + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~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 "${FILESDIR}"/${PN}-13-fix-cross-fixincludes.patch + eapply_user +} diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-15.0.1_pre20250223-r1.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-15.0.1_pre20250223-r1.ebuild new file mode 100644 index 0000000000..a4f89c7910 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-15.0.1_pre20250223-r1.ebuild @@ -0,0 +1,53 @@ +# 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="46" +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 "${FILESDIR}"/${P}-c-Fix-range-for-with-PMFs-PR118923.patch + eapply_user +} diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-15.0.1_pre20250302.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-15.0.1_pre20250302.ebuild new file mode 100644 index 0000000000..729c8b2482 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-15.0.1_pre20250302.ebuild @@ -0,0 +1,52 @@ +# 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="46" +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 +}