From: Hemanth Kumar M D Date: Wed, 27 May 2026 13:35:07 +0000 (-0700) Subject: gcc: Upgrade GCC to 16.1 release X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=e4779ee254789749f4aaba8f7fa9abbfc181e326;p=thirdparty%2Fopenembedded%2Fopenembedded-core.git gcc: Upgrade GCC to 16.1 release Notable changes in GCC 16 include: - Improved C23/C++23 support and initial C++26 features - Enhanced diagnostics and static analyzer improvements - Optimizer and code generation enhancements - Target-specific updates for AArch64, RISC-V, x86, and others - Runtime library updates (libstdc++, libatomic, libgomp, libsanitizer) - Multiple bug fixes and performance improvements * Rebased existing OE-Core patches for GCC 16.1 and dropped patches merged upstream. For detailed info: https://gcc.gnu.org/gcc-16/changes.html Signed-off-by: Hemanth Kumar M D Signed-off-by: Richard Purdie --- diff --git a/meta/conf/distro/include/maintainers.inc b/meta/conf/distro/include/maintainers.inc index 24c5a9d712..fdfdec28b5 100644 --- a/meta/conf/distro/include/maintainers.inc +++ b/meta/conf/distro/include/maintainers.inc @@ -200,7 +200,7 @@ RECIPE_MAINTAINER:pn-gcc-cross-canadian-${TRANSLATED_TARGET_ARCH} = "Khem Raj -Date: Sun, 10 Aug 2025 20:28:00 +0800 -Subject: [PATCH] testsuite: i386: Fix gcc.target/i386/pr90579.c when PIE is - enabled [PR118885] - -When gcc build with --enable-deafult-pie the following tests -were getting failed: - FAIL: gcc.target/i386/pr90579.c scan-assembler vaddsd\tr\\+40 - FAIL: gcc.target/i386/pr90579.c scan-assembler vaddsd\tr\\+32 - FAIL: gcc.target/i386/pr90579.c scan-assembler vaddsd\tr\\+24 - FAIL: gcc.target/i386/pr90579.c scan-assembler vaddsd\tr\\+16 - - PR target/118885 - -gcc/testsuite/ChangeLog: - - * gcc.target/i386/pr90579.c: add -fno-pie to dg-options - to fix tests when PIE is enabled. - -Upstream-Status: Backport [https://gcc.gnu.org/cgit/gcc/commit/?id=679e24f5a751663998ff7202149a749e0f7251f9] - -Signed-off-by: Harish Sadineni ---- - gcc/testsuite/gcc.target/i386/pr90579.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/gcc/testsuite/gcc.target/i386/pr90579.c b/gcc/testsuite/gcc.target/i386/pr90579.c -index ab48a44063c..19081ec9fdf 100644 ---- a/gcc/testsuite/gcc.target/i386/pr90579.c -+++ b/gcc/testsuite/gcc.target/i386/pr90579.c -@@ -1,5 +1,5 @@ - /* { dg-do compile } */ --/* { dg-options "-O3 -mavx2 -mfpmath=sse" } */ -+/* { dg-options "-O3 -mavx2 -mfpmath=sse -fno-pie" } */ - - extern double r[6]; - extern double a[]; --- -2.49.0 diff --git a/meta/recipes-devtools/gcc/gcc/0027-gcc15-pr122394.patch b/meta/recipes-devtools/gcc/gcc/0027-gcc15-pr122394.patch deleted file mode 100644 index 9ee371cef7..0000000000 --- a/meta/recipes-devtools/gcc/gcc/0027-gcc15-pr122394.patch +++ /dev/null @@ -1,88 +0,0 @@ -From e55dcff97708a4937dc4d8736b8b3074ebbff6f3 Mon Sep 17 00:00:00 2001 -From: Jakub Jelinek -Date: Mon, 27 Oct 2025 17:43:17 +0100 -Subject: phiopt: Fix up DEBUG_EXPR_DECL creation in spaceship_replacement - [PR122394] - -The following testcase ICEs in gcc 15 (and is at least latent in 12-14 too), -because the DEBUG_EXPR_DECL has incorrect mode. It has -TREE_TYPE (orig_use_lhs) type, but TYPE_MODE (type) rather than -TYPE_MODE (TREE_TYPE (orig_use_lhs)) where the two types are sometimes -the same, but sometimes different (same if !has_cast_debug_uses, different -otherwise). - -Though, there wouldn't be the this issue if it used the proper API to create -the DEBUG_EXPR_DECL which takes care of everything. This is the sole -spot that doesn't use that API. - -Doesn't affect the trunk because the code has been removed and replaced with -different stuff after the libstdc++ ABI change in r16-3474. -Before r15-5557 the mode has been always wrong because this was done only -for has_cast_debug_uses. And the bug has been introduced with r12-5490. - -Enough archeology, while it could be fixed by changing the second -SET_DECL_MODE argument, I think it is better to use build_debug_expr_decl. - -2025-10-27 Jakub Jelinek - - PR tree-optimization/122394 - * tree-ssa-phiopt.cc (spaceship_replacement): Use - build_debug_expr_decl instead of manually building DEBUG_EXPR_DECL - and getting SET_DECL_MODE wrong. - - * g++.dg/opt/pr122394.C: New test. - -Upstream-Status: Backport [https://gcc.gnu.org/cgit/gcc/commit/?id=e55dcff97708a4937dc4d8736b8b3074ebbff6f3] -Signed-off-by: Hongxu Jia ---- - gcc/testsuite/g++.dg/opt/pr122394.C | 20 ++++++++++++++++++++ - gcc/tree-ssa-phiopt.cc | 6 ++---- - 2 files changed, 22 insertions(+), 4 deletions(-) - create mode 100644 gcc/testsuite/g++.dg/opt/pr122394.C - -diff --git a/gcc/testsuite/g++.dg/opt/pr122394.C b/gcc/testsuite/g++.dg/opt/pr122394.C -new file mode 100644 -index 000000000000..1f84bebd74c2 ---- /dev/null -+++ b/gcc/testsuite/g++.dg/opt/pr122394.C -@@ -0,0 +1,20 @@ -+// PR tree-optimization/122394 -+// { dg-do compile { target c++23 } } -+// { dg-options "-O1 -g" } -+ -+#include -+ -+struct A { -+ friend auto operator<=> (A, A) = default; -+ double a; -+}; -+void foo (); -+A b, c; -+ -+void -+bar () -+{ -+ bool d = c >= b; -+ if (d) -+ foo (); -+} -diff --git a/gcc/tree-ssa-phiopt.cc b/gcc/tree-ssa-phiopt.cc -index aaebae6b38c0..3e0ad9d3bb09 100644 ---- a/gcc/tree-ssa-phiopt.cc -+++ b/gcc/tree-ssa-phiopt.cc -@@ -2995,10 +2995,8 @@ spaceship_replacement (basic_block cond_bb, basic_block middle_bb, - if (has_cast_debug_uses - || (HONOR_NANS (TREE_TYPE (lhs1)) && !is_cast)) - { -- tree temp3 = make_node (DEBUG_EXPR_DECL); -- DECL_ARTIFICIAL (temp3) = 1; -- TREE_TYPE (temp3) = TREE_TYPE (orig_use_lhs); -- SET_DECL_MODE (temp3, TYPE_MODE (type)); -+ tree temp3 -+ = build_debug_expr_decl (TREE_TYPE (orig_use_lhs)); - if (has_cast_debug_uses) - t = fold_convert (TREE_TYPE (temp3), temp2); - else --- -cgit - diff --git a/meta/recipes-devtools/gcc/gcc/0028-fix-gcc-libitm-false-postives-01.patch b/meta/recipes-devtools/gcc/gcc/0028-fix-gcc-libitm-false-postives-01.patch deleted file mode 100644 index d8ed99adb5..0000000000 --- a/meta/recipes-devtools/gcc/gcc/0028-fix-gcc-libitm-false-postives-01.patch +++ /dev/null @@ -1,187 +0,0 @@ -From b129ff0880c6d10e0379b46889d01255ee8d1f82 Mon Sep 17 00:00:00 2001 -From: Pietro Monteiro -Date: Fri, 30 Jan 2026 20:22:49 -0500 -Subject: libitm: testsuite: don't include libstdc++ paths in test names - [PR69018] - -Libitm C++ tests pass -B/full/path/to/build/libstc++/src/.libs on the -options argument to dg-runtest and the libstdc++ include paths as -the default-extra-options. This causes 2 problems: - -1) If a test uses `dg-options' then the libstdc++ include paths are -not passed to the compiler. - -2) The `-B/full/path/to/build/libstc++/src/.libs' gets added to the -test name. This makes comparing build done in different directories -harder because the hardcoded full path. - -Stop passing options and default-extra-options to dg-runtest and move -dealing with the path-releated flags to libitm_target_compile in -libitm.exp, where they are added to additional_flags. - -Also change the FSF address to the website in the license text. - -libitm/ChangeLog: - PR libitm/69018 - * testsuite/lib/libitm.exp (libitm_target_compile): Add - lang_include_flags and `-B${blddir}/${lang_library_paths}' to - additional_flags. - * testsuite/libitm.c++/c++.exp: Set lang_library_paths and lang_include_flags. - -Upstream-Status: Backport [https://gcc.gnu.org/cgit/gcc/patch/?id=b129ff0880c6d10e0379b46889d01255ee8d1f82] - -Signed-off-by: Pietro Monteiro -Signed-off-by: Harish Sadineni ---- - libitm/testsuite/lib/libitm.exp | 25 ++++++++++---- - libitm/testsuite/libitm.c++/c++.exp | 67 +++++++++++++++++-------------------- - 2 files changed, 48 insertions(+), 44 deletions(-) - -diff --git a/libitm/testsuite/lib/libitm.exp b/libitm/testsuite/lib/libitm.exp -index 0b3301537cee..69a49906d338 100644 ---- a/libitm/testsuite/lib/libitm.exp -+++ b/libitm/testsuite/lib/libitm.exp -@@ -9,8 +9,7 @@ - # GNU General Public License for more details. - # - # You should have received a copy of the GNU General Public License --# along with this program; if not, write to the Free Software --# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -+# along with this program; if not, see . - - # Damn dejagnu for not having proper library search paths for load_lib. - # We have to explicitly load everything that gcc-dg.exp wants to load. -@@ -193,14 +192,24 @@ proc libitm_target_compile { source dest type options } { - global gluefile wrap_flags - global ALWAYS_CFLAGS - global GCC_UNDER_TEST -- global lang_test_file -- global lang_library_path -+ global lang_library_paths - global lang_link_flags -+ global lang_include_flags - -- if { [info exists lang_test_file] } { -- if { $blddir != "" } { -+ if { [info exists lang_include_flags] } { -+ lappend options "additional_flags=${lang_include_flags}" -+ } -+ -+ if { [info exists lang_library_paths] } { -+ foreach lang_library_path $lang_library_paths { -+ # targets that use lib[...].a%s in their specs need a -B option -+ # for uninstalled testing. -+ lappend options "additional_flags=-B${blddir}/${lang_library_path}" - lappend options "ldflags=-L${blddir}/${lang_library_path}" - } -+ } -+ -+ if { [info exists lang_link_flags] } { - lappend options "ldflags=${lang_link_flags}" - } - -@@ -219,7 +228,9 @@ proc libitm_target_compile { source dest type options } { - set options [concat "$ALWAYS_CFLAGS" $options] - } - -- set options [dg-additional-files-options $options $source $dest $type] -+ if { $source != "" } { -+ set options [dg-additional-files-options $options $source $dest $type] -+ } - - set result [target_compile $source $dest $type $options] - -diff --git a/libitm/testsuite/libitm.c++/c++.exp b/libitm/testsuite/libitm.c++/c++.exp -index a1ce7ce4062e..90f3058e7249 100644 ---- a/libitm/testsuite/libitm.c++/c++.exp -+++ b/libitm/testsuite/libitm.c++/c++.exp -@@ -11,8 +11,7 @@ - # GNU General Public License for more details. - # - # You should have received a copy of the GNU General Public License --# along with this program; if not, write to the Free Software --# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -+# along with this program; if not, see . - - load_lib libitm-dg.exp - load_gcc_lib gcc-dg.exp -@@ -33,48 +32,42 @@ set blddir [lookfor_file [get_multilibs] libitm] - - - if { $blddir != "" } { -- # Look for a static libstdc++ first. -- if [file exists "${blddir}/${lang_library_path}/libstdc++.a"] { -- set lang_test_file "${lang_library_path}/libstdc++.a" -- set lang_test_file_found 1 -- # We may have a shared only build, so look for a shared libstdc++. -- } elseif [file exists "${blddir}/${lang_library_path}/libstdc++.${shlib_ext}"] { -- set lang_test_file "${lang_library_path}/libstdc++.${shlib_ext}" -- set lang_test_file_found 1 -- } else { -- puts "No libstdc++ library found, will not execute c++ tests" -+ if { ![file exists "${blddir}/${lang_library_path}/libstdc++.a"] -+ && ![file exists "${blddir}/${lang_library_path}/libstdc++.${shlib_ext}"] } { -+ verbose -log "No libstdc++ library found, will not execute c++ tests" -+ unset lang_library_path -+ return - } --} elseif { [info exists GXX_UNDER_TEST] } { -- set lang_test_file_found 1 -- # Needs to exist for libitm.exp. -- set lang_test_file "" -+ lappend lang_library_paths ${lang_library_path} -+} elseif { ![info exists GXX_UNDER_TEST] } { -+ verbose -log "GXX_UNDER_TEST not defined, will not execute c++ tests" -+ return -+} -+ -+# Gather a list of all tests. -+set tests [lsort [glob -nocomplain $srcdir/$subdir/*.C]] -+ -+if { $blddir != "" } { -+ set ld_library_path "$always_ld_library_path:${blddir}/${lang_library_path}" - } else { -- puts "GXX_UNDER_TEST not defined, will not execute c++ tests" -+ set ld_library_path "$always_ld_library_path" - } - --if { $lang_test_file_found } { -- # Gather a list of all tests. -- set tests [lsort [glob -nocomplain $srcdir/$subdir/*.C]] -+append ld_library_path [gcc-set-multilib-library-path $GCC_UNDER_TEST] -+set_ld_library_path_env_vars - -- set stdcxxadder "" -- if { $blddir != "" } { -- set ld_library_path "$always_ld_library_path:${blddir}/${lang_library_path}" -- set stdcxxadder "-B ${blddir}/${lang_library_path}" -- } else { -- set ld_library_path "$always_ld_library_path" -- } -- append ld_library_path [gcc-set-multilib-library-path $GCC_UNDER_TEST] -- set_ld_library_path_env_vars -+set flags_file "${blddir}/../libstdc++-v3/scripts/testsuite_flags" -+if { [file exists $flags_file] } { -+ set lang_include_flags [exec sh $flags_file --build-includes] -+} - -- set flags_file "${blddir}/../libstdc++-v3/scripts/testsuite_flags" -- if { [file exists $flags_file] } { -- set libstdcxx_includes [exec sh $flags_file --build-includes] -- } else { -- set libstdcxx_includes "" -- } -+# Main loop. -+dg-runtest $tests "" "" - -- # Main loop. -- dg-runtest $tests $stdcxxadder $libstdcxx_includes -+if { $blddir != "" } { -+ unset lang_include_flags -+ unset lang_library_path -+ unset lang_library_paths - } - - # All done. --- -cgit diff --git a/meta/recipes-devtools/gcc/gcc/0028-fix-gcc-libitm-false-postives-02.patch b/meta/recipes-devtools/gcc/gcc/0028-fix-gcc-libitm-false-postives-02.patch deleted file mode 100644 index 67ed47ff51..0000000000 --- a/meta/recipes-devtools/gcc/gcc/0028-fix-gcc-libitm-false-postives-02.patch +++ /dev/null @@ -1,220 +0,0 @@ -From 66ce317036f2eb5aeb96d5e4b9e468799d7566b6 Mon Sep 17 00:00:00 2001 -From: Pietro Monteiro -Date: Wed, 11 Feb 2026 11:55:13 -0500 -Subject: libitm: Fix recent libitm testsuite regression [PR69018] -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -The commit r16-7202-gb129ff0880c6d1 broke running libitm’s testsuite -using combinations of options because it didn’t clean up all the -global variables set in c++.exp. Fix the regression by using g++ for -the C++ tests and cleaning up the variables shared between C and C++ -tests. - -libitm/ChangeLog: - PR libitm/69018 - * testsuite/lib/libitm.exp (libitm_init): Check - GXX_UNDER_TEST. Add "${blddir}/.libs" to - always_ld_library_path if blddir is not empty. Use - "-fdiagnostics-plain-output". Don't set compiler to GCC_UNDER_TEST. - * testsuite/libitm.c++/c++.exp: If $blddir is not empty set - libstdc++_library_path, shlib_ext, lang_include_flags, add - "${blddir}/${lang_library_paths}" to ld_library_path. - Unset libstdc++_library_path and shlib_ext if we skip C++ - tests and at the end of the test run. - * testsuite/libitm.c/c.exp: Update the FSF address to the - website in the license text. Unset lang_library_paths and - lang_include_flags. Set the compiler to $GCC_UNDER_TEST. - -Upstream-Status: Backport [https://gcc.gnu.org/cgit/gcc/patch/?id=66ce317036f2eb5aeb96d5e4b9e468799d7566b6] - -Co-authored-by: Jakub Jelinek -Signed-off-by: Pietro Monteiro -Signed-off-by: Harish Sadineni ---- - libitm/testsuite/lib/libitm.exp | 21 +++++++++++++++---- - libitm/testsuite/libitm.c++/c++.exp | 42 ++++++++++++++----------------------- - libitm/testsuite/libitm.c/c.exp | 14 ++++++------- - 3 files changed, 40 insertions(+), 37 deletions(-) - -diff --git a/libitm/testsuite/lib/libitm.exp b/libitm/testsuite/lib/libitm.exp -index 69a49906d338..2de0f6cbf158 100644 ---- a/libitm/testsuite/lib/libitm.exp -+++ b/libitm/testsuite/lib/libitm.exp -@@ -79,7 +79,7 @@ proc libitm_init { args } { - global ALWAYS_CFLAGS - global CFLAGS - global TOOL_EXECUTABLE TOOL_OPTIONS -- global GCC_UNDER_TEST -+ global GCC_UNDER_TEST GXX_UNDER_TEST - global TESTING_IN_BUILD_TREE - global target_triplet - global always_ld_library_path -@@ -97,6 +97,17 @@ proc libitm_init { args } { - } else { - set GCC_UNDER_TEST "[find_gcc]" - } -+ # Only if we're guessing 'GCC_UNDER_TEST', we're also going to guess -+ # 'GXX_UNDER_TEST' -+ if ![info exists GXX_UNDER_TEST] then { -+ if [info exists TOOL_EXECUTABLE] { -+ set GXX_UNDER_TEST $TOOL_EXECUTABLE -+ } else { -+ set GXX_UNDER_TEST "[find_g++]" -+ } -+ } else { -+ error "GXX_UNDER_TEST set but not GCC_UNDER_TEST" -+ } - } - - if ![info exists tmpdir] { -@@ -119,7 +130,7 @@ proc libitm_init { args } { - } - - # Compute what needs to be put into LD_LIBRARY_PATH -- set always_ld_library_path ".:${blddir}/.libs" -+ set always_ld_library_path "." - - # Compute what needs to be added to the existing LD_LIBRARY_PATH. - if {$gccdir != ""} { -@@ -150,6 +161,8 @@ proc libitm_init { args } { - lappend ALWAYS_CFLAGS "additional_flags=-B${blddir}/" - lappend ALWAYS_CFLAGS "additional_flags=-I${blddir}" - lappend ALWAYS_CFLAGS "ldflags=-L${blddir}/.libs" -+ -+ append always_ld_library_path ":${blddir}/.libs" - } - lappend ALWAYS_CFLAGS "additional_flags=-I${srcdir}/.." - -@@ -179,7 +192,8 @@ proc libitm_init { args } { - # Turn on transactional memory support. - lappend ALWAYS_CFLAGS "additional_flags=-fgnu-tm" - -- lappend ALWAYS_CFLAGS "additional_flags=-fdiagnostics-color=never" -+ # Disable caret, color, URL diagnostics -+ lappend ALWAYS_CFLAGS "additional_flags=-fdiagnostics-plain-output" - } - - # -@@ -220,7 +234,6 @@ proc libitm_target_compile { source dest type options } { - - lappend options "additional_flags=[libio_include_flags]" - lappend options "timeout=[timeout_value]" -- lappend options "compiler=$GCC_UNDER_TEST" - - set options [concat $libitm_compile_options $options] - -diff --git a/libitm/testsuite/libitm.c++/c++.exp b/libitm/testsuite/libitm.c++/c++.exp -index 90f3058e7249..c24dc830bcc5 100644 ---- a/libitm/testsuite/libitm.c++/c++.exp -+++ b/libitm/testsuite/libitm.c++/c++.exp -@@ -16,39 +16,33 @@ - load_lib libitm-dg.exp - load_gcc_lib gcc-dg.exp - --global shlib_ext -- --set shlib_ext [get_shlib_extension] --# The C++ tests should be linked with g++, which defaults to -shared-libgcc. --# Doing that is currently too intrusive, so hardcode here. --set lang_link_flags "-shared-libgcc -lstdc++" --set lang_test_file_found 0 --set lang_library_path "../libstdc++-v3/src/.libs" -- --# Initialize dg. --dg-init -- --set blddir [lookfor_file [get_multilibs] libitm] -- -- - if { $blddir != "" } { -- if { ![file exists "${blddir}/${lang_library_path}/libstdc++.a"] -- && ![file exists "${blddir}/${lang_library_path}/libstdc++.${shlib_ext}"] } { -+ set libstdc++_library_path "../libstdc++-v3/src/.libs" -+ set shlib_ext [get_shlib_extension] -+ if { ![file exists "${blddir}/${libstdc++_library_path}/libstdc++.a"] -+ && ![file exists "${blddir}/${libstdc++_library_path}/libstdc++.${shlib_ext}"] } { - verbose -log "No libstdc++ library found, will not execute c++ tests" -- unset lang_library_path -+ unset libstdc++_library_path -+ unset shlib_ext - return - } -- lappend lang_library_paths ${lang_library_path} -+ lappend lang_library_paths ${libstdc++_library_path} - } elseif { ![info exists GXX_UNDER_TEST] } { - verbose -log "GXX_UNDER_TEST not defined, will not execute c++ tests" - return - } - -+lappend ALWAYS_CFLAGS "compiler=$GXX_UNDER_TEST" -+ -+# Initialize dg. -+dg-init -+ - # Gather a list of all tests. - set tests [lsort [glob -nocomplain $srcdir/$subdir/*.C]] - - if { $blddir != "" } { -- set ld_library_path "$always_ld_library_path:${blddir}/${lang_library_path}" -+ set lang_include_flags [exec sh ${blddir}/../libstdc++-v3/scripts/testsuite_flags --build-includes] -+ set ld_library_path "$always_ld_library_path:${blddir}/${lang_library_paths}" - } else { - set ld_library_path "$always_ld_library_path" - } -@@ -56,18 +50,14 @@ if { $blddir != "" } { - append ld_library_path [gcc-set-multilib-library-path $GCC_UNDER_TEST] - set_ld_library_path_env_vars - --set flags_file "${blddir}/../libstdc++-v3/scripts/testsuite_flags" --if { [file exists $flags_file] } { -- set lang_include_flags [exec sh $flags_file --build-includes] --} -- - # Main loop. - dg-runtest $tests "" "" - - if { $blddir != "" } { - unset lang_include_flags -- unset lang_library_path -+ unset libstdc++_library_path - unset lang_library_paths -+ unset shlib_ext - } - - # All done. -diff --git a/libitm/testsuite/libitm.c/c.exp b/libitm/testsuite/libitm.c/c.exp -index daa71427d64c..7a697b870932 100644 ---- a/libitm/testsuite/libitm.c/c.exp -+++ b/libitm/testsuite/libitm.c/c.exp -@@ -9,20 +9,20 @@ - # GNU General Public License for more details. - # - # You should have received a copy of the GNU General Public License --# along with this program; if not, write to the Free Software --# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -+# along with this program; if not, see . - --if [info exists lang_library_path] then { -- unset lang_library_path -- unset lang_link_flags -+if [info exists lang_library_paths] then { -+ unset lang_library_paths - } --if [info exists lang_test_file] then { -- unset lang_test_file -+if [info exists lang_include_flags] then { -+ unset lang_include_flags - } - - load_lib libitm-dg.exp - load_gcc_lib gcc-dg.exp - -+lappend ALWAYS_CFLAGS "compiler=$GCC_UNDER_TEST" -+ - # If a testcase doesn't have special options, use these. - if ![info exists DEFAULT_CFLAGS] then { - set DEFAULT_CFLAGS "-O2" --- -cgit diff --git a/meta/recipes-devtools/gcc/gcc/0028-libcody-Make-it-buildable-by-C-11-to-C-26.patch b/meta/recipes-devtools/gcc/gcc/0028-libcody-Make-it-buildable-by-C-11-to-C-26.patch deleted file mode 100644 index 431facb011..0000000000 --- a/meta/recipes-devtools/gcc/gcc/0028-libcody-Make-it-buildable-by-C-11-to-C-26.patch +++ /dev/null @@ -1,257 +0,0 @@ -From 0ffe3c9af4e5d5468df742512b6e930fe7039230 Mon Sep 17 00:00:00 2001 -From: Jakub Jelinek -Date: Fri, 21 Nov 2025 16:25:58 +0100 -Subject: [PATCH] libcody: Make it buildable by C++11 to C++26 - -The following builds with -std=c++11 and c++14 and c++17 and c++20 and c++23 -and c++26. - -I see the u8 string literals are mixed e.g. with strerror, so in --fexec-charset=IBM1047 there will still be garbage, so am not 100% sure if -the u8 literals everywhere are worth it either. - -2025-11-21 Jakub Jelinek - - * cody.hh (S2C): For __cpp_char8_t >= 201811 use char8_t instead of - char in argument type. - (MessageBuffer::Space): Revert 2025-11-15 change. - (MessageBuffer::Append): For __cpp_char8_t >= 201811 add overload - with char8_t const * type of first argument. - (Packet::Packet): Similarly for first argument. - * client.cc (CommunicationError, Client::ProcessResponse, - Client::Connect, ConnectResponse, PathnameResponse, OKResponse, - IncludeTranslateResponse): Cast u8 string literals to (const char *) - where needed. - * server.cc (Server::ProcessRequests, ConnectRequest): Likewise. - -Signed-off-by: Martin Jansa -Upstream-Status: Backport [07a767c7a50d1daae8ef7d4aba73fe53ad40c0b7] ---- - libcody/client.cc | 36 +++++++++++++++++++----------------- - libcody/cody.hh | 22 ++++++++++++++++++++++ - libcody/server.cc | 28 ++++++++++++++-------------- - 3 files changed, 55 insertions(+), 31 deletions(-) - -diff --git a/libcody/client.cc b/libcody/client.cc -index ae69d190cb77..147fecdbe500 100644 ---- a/libcody/client.cc -+++ b/libcody/client.cc -@@ -97,7 +97,7 @@ int Client::CommunicateWithServer () - - static Packet CommunicationError (int err) - { -- std::string e {u8"communication error:"}; -+ std::string e {(const char *) u8"communication error:"}; - e.append (strerror (err)); - - return Packet (Client::PC_ERROR, std::move (e)); -@@ -110,33 +110,34 @@ Packet Client::ProcessResponse (std::vector &words, - { - if (e == EINVAL) - { -- std::string msg (u8"malformed string '"); -+ std::string msg ((const char *) u8"malformed string '"); - msg.append (words[0]); -- msg.append (u8"'"); -+ msg.append ((const char *) u8"'"); - return Packet (Client::PC_ERROR, std::move (msg)); - } - else -- return Packet (Client::PC_ERROR, u8"missing response"); -+ return Packet (Client::PC_ERROR, (const char *) u8"missing response"); - } - - Assert (!words.empty ()); -- if (words[0] == u8"ERROR") -+ if (words[0] == (const char *) u8"ERROR") - return Packet (Client::PC_ERROR, -- words.size () == 2 ? words[1]: u8"malformed error response"); -+ words.size () == 2 ? words[1] -+ : (const char *) u8"malformed error response"); - - if (isLast && !read.IsAtEnd ()) - return Packet (Client::PC_ERROR, -- std::string (u8"unexpected extra response")); -+ std::string ((const char *) u8"unexpected extra response")); - - Assert (code < Detail::RC_HWM); - Packet result (responseTable[code] (words)); - result.SetRequest (code); - if (result.GetCode () == Client::PC_ERROR && result.GetString ().empty ()) - { -- std::string msg {u8"malformed response '"}; -+ std::string msg {(const char *) u8"malformed response '"}; - - read.LexedLine (msg); -- msg.append (u8"'"); -+ msg.append ((const char *) u8"'"); - result.GetString () = std::move (msg); - } - else if (result.GetCode () == Client::PC_CONNECT) -@@ -199,7 +200,7 @@ Packet Client::Connect (char const *agent, char const *ident, - size_t alen, size_t ilen) - { - write.BeginLine (); -- write.AppendWord (u8"HELLO"); -+ write.AppendWord ((const char *) u8"HELLO"); - write.AppendInteger (Version); - write.AppendWord (agent, true, alen); - write.AppendWord (ident, true, ilen); -@@ -211,7 +212,8 @@ Packet Client::Connect (char const *agent, char const *ident, - // HELLO $version $agent [$flags] - Packet ConnectResponse (std::vector &words) - { -- if (words[0] == u8"HELLO" && (words.size () == 3 || words.size () == 4)) -+ if (words[0] == (const char *) u8"HELLO" -+ && (words.size () == 3 || words.size () == 4)) - { - char *eptr; - unsigned long val = strtoul (words[1].c_str (), &eptr, 10); -@@ -247,7 +249,7 @@ Packet Client::ModuleRepo () - // PATHNAME $dir | ERROR - Packet PathnameResponse (std::vector &words) - { -- if (words[0] == u8"PATHNAME" && words.size () == 2) -+ if (words[0] == (const char *) u8"PATHNAME" && words.size () == 2) - return Packet (Client::PC_PATHNAME, std::move (words[1])); - - return Packet (Client::PC_ERROR, u8""); -@@ -256,7 +258,7 @@ Packet PathnameResponse (std::vector &words) - // OK or ERROR - Packet OKResponse (std::vector &words) - { -- if (words[0] == u8"OK") -+ if (words[0] == (const char *) u8"OK") - return Packet (Client::PC_OK); - else - return Packet (Client::PC_ERROR, -@@ -319,11 +321,11 @@ Packet Client::IncludeTranslate (char const *include, Flags flags, size_t ilen) - // PATHNAME $cmifile - Packet IncludeTranslateResponse (std::vector &words) - { -- if (words[0] == u8"BOOL" && words.size () == 2) -+ if (words[0] == (const char *) u8"BOOL" && words.size () == 2) - { -- if (words[1] == u8"FALSE") -- return Packet (Client::PC_BOOL, 0); -- else if (words[1] == u8"TRUE") -+ if (words[1] == (const char *) u8"FALSE") -+ return Packet (Client::PC_BOOL); -+ else if (words[1] == (const char *) u8"TRUE") - return Packet (Client::PC_BOOL, 1); - else - return Packet (Client::PC_ERROR, u8""); -diff --git a/libcody/cody.hh b/libcody/cody.hh -index 789ce9e70b75..93bce93aa94d 100644 ---- a/libcody/cody.hh -+++ b/libcody/cody.hh -@@ -47,12 +47,21 @@ namespace Detail { - - // C++11 doesn't have utf8 character literals :( - -+#if __cpp_char8_t >= 201811 -+template -+constexpr char S2C (char8_t const (&s)[I]) -+{ -+ static_assert (I == 2, "only single octet strings may be converted"); -+ return s[0]; -+} -+#else - template - constexpr char S2C (char const (&s)[I]) - { - static_assert (I == 2, "only single octet strings may be converted"); - return s[0]; - } -+#endif - - /// Internal buffering class. Used to concatenate outgoing messages - /// and Lex incoming ones. -@@ -123,6 +132,13 @@ public: - Space (); - Append (str, maybe_quote, len); - } -+#if __cpp_char8_t >= 201811 -+ void AppendWord (char8_t const *str, bool maybe_quote = false, -+ size_t len = ~size_t (0)) -+ { -+ AppendWord ((const char *) str, maybe_quote, len); -+ } -+#endif - /// Add a word as with AppendWord - /// @param str the string to append - /// @param maybe_quote string might need quoting, as for Append -@@ -264,6 +280,12 @@ public: - : string (s), cat (STRING), code (c) - { - } -+#if __cpp_char8_t >= 201811 -+ Packet (unsigned c, const char8_t *s) -+ : string ((const char *) s), cat (STRING), code (c) -+ { -+ } -+#endif - Packet (unsigned c, std::vector &&v) - : vector (std::move (v)), cat (VECTOR), code (c) - { -diff --git a/libcody/server.cc b/libcody/server.cc -index e2fa069bb933..c18469fae843 100644 ---- a/libcody/server.cc -+++ b/libcody/server.cc -@@ -36,12 +36,12 @@ static RequestPair - const requestTable[Detail::RC_HWM] = - { - // Same order as enum RequestCode -- RequestPair {u8"HELLO", nullptr}, -- RequestPair {u8"MODULE-REPO", ModuleRepoRequest}, -- RequestPair {u8"MODULE-EXPORT", ModuleExportRequest}, -- RequestPair {u8"MODULE-IMPORT", ModuleImportRequest}, -- RequestPair {u8"MODULE-COMPILED", ModuleCompiledRequest}, -- RequestPair {u8"INCLUDE-TRANSLATE", IncludeTranslateRequest}, -+ RequestPair {(const char *) u8"HELLO", nullptr}, -+ RequestPair {(const char *) u8"MODULE-REPO", ModuleRepoRequest}, -+ RequestPair {(const char *) u8"MODULE-EXPORT", ModuleExportRequest}, -+ RequestPair {(const char *) u8"MODULE-IMPORT", ModuleImportRequest}, -+ RequestPair {(const char *) u8"MODULE-COMPILED", ModuleCompiledRequest}, -+ RequestPair {(const char *) u8"INCLUDE-TRANSLATE", IncludeTranslateRequest}, - }; - } - -@@ -135,21 +135,21 @@ void Server::ProcessRequests (void) - std::string msg; - - if (err > 0) -- msg = u8"error processing '"; -+ msg = (const char *) u8"error processing '"; - else if (ix >= Detail::RC_HWM) -- msg = u8"unrecognized '"; -+ msg = (const char *) u8"unrecognized '"; - else if (IsConnected () && ix == Detail::RC_CONNECT) -- msg = u8"already connected '"; -+ msg = (const char *) u8"already connected '"; - else if (!IsConnected () && ix != Detail::RC_CONNECT) -- msg = u8"not connected '"; -+ msg = (const char *) u8"not connected '"; - else -- msg = u8"malformed '"; -+ msg = (const char *) u8"malformed '"; - - read.LexedLine (msg); -- msg.append (u8"'"); -+ msg.append ((const char *) u8"'"); - if (err > 0) - { -- msg.append (u8" "); -+ msg.append ((const char *) u8" "); - msg.append (strerror (err)); - } - resolver->ErrorResponse (this, std::move (msg)); -@@ -176,7 +176,7 @@ Resolver *ConnectRequest (Server *s, Resolver *r, - return nullptr; - - if (words.size () == 3) -- words.emplace_back (u8""); -+ words.emplace_back ((const char *) u8""); - unsigned version = ParseUnsigned (words[1]); - if (version == ~0u) - return nullptr; diff --git a/meta/recipes-devtools/gcc/gcc_15.2.bb b/meta/recipes-devtools/gcc/gcc_16.1.bb similarity index 100% rename from meta/recipes-devtools/gcc/gcc_15.2.bb rename to meta/recipes-devtools/gcc/gcc_16.1.bb diff --git a/meta/recipes-devtools/gcc/libgcc-initial_15.2.bb b/meta/recipes-devtools/gcc/libgcc-initial_16.1.bb similarity index 100% rename from meta/recipes-devtools/gcc/libgcc-initial_15.2.bb rename to meta/recipes-devtools/gcc/libgcc-initial_16.1.bb diff --git a/meta/recipes-devtools/gcc/libgcc_15.2.bb b/meta/recipes-devtools/gcc/libgcc_16.1.bb similarity index 100% rename from meta/recipes-devtools/gcc/libgcc_15.2.bb rename to meta/recipes-devtools/gcc/libgcc_16.1.bb diff --git a/meta/recipes-devtools/gcc/libgfortran_15.2.bb b/meta/recipes-devtools/gcc/libgfortran_16.1.bb similarity index 100% rename from meta/recipes-devtools/gcc/libgfortran_15.2.bb rename to meta/recipes-devtools/gcc/libgfortran_16.1.bb