gcc: Upgrade GCC to 16.1 release
cover gcc: Upgrade GCC to 16.1 release
From: Hemanth Kumar M D <[email protected]>
This patch series upgrades GCC to 16.1 and includes the required runtime and compatibility fixes identified during testing in OE-Core.
The series also includes fixes for packages failing to build with GCC 16, updates for libatomic runtime handling, and packaging changes for newly generated libatomic_asneeded files.
Summary of patches:
- Patch 01: Backport piglit fix for building with GCC 16.
- Patch 02: Backport rxvt-unicode fix for building with GCC 16.
- Patch 03: Disable automatic libatomic linking in glibc.
- Patch 04: Upgrade GCC to 16.1 release.
- Patch 05: Disable automatic libatomic linking during gcc-runtime build.
- Patch 06: Package new libatomic_asneeded runtime files.
- Patch 07: Avoid passing MULTIBUILDTOP to libatomic in OE builds.
meta/conf/distro/include/maintainers.inc | 2 +-
meta/conf/distro/include/tcmode-default.inc | 2 +-
meta/recipes-core/glibc/glibc.inc | 3 +
.../gcc/{gcc-15.2.inc => gcc-16.1.inc} | 17 ++--
...ian_15.2.bb => gcc-cross-canadian_16.1.bb} | 0
.../{gcc-cross_15.2.bb => gcc-cross_16.1.bb} | 0
...-crosssdk_15.2.bb => gcc-crosssdk_16.1.bb} | 0
meta/recipes-devtools/gcc/gcc-runtime.inc | 18 ++++-
...cc-runtime_15.2.bb => gcc-runtime_16.1.bb} | 0
...itizers_15.2.bb => gcc-sanitizers_16.1.bb} | 0
...{gcc-source_15.2.bb => gcc-source_16.1.bb} | 0
...AMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch | 2 +-
...sroot-gcc-version-specific-dirs-with.patch | 4 +-
...omic-Do-not-enforce-march-on-aarch64.patch | 18 ++---
...025-gcc-testsuite-tweaks-for-mips-OE.patch | 78 +++++++++++--------
.../gcc/{gcc_15.2.bb => gcc_16.1.bb} | 0
...initial_15.2.bb => libgcc-initial_16.1.bb} | 0
.../gcc/{libgcc_15.2.bb => libgcc_16.1.bb} | 0
...ibgfortran_15.2.bb => libgfortran_16.1.bb} | 0
...h-rename-local-lerp-to-linear_interp.patch | 46 +++++++++++
meta/recipes-graphics/piglit/piglit_git.bb | 1 +
.../rxvt-unicode/rxvt-unicode.inc | 3 +-
.../0001-rxvt-unicode-fix-gcc16-c-20.patch | 61 +++++++++++++++
23 files changed, 194 insertions(+), 61 deletions(-)
rename meta/recipes-devtools/gcc/{gcc-15.2.inc => gcc-16.1.inc} (88%)
rename meta/recipes-devtools/gcc/{gcc-cross-canadian_15.2.bb => gcc-cross-canadian_16.1.bb} (100%)
rename meta/recipes-devtools/gcc/{gcc-cross_15.2.bb => gcc-cross_16.1.bb} (100%)
rename meta/recipes-devtools/gcc/{gcc-crosssdk_15.2.bb => gcc-crosssdk_16.1.bb} (100%)
rename meta/recipes-devtools/gcc/{gcc-runtime_15.2.bb => gcc-runtime_16.1.bb} (100%)
rename meta/recipes-devtools/gcc/{gcc-sanitizers_15.2.bb => gcc-sanitizers_16.1.bb} (100%)
rename meta/recipes-devtools/gcc/{gcc-source_15.2.bb => gcc-source_16.1.bb} (100%)
rename meta/recipes-devtools/gcc/{gcc_15.2.bb => gcc_16.1.bb} (100%)
rename meta/recipes-devtools/gcc/{libgcc-initial_15.2.bb => libgcc-initial_16.1.bb} (100%)
rename meta/recipes-devtools/gcc/{libgcc_15.2.bb => libgcc_16.1.bb} (100%)
rename meta/recipes-devtools/gcc/{libgfortran_15.2.bb => libgfortran_16.1.bb} (100%)
create mode 100644 meta/recipes-graphics/piglit/piglit/0001-fbo-blit-stretch-rename-local-lerp-to-linear_interp.patch
create mode 100644 meta/recipes-sato/rxvt-unicode/rxvt-unicode/0001-rxvt-unicode-fix-gcc16-c-20.patchSignature · 1 line
2.49.0
PATCH 1/7 piglit:backport a fix for building with gcc-16
From: Hemanth Kumar M D <[email protected]>
Avoid conflict with C++20 std::lerp from <cmath>, which causes redefinition and ambiguous call errors with newer toolchains.
Upstream-Status: Backport [https://gitlab.freedesktop.org/mesa/piglit/-/commit/ec0fc2fef0755b1595c3799ab25129174a4b2007]
--- ...h-rename-local-lerp-to-linear_interp.patch | 46 +++++++++++++++++++ meta/recipes-graphics/piglit/piglit_git.bb | 1 + 2 files changed, 47 insertions(+) create mode 100644 meta/recipes-graphics/piglit/piglit/0001-fbo-blit-stretch-rename-local-lerp-to-linear_interp.patch
meta/recipes-graphics/piglit/piglit/0001-fbo-blit-stretch-rename-local-lerp-to-linear_interp.patch new file +46 -0
@@ -0,0 +1,46 @@ +From ec0fc2fef0755b1595c3799ab25129174a4b2007 Mon Sep 17 00:00:00 2001 +From: Vinson Lee <[email protected]> +Date: Sat, 7 Feb 2026 18:39:39 -0800 +Subject: [PATCH] fbo-blit-stretch: rename local lerp to linear_interp + +Avoid conflict with C++20 std::lerp from <cmath>, which +causes redefinition and ambiguous call errors with newer +toolchains. + +Upstream-Status: Backport [https://gitlab.freedesktop.org/mesa/piglit/-/commit/ec0fc2fef0755b1595c3799ab25129174a4b2007] + +Signed-off-by: Vinson Lee <[email protected]> +Signed-off-by: Hemanth Kumar M D <[email protected]> +--- + tests/fbo/fbo-blit-stretch.cpp | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/tests/fbo/fbo-blit-stretch.cpp b/tests/fbo/fbo-blit-stretch.cpp +index a83288c0f..b0d362ecd 100644 +--- a/tests/fbo/fbo-blit-stretch.cpp ++++ b/tests/fbo/fbo-blit-stretch.cpp +@@ -173,7 +173,7 @@ clamp(GLint &x, GLint xmin, GLint xmax) + } + + static float +-lerp(float x0, float x1, float w) ++linear_interp(float x0, float x1, float w) + { + return x0 + (x1 - x0) * w; + } +@@ -181,9 +181,9 @@ lerp(float x0, float x1, float w) + static float + lerp2d(float xy00, float xy01, float xy10, float xy11, float wx, float wy) + { +- float y0 = lerp(xy00, xy01, wx); +- float y1 = lerp(xy10, xy11, wx); +- return lerp(y0, y1, wy); ++ float y0 = linear_interp(xy00, xy01, wx); ++ float y1 = linear_interp(xy10, xy11, wx); ++ return linear_interp(y0, y1, wy); + } + + static float clearColor[4] = { +-- +2.49.0 +
meta/recipes-graphics/piglit/piglit_git.bb +1 -0
@@ -14,6 +14,7 @@ SRC_URI = "git://gitlab.freedesktop.org/mesa/piglit.git;protocol=https;branch=ma file://0001-tests-egl-spec-make-egl_ext_surface_compression-cond.patch \ file://0001-tests-no_error.py-modify-_command-and-not-command.patch \ file://0001-generated_tests-use-shape-in-place-of-newshape-on-nu.patch \ + file://0001-fbo-blit-stretch-rename-local-lerp-to-linear_interp.patch \ " UPSTREAM_CHECK_COMMITS = "1"
Signature · 1 line
2.49.0
PATCH 2/7 rxvt-unicode: backport a fix for building with gcc-16
In reply to [email protected]From: Hemanth Kumar M D <[email protected]>
rename lerp to avoid conflict with the non-identical function std::lerp
Upstream-Status: Submitted [https://lists.schmorp.de/pipermail/rxvt-unicode/2026q2/002707.html]
--- .../rxvt-unicode/rxvt-unicode.inc | 3 +- .../0001-rxvt-unicode-fix-gcc16-c-20.patch | 61 +++++++++++++++++++ 2 files changed, 63 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-sato/rxvt-unicode/rxvt-unicode/0001-rxvt-unicode-fix-gcc16-c-20.patch
meta/recipes-sato/rxvt-unicode/rxvt-unicode.inc +2 -1
@@ -11,7 +11,8 @@ DEPENDS = "virtual/libx11 libxt libxft gdk-pixbuf libxmu libptytty ncurses-nativ SRC_URI = "http://dist.schmorp.de/rxvt-unicode/Attic/rxvt-unicode-${PV}.tar.bz2 \ file://xwc.patch \ file://rxvt.desktop \ - file://rxvt.png" + file://rxvt.png \ + file://0001-rxvt-unicode-fix-gcc16-c-20.patch" inherit autotools features_check pkgconfig update-alternatives
meta/recipes-sato/rxvt-unicode/rxvt-unicode/0001-rxvt-unicode-fix-gcc16-c-20.patch new file +61 -0
61 lines not on this page · raw message
Signature · 1 line
2.49.0
PATCH 3/7 glibc: disable automatic libatomic linking
In reply to [email protected]From: Hemanth Kumar M D <[email protected]>
GCC 16 introduced -flink-libatomic which automatically injects -latomic_asneeded into link commands via LINK_LIBATOMIC_SPEC. When glibc is built with a GCC 16 cross-compiler, the compiler would attempt to link against libatomic which does not exist yet at this stage. (libatomic is built later as part of gcc-runtime)
--- meta/recipes-core/glibc/glibc.inc | 3 +++ 1 file changed, 3 insertions(+)
meta/recipes-core/glibc/glibc.inc +3 -0
@@ -49,6 +49,9 @@ EXTRA_OEMAKE += "SHELL=/bin/bash" # bash but it can be configured by setting KSHELL Makefile variable EXTRA_OEMAKE += "KSHELL=/bin/sh" +TARGET_CC_ARCH += "-fno-link-libatomic" +SDK_CC_ARCH += "-fno-link-libatomic" + do_configure:prepend() { sed -e "s#/bin/bash#/bin/sh#" -i ${S}/elf/ldd.bash.in }
Signature · 1 line
2.49.0
PATCH 4/7 gcc: Upgrade GCC to 16.1 release
In reply to [email protected]From: Hemanth Kumar M D <[email protected]>
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
---
meta/conf/distro/include/maintainers.inc | 2 +-
meta/conf/distro/include/tcmode-default.inc | 2 +-
.../gcc/{gcc-15.2.inc => gcc-16.1.inc} | 17 ++--
...ian_15.2.bb => gcc-cross-canadian_16.1.bb} | 0
.../{gcc-cross_15.2.bb => gcc-cross_16.1.bb} | 0
...-crosssdk_15.2.bb => gcc-crosssdk_16.1.bb} | 0
...cc-runtime_15.2.bb => gcc-runtime_16.1.bb} | 0
...itizers_15.2.bb => gcc-sanitizers_16.1.bb} | 0
...{gcc-source_15.2.bb => gcc-source_16.1.bb} | 0
...AMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch | 2 +-
...sroot-gcc-version-specific-dirs-with.patch | 4 +-
...omic-Do-not-enforce-march-on-aarch64.patch | 18 ++---
...025-gcc-testsuite-tweaks-for-mips-OE.patch | 78 +++++++++++--------
.../gcc/{gcc_15.2.bb => gcc_16.1.bb} | 0
...initial_15.2.bb => libgcc-initial_16.1.bb} | 0
.../gcc/{libgcc_15.2.bb => libgcc_16.1.bb} | 0
...ibgfortran_15.2.bb => libgfortran_16.1.bb} | 0
17 files changed, 66 insertions(+), 57 deletions(-)
rename meta/recipes-devtools/gcc/{gcc-15.2.inc => gcc-16.1.inc} (88%)
rename meta/recipes-devtools/gcc/{gcc-cross-canadian_15.2.bb => gcc-cross-canadian_16.1.bb} (100%)
rename meta/recipes-devtools/gcc/{gcc-cross_15.2.bb => gcc-cross_16.1.bb} (100%)
rename meta/recipes-devtools/gcc/{gcc-crosssdk_15.2.bb => gcc-crosssdk_16.1.bb} (100%)
rename meta/recipes-devtools/gcc/{gcc-runtime_15.2.bb => gcc-runtime_16.1.bb} (100%)
rename meta/recipes-devtools/gcc/{gcc-sanitizers_15.2.bb => gcc-sanitizers_16.1.bb} (100%)
rename meta/recipes-devtools/gcc/{gcc-source_15.2.bb => gcc-source_16.1.bb} (100%)
rename meta/recipes-devtools/gcc/{gcc_15.2.bb => gcc_16.1.bb} (100%)
rename meta/recipes-devtools/gcc/{libgcc-initial_15.2.bb => libgcc-initial_16.1.bb} (100%)
rename meta/recipes-devtools/gcc/{libgcc_15.2.bb => libgcc_16.1.bb} (100%)
rename meta/recipes-devtools/gcc/{libgfortran_15.2.bb => libgfortran_16.1.bb} (100%)meta/conf/distro/include/maintainers.inc +1 -1
@@ -200,7 +200,7 @@ RECIPE_MAINTAINER:pn-gcc-cross-canadian-${TRANSLATED_TARGET_ARCH} = "Khem Raj <r RECIPE_MAINTAINER:pn-gcc-crosssdk-${SDK_SYS} = "Khem Raj <[email protected]>" RECIPE_MAINTAINER:pn-gcc-runtime = "Khem Raj <[email protected]>" RECIPE_MAINTAINER:pn-gcc-sanitizers = "Khem Raj <[email protected]>" -RECIPE_MAINTAINER:pn-gcc-source-15.2.0 = "Khem Raj <[email protected]>" +RECIPE_MAINTAINER:pn-gcc-source-16.1.0 = "Khem Raj <[email protected]>" RECIPE_MAINTAINER:pn-gcompat = "Khem Raj <[email protected]>" RECIPE_MAINTAINER:pn-gconf = "Ross Burton <[email protected]>" RECIPE_MAINTAINER:pn-gcr = "Unassigned <[email protected]>"
meta/conf/distro/include/tcmode-default.inc +1 -1
@@ -9,7 +9,7 @@ PREFERRED_PROVIDER_virtual/nativesdk-cross-binutils ?= "binutils-crosssdk-${SDK_ # Default libc config PREFERRED_PROVIDER_virtual/gettext ??= "gettext" -GCCVERSION ?= "15.%" +GCCVERSION ?= "16.%" SDKGCCVERSION ?= "${GCCVERSION}" GLIBCVERSION ?= "2.43%" RUSTVERSION ?= "1.94.1%"
meta/recipes-devtools/gcc/gcc-16.1.inc renamed from meta/recipes-devtools/gcc/gcc-15.2.inc +6 -11
@@ -2,11 +2,11 @@ require gcc-common.inc # Third digit in PV should be incremented after a minor release -PV = "15.2.0" +PV = "16.1.0" # BINV should be incremented to a revision after a minor gcc release -BINV = "15.2.0" +BINV = "16.1.0" FILESEXTRAPATHS =. "${FILE_DIRNAME}/gcc:${FILE_DIRNAME}/gcc/backport:"
@@ -34,17 +34,17 @@ LIC_FILES_CHKSUM = "\ #SRC_URI[sha256sum] = "41bf7be5dc029112a9df625266e7de030ffc36ff3638f270b180ae8c91fe6449" # from snapshot -#RELEASE ?= "15-20250420" -#RELEASE ?= "15.1.0-RC-20250418" +#RELEASE ?= "16-20260502" +#RELEASE ?= "16.1.0-RC-20260424" #BASEURI ?= "https://gcc.gnu.org/pub/gcc/snapshots/${RELEASE}/gcc-${RELEASE}.tar.xz" #SOURCEDIR ?= "gcc-${RELEASE}" -#SRC_URI[sha256sum] = "fe18624317c6c662977eea8b5a506ec6c132fc11c7a8d53e2f6d21b139b0af3c" +#SRC_URI[sha256sum] = "e8edc2aaf0affce7020658b0be9a3fc820aa33dc610640d3fe1ba1aee360051b" # official release RELEASE ?= "${PV}" BASEURI ?= "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.xz" SOURCEDIR ?= "gcc-${PV}" -SRC_URI[sha256sum] = "438fd996826b0c82485a29da03a72d71d6e3541a83ec702df4271f6fe025d24e" +SRC_URI[sha256sum] = "50efb4d94c3397aff3b0d61a5abd748b4dd31d9d3f2ab7be05b171d36a510f79" SRC_URI = "${BASEURI} \ file://0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch \
@@ -72,11 +72,6 @@ SRC_URI = "${BASEURI} \ file://0023-Fix-install-path-of-linux64.h.patch \ file://0024-Avoid-hardcoded-build-paths-into-ppc-libgcc.patch \ file://0025-gcc-testsuite-tweaks-for-mips-OE.patch \ - file://0026-fix-pr90579-testcases.patch \ - file://0027-gcc15-pr122394.patch \ - file://0028-fix-gcc-libitm-false-postives-01.patch \ - file://0028-fix-gcc-libitm-false-postives-02.patch \ - file://0028-libcody-Make-it-buildable-by-C-11-to-C-26.patch \ file://0001-mapper-localhost-might-not-be-known.patch \ "
meta/recipes-devtools/gcc/gcc-cross-canadian_16.1.bb renamed from meta/recipes-devtools/gcc/gcc-cross-canadian_15.2.bb +0 -0
meta/recipes-devtools/gcc/gcc-cross_16.1.bb renamed from meta/recipes-devtools/gcc/gcc-cross_15.2.bb +0 -0
meta/recipes-devtools/gcc/gcc-crosssdk_16.1.bb renamed from meta/recipes-devtools/gcc/gcc-crosssdk_15.2.bb +0 -0
meta/recipes-devtools/gcc/gcc-runtime_16.1.bb renamed from meta/recipes-devtools/gcc/gcc-runtime_15.2.bb +0 -0
meta/recipes-devtools/gcc/gcc-sanitizers_16.1.bb renamed from meta/recipes-devtools/gcc/gcc-sanitizers_15.2.bb +0 -0
meta/recipes-devtools/gcc/gcc-source_16.1.bb renamed from meta/recipes-devtools/gcc/gcc-source_15.2.bb +0 -0
meta/recipes-devtools/gcc/gcc/0007-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch +1 -1
@@ -172,7 +172,7 @@ index fbc75a90ad5..38c239940bd 100644 + SYSTEMLIBS_DIR "ld-linux-loongarch-" ABI_SPEC ".so.1" #define MUSL_ABI_SPEC \ - "%{mabi=lp64d:}" \ + "%{mabi=ilp32d:}" \ @@ -40,7 +40,7 @@ along with GCC; see the file COPYING3. If not see #undef MUSL_DYNAMIC_LINKER
meta/recipes-devtools/gcc/gcc/0017-Search-target-sysroot-gcc-version-specific-dirs-with.patch +2 -2
@@ -89,12 +89,12 @@ index 007c91780f6..22eb17bc099 100644 + { + memcpy (path + len, this_multi, this_multi_len + 1); + memcpy (path + len + this_multi_len, multi_suffix, suffix_len + 1); -+ ret = callback (path, callback_info); ++ ret = callback (path); + if (ret) + break; + } + } + memcpy (path + len, multi_suffix, suffix_len + 1); - ret = callback (path, callback_info); + ret = callback (path); if (ret)
meta/recipes-devtools/gcc/gcc/0022-libatomic-Do-not-enforce-march-on-aarch64.patch +9 -9
@@ -29,14 +29,14 @@ index 0f1a7156084..255fe448e63 100644 endif diff --git a/libatomic/Makefile.in b/libatomic/Makefile.in -index 9798e7c09e9..3b3027eb77d 100644 +index 887ae41..b3d5e6f 100644 --- a/libatomic/Makefile.in +++ b/libatomic/Makefile.in -@@ -452,7 +452,6 @@ M_SRC = $(firstword $(filter %/$(M_FILE), $(all_c_files))) - libatomic_la_LIBADD = $(foreach s,$(SIZES),$(addsuffix \ - _$(s)_.lo,$(SIZEOBJS))) $(am__append_1) $(am__append_2) \ - $(am__append_3) $(am__append_4) --@ARCH_AARCH64_LINUX_TRUE@@HAVE_IFUNC_TRUE@IFUNC_OPTIONS = -march=armv8-a+lse - @ARCH_ARM_LINUX_TRUE@@HAVE_IFUNC_TRUE@IFUNC_OPTIONS = -march=armv7-a+fp -DHAVE_KERNEL64 - @ARCH_I386_TRUE@@HAVE_IFUNC_TRUE@IFUNC_OPTIONS = -march=i586 - @ARCH_X86_64_TRUE@@HAVE_IFUNC_TRUE@IFUNC_OPTIONS = -mcx16 -mcx16 +@@ -470,7 +470,6 @@ libatomic_la_LDFLAGS = $(libatomic_version_info) $(libatomic_version_script) \ + @PARTIAL_VXWORKS_FALSE@ _$(s)_.lo,$(SIZEOBJS))) $(am__append_1) \ + @PARTIAL_VXWORKS_FALSE@ $(am__append_2) $(am__append_3) \ + @PARTIAL_VXWORKS_FALSE@ $(am__append_4) $(am__append_5) +-@ARCH_AARCH64_LINUX_TRUE@@HAVE_IFUNC_TRUE@@PARTIAL_VXWORKS_FALSE@IFUNC_OPTIONS = -march=armv8-a+lse + @ARCH_ARM_LINUX_TRUE@@HAVE_IFUNC_TRUE@@PARTIAL_VXWORKS_FALSE@IFUNC_OPTIONS = -march=armv7-a+fp -DHAVE_KERNEL64 + @ARCH_I386_TRUE@@HAVE_IFUNC_TRUE@@PARTIAL_VXWORKS_FALSE@IFUNC_OPTIONS = -march=i586 + @ARCH_LOONGARCH_TRUE@@HAVE_IFUNC_TRUE@@PARTIAL_VXWORKS_FALSE@IFUNC_OPTIONS = -mlsx|-mscq
meta/recipes-devtools/gcc/gcc/0025-gcc-testsuite-tweaks-for-mips-OE.patch +46 -32
156 lines not on this page · raw message
meta/recipes-devtools/gcc/gcc_16.1.bb renamed from meta/recipes-devtools/gcc/gcc_15.2.bb +0 -0
meta/recipes-devtools/gcc/libgcc-initial_16.1.bb renamed from meta/recipes-devtools/gcc/libgcc-initial_15.2.bb +0 -0
meta/recipes-devtools/gcc/libgcc_16.1.bb renamed from meta/recipes-devtools/gcc/libgcc_15.2.bb +0 -0
meta/recipes-devtools/gcc/libgfortran_16.1.bb renamed from meta/recipes-devtools/gcc/libgfortran_15.2.bb +0 -0
Signature · 1 line
2.49.0
PATCH 5/7 gcc-runtime: disable automatic libatomic linking during build
In reply to [email protected]From: Hemanth Kumar M D <[email protected]>
GCC 16 introduced -flink-libatomic which automatically injects -latomic_asneeded into link commands via LINK_LIBATOMIC_SPEC. During gcc-runtime do_compile, OE uses a pre-built GCC 16 cross-compiler to build target runtime libraries before libatomic itself is ready.
--- meta/recipes-devtools/gcc/gcc-runtime.inc | 3 +++ 1 file changed, 3 insertions(+)
meta/recipes-devtools/gcc/gcc-runtime.inc +3 -0
@@ -15,6 +15,9 @@ EXTRA_OECONF_PATHS = "\ --with-build-sysroot=${STAGING_DIR_TARGET} \ " +TARGET_CC_ARCH += "-fno-link-libatomic" +SDK_CC_ARCH += "-fno-link-libatomic" + EXTRA_OECONF:append:linuxstdbase = " --enable-clocale=gnu" EXTRA_OECONF:append = " --cache-file=${B}/config.cache" EXTRA_OECONF:append:libc-newlib = " --with-newlib --with-target-subdir"
Signature · 1 line
2.49.0
PATCH 6/7 gcc-runtime: package new libatomic_asneeded files
In reply to [email protected]From: Hemanth Kumar M D <[email protected]>
GCC 16 generates libatomic_asneeded.so and libatomic_asneeded.a during the build as part of the fix for unnecessary DT_NEEDED entries on libatomic in GCC runtime libraries (PR libstdc++/123396). Add them to avoid unpackaged files QA errors.
--- meta/recipes-devtools/gcc/gcc-runtime.inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
meta/recipes-devtools/gcc/gcc-runtime.inc +2 -1
@@ -268,9 +268,10 @@ SUMMARY:libatomic = "GNU C++11 atomics support library" FILES:libatomic-dev = "\ ${libdir}/libatomic.so \ ${libdir}/libatomic.la \ + ${libdir}/libatomic_asneeded.so \ " SUMMARY:libatomic-dev = "GNU C++11 atomics support library - development files" -FILES:libatomic-staticdev = "${libdir}/libatomic.a" +FILES:libatomic-staticdev = "${libdir}/libatomic.a ${libdir}/libatomic_asneeded.a" SUMMARY:libatomic-staticdev = "GNU C++11 atomics support library - static development files" FILES:libitm = "${libdir}/libitm.so.*"
Signature · 1 line
2.49.0
PATCH 7/7 gcc-runtime: avoid passing MULTIBUILDTOP to libatomic
In reply to [email protected]From: Hemanth Kumar M D <[email protected]>
libatomic constructs gcc_objdir using pwd and assumes MULTIBUILDTOP is relative. Passing an absolute MULTIBUILDTOP from OE results in malformed paths during libtool install operations in both compile and install stages.
Avoid passing MULTIBUILDTOP for libatomic and use the upstream default handling instead.
--- meta/recipes-devtools/gcc/gcc-runtime.inc | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-)
meta/recipes-devtools/gcc/gcc-runtime.inc +10 -2
@@ -83,14 +83,22 @@ do_configure[depends] += "${COMPILERDEP}" do_compile () { for d in libgcc ${RUNTIMETARGET}; do cd ${B}/${TARGET_SYS}/$d/ - oe_runmake MULTIBUILDTOP=${B}/${TARGET_SYS}/$d/ + if [ "$d" = "libatomic" ]; then + oe_runmake + else + oe_runmake MULTIBUILDTOP=${B}/${TARGET_SYS}/$d/ + fi done } do_install () { for d in ${RUNTIMETARGET}; do cd ${B}/${TARGET_SYS}/$d/ - oe_runmake 'DESTDIR=${D}' MULTIBUILDTOP=${B}/${TARGET_SYS}/$d/ install + if [ "$d" = "libatomic" ]; then + oe_runmake 'DESTDIR=${D}' install + else + oe_runmake 'DESTDIR=${D}' MULTIBUILDTOP=${B}/${TARGET_SYS}/$d/ install + fi done install -d ${D}${datadir}/gdb/auto-load/${libdir} mv ${D}${libdir}/libstdc++*-gdb.py ${D}${datadir}/gdb/auto-load/${libdir}
Signature · 1 line
2.49.0
Quoted 9 lines · Hemanth Kumar M D via lists.openembedded.org
From: Hemanth Kumar M D <[email protected]>
This patch series upgrades GCC to 16.1 and includes the required runtime and compatibility fixes identified during testing in OE-Core.
The series also includes fixes for packages failing to build with GCC 16, updates for libatomic runtime handling, and packaging changes for newly generated
libatomic_asneededfiles.
Hi Hemanth,
Thanks for the upgrade.
We can see various failures on the autobuilder:
gn build failure with musl:
ERROR: gn-0+git-r0 do_compile: Execution of '/srv/pokybuild/yocto-worker/musl-qemux86-64/build/build/tmp/work/x86-64-v3-poky-linux-musl/gn/0+git/temp/run.do_compile.1800795' failed with exit code 1
...
| In file included from ../sources/gn-0+git/src/gn/pool.cc:5:
| ../sources/gn-0+git/src/gn/pool.h:26:3: error: 'int64_t' does not name a type
| 26 | int64_t depth() const { return depth_; }
| | ^~~~~~~
| ../sources/gn-0+git/src/gn/pool.h:11:1: note: 'int64_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
| 10 | #include "gn/item.h"
| +++ |+#include <cstdint>
| 11 |https://autobuilder.yoctoproject.org/valkyrie/#/builders/3/builds/3801
https://autobuilder.yoctoproject.org/valkyrie/#/builders/6/builds/3762
https://autobuilder.yoctoproject.org/valkyrie/#/builders/111/builds/2470
ruby build error:
ERROR: lib32-ruby-4.0.3-r0 do_compile: Execution of '/srv/pokybuild/yocto-worker/qemux86-world/build/build/tmp/work/x86-pokymllib32-linux/lib32-ruby/4.0.3/temp/run.do_compile.246705' failed with exit code 1
...
| compiling ../../../sources/ruby-4.0.3/ext/openssl/ossl_x509attr.c | /srv/pokybuild/yocto-worker/qemux86-world/build/build/tmp/work/x86-pokymllib32-linux/lib32-ruby/4.0.3/build/i686-linux-gnu-fake.rb: [BUG] Bus Error at 0x00007fb9686ec000 | ruby 4.0.3 (2026-04-21 revision 85ddef263a) +PRISM [x86_64-linux-gnu] | | -- Control frame information ----------------------------------------------- | c:0003 p:---- s:0009 e:000008 l:y b:---- DUMMY [FINISH] | c:0002 p:---- s:0006 e:000005 l:y b:---- CFUNC :require | c:0001 p:0000 s:0003 E:0004f0 l:y b:---- DUMMY [FINISH] | | -- Ruby level backtrace information ----------------------------------------
https://autobuilder.yoctoproject.org/valkyrie/#/builders/59/builds/3762
Failed selftest:
2026-05-10 08:35:41,719 - oe-selftest - INFO - buildoptions.ToolchainOptions.test_toolchain_fortran (subunit.RemotedTestCase) 2026-05-10 08:35:41,723 - oe-selftest - INFO - ... FAIL
...
ERROR: libgfortran-16.1.0-r0 do_package: QA Issue: libgfortran: Files/directories were installed but not shipped in any package:
/usr/lib/gcc/aarch64-poky-linux/16.1.0/libcaf_shmem.a
Please set FILES such that these items are packaged. Alternatively if they are unneeded, avoid installing them or delete them within do_install.
libgfortran: 1 installed and not shipped files. [installed-vs-shipped]
ERROR: libgfortran-16.1.0-r0 do_package: Fatal QA errors were found, failing task.
https://autobuilder.yoctoproject.org/valkyrie/#/builders/23/builds/3928
https://autobuilder.yoctoproject.org/valkyrie/#/builders/35/builds/3823
https://autobuilder.yoctoproject.org/valkyrie/#/builders/48/builds/3695
Failed ptests (all platforms):
{'elfutils': ['run-strip-nothing.sh', 'run-strip-g.sh']}
https://autobuilder.yoctoproject.org/valkyrie/#/builders/56/builds/1572
https://autobuilder.yoctoproject.org/valkyrie/#/builders/61/builds/3631
https://autobuilder.yoctoproject.org/valkyrie/#/builders/73/builds/3646
Failed ptests (musl only):
{'libc-test': ['functional_argv-static',
'functional_basename-static', 'functional_clocale_mbfuncs-static', 'functional_clock_gettime-static', 'functional_crypt-static', 'functional_dirname-static', 'functional_env-static', 'functional_fcntl-static', 'functional_fdopen-static', 'functional_fnmatch-static',
'functional_fscanf-static',
...
https://autobuilder.yoctoproject.org/valkyrie/#/builders/109/builds/386
https://autobuilder.yoctoproject.org/valkyrie/#/builders/110/builds/369
Thanks,
Mathieu
Signature · 3 lines
Mathieu Dubois-Briand, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
Hi Mathieu,
Thanks for the review and testing.
Here is the current status:
- gn build failure with musl: fixed.
- libgfortran QA failure (libcaf_shmem.a): fixed.
- elfutils ptest failures (run-strip-nothing.sh, run-strip-g.sh): fixed.
- libc-test static test failures (musl only): fixed.
We also ran into a GCC 16 ICE during testing (extract_insn during IRA pass with UNSPEC_IEEE_MAX on i386 with -ffloat-store) and have reported it upstream: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125308
Still looking into the remaining failures. Will keep this thread updated and send v2 once everything is sorted.
Thanks,
Hemanth Kumar M D