* [scarthgap][PATCH 1/6] dtc: backport fix for build with glibc-2.43
@ 2026-03-26 18:14 martin.jansa
2026-03-26 18:14 ` [scarthgap][PATCH 2/6] pseudo: Add fix for glibc 2.43 martin.jansa
` (4 more replies)
0 siblings, 5 replies; 11+ messages in thread
From: martin.jansa @ 2026-03-26 18:14 UTC (permalink / raw)
To: openembedded-core; +Cc: Martin Jansa, Mathieu Dubois-Briand, Richard Purdie
From: Martin Jansa <martin.jansa@gmail.com>
glibc-2.43 isn't used in OE builds yet, but this fixes dtc-native:
https://errors.yoctoproject.org/Errors/Details/903983/
../sources/dtc-1.7.2/libfdt/fdt_overlay.c: In function ‘overlay_fixup_phandle’:
../sources/dtc-1.7.2/libfdt/fdt_overlay.c:424:21: error: assignment discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
424 | sep = memchr(fixup_str, ':', fixup_len);
| ^
../sources/dtc-1.7.2/libfdt/fdt_overlay.c:434:21: error: assignment discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
434 | sep = memchr(name, ':', fixup_len);
| ^
cc1: all warnings being treated as errors
Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
.../0001-Fix-discarded-const-qualifiers.patch | 85 +++++++++++++++++++
meta/recipes-kernel/dtc/dtc_1.7.0.bb | 1 +
2 files changed, 86 insertions(+)
create mode 100644 meta/recipes-kernel/dtc/dtc/0001-Fix-discarded-const-qualifiers.patch
diff --git a/meta/recipes-kernel/dtc/dtc/0001-Fix-discarded-const-qualifiers.patch b/meta/recipes-kernel/dtc/dtc/0001-Fix-discarded-const-qualifiers.patch
new file mode 100644
index 0000000000..c643410ae9
--- /dev/null
+++ b/meta/recipes-kernel/dtc/dtc/0001-Fix-discarded-const-qualifiers.patch
@@ -0,0 +1,85 @@
+From 861cb43eb53afff83e28ba0e0f88ffa464ebe8ca Mon Sep 17 00:00:00 2001
+From: Stephen Gallagher <sgallagh@redhat.com>
+Date: Tue, 6 Jan 2026 14:19:30 -0500
+Subject: [PATCH] Fix discarded const qualifiers
+
+It's unsafe to implicitly discard the const qualifier on a pointer. In
+overlay_fixup_phandle(), this was probably just an oversight, and making
+the "sep" variable a const char * is sufficient to fix it.
+
+In create_node(), however, the "p" variable is directly modifying the
+buffer pointed to by "const char* node_name". To fix this, we need to
+actually make a duplicate of the buffer and operate on that instead.
+
+This introduces a malloc()/free() and an unbounded strdup() into the
+operation, but fdtput isn't a long-running service and the node_name
+argument comes directly from argv, so this shouldn't introduce a
+significant performance impact.
+
+Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
+Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
+Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
+Upstream-Status: Backport [https://git.kernel.org/pub/scm/utils/dtc/dtc.git/commit/libfdt/fdt_overlay.c?h=main&id=9a1c801a1a3c102bf95c5339c9e985b26b823a21]
+---
+ fdtput.c | 8 +++++---
+ libfdt/fdt_overlay.c | 3 ++-
+ meson.build | 3 ++-
+ 3 files changed, 9 insertions(+), 5 deletions(-)
+
+diff --git a/fdtput.c b/fdtput.c
+index c2fecf4..8deec7e 100644
+--- a/fdtput.c
++++ b/fdtput.c
+@@ -230,19 +230,21 @@ static int create_paths(char **blob, const char *in_path)
+ static int create_node(char **blob, const char *node_name)
+ {
+ int node = 0;
+- char *p;
++ const char *p;
++ char *path = NULL;
+
+ p = strrchr(node_name, '/');
+ if (!p) {
+ report_error(node_name, -1, -FDT_ERR_BADPATH);
+ return -1;
+ }
+- *p = '\0';
+
+ *blob = realloc_node(*blob, p + 1);
+
+ if (p > node_name) {
+- node = fdt_path_offset(*blob, node_name);
++ path = xstrndup(node_name, (size_t)(p - node_name));
++ node = fdt_path_offset(*blob, path);
++ free(path);
+ if (node < 0) {
+ report_error(node_name, -1, node);
+ return -1;
+diff --git a/libfdt/fdt_overlay.c b/libfdt/fdt_overlay.c
+index 5c0c398..75b0619 100644
+--- a/libfdt/fdt_overlay.c
++++ b/libfdt/fdt_overlay.c
+@@ -431,7 +431,8 @@ static int overlay_fixup_phandle(void *fdt, void *fdto, int symbols_off,
+ const char *fixup_str = value;
+ uint32_t path_len, name_len;
+ uint32_t fixup_len;
+- char *sep, *endptr;
++ const char *sep;
++ char *endptr;
+ int poffset, ret;
+
+ fixup_end = memchr(value, '\0', len);
+diff --git a/meson.build b/meson.build
+index 8952e8a..ecb0ae0 100644
+--- a/meson.build
++++ b/meson.build
+@@ -14,7 +14,8 @@ add_project_arguments(
+ '-Wstrict-prototypes',
+ '-Wmissing-prototypes',
+ '-Wredundant-decls',
+- '-Wshadow'
++ '-Wshadow',
++ '-Wdiscarded-qualifiers'
+ ]),
+ language: 'c'
+ )
diff --git a/meta/recipes-kernel/dtc/dtc_1.7.0.bb b/meta/recipes-kernel/dtc/dtc_1.7.0.bb
index 0702fc16df..a2f41197fd 100644
--- a/meta/recipes-kernel/dtc/dtc_1.7.0.bb
+++ b/meta/recipes-kernel/dtc/dtc_1.7.0.bb
@@ -12,6 +12,7 @@ SRC_URI = " \
git://git.kernel.org/pub/scm/utils/dtc/dtc.git;branch=main;protocol=https \
file://0001-meson.build-bump-version-to-1.7.0.patch \
file://0002-meson-allow-building-from-shallow-clones.patch \
+ file://0001-Fix-discarded-const-qualifiers.patch \
"
SRCREV = "039a99414e778332d8f9c04cbd3072e1dcc62798"
^ permalink raw reply related [flat|nested] 11+ messages in thread* [scarthgap][PATCH 2/6] pseudo: Add fix for glibc 2.43
2026-03-26 18:14 [scarthgap][PATCH 1/6] dtc: backport fix for build with glibc-2.43 martin.jansa
@ 2026-03-26 18:14 ` martin.jansa
2026-03-26 18:14 ` [scarthgap][PATCH 3/6] meta/conf/distro/include/yocto-uninative.inc martin.jansa
` (3 subsequent siblings)
4 siblings, 0 replies; 11+ messages in thread
From: martin.jansa @ 2026-03-26 18:14 UTC (permalink / raw)
To: openembedded-core; +Cc: Richard Purdie
From: Richard Purdie <richard.purdie@linuxfoundation.org>
Update to add a fix for a function definition to work with glibc 2.43.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
meta/recipes-devtools/pseudo/pseudo_git.bb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/recipes-devtools/pseudo/pseudo_git.bb b/meta/recipes-devtools/pseudo/pseudo_git.bb
index 0f063f1881..3ae560487b 100644
--- a/meta/recipes-devtools/pseudo/pseudo_git.bb
+++ b/meta/recipes-devtools/pseudo/pseudo_git.bb
@@ -12,7 +12,7 @@ SRC_URI:append:class-nativesdk = " \
file://older-glibc-symbols.patch"
SRC_URI[prebuilt.sha256sum] = "ed9f456856e9d86359f169f46a70ad7be4190d6040282b84c8d97b99072485aa"
-SRCREV = "43cbd8fb4914328094ccdb4bb827d74b1bac2046"
+SRCREV = "56e1f8df4761da60e41812fc32b1de797d1765e9"
S = "${WORKDIR}/git"
PV = "1.9.3+git"
^ permalink raw reply related [flat|nested] 11+ messages in thread* [scarthgap][PATCH 3/6] meta/conf/distro/include/yocto-uninative.inc
2026-03-26 18:14 [scarthgap][PATCH 1/6] dtc: backport fix for build with glibc-2.43 martin.jansa
2026-03-26 18:14 ` [scarthgap][PATCH 2/6] pseudo: Add fix for glibc 2.43 martin.jansa
@ 2026-03-26 18:14 ` martin.jansa
2026-03-26 18:31 ` Patchtest results for " patchtest
2026-03-26 18:14 ` [scarthgap][PATCH 4/6] yocto-uninative: Update to 5.1 for glibc 2.43 martin.jansa
` (2 subsequent siblings)
4 siblings, 1 reply; 11+ messages in thread
From: martin.jansa @ 2026-03-26 18:14 UTC (permalink / raw)
To: openembedded-core; +Cc: Michael Halstead, Richard Purdie
From: Michael Halstead <mhalstead@linuxfoundation.org>
yocto-uninative: Update to 5.0 for needed patchelf updates
Solves some segfaults on relocated qemu-img binaries.
[YOCTO #16003]
Signed-off-by: Michael Halstead <mhalstead@linuxfoundation.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
meta/conf/distro/include/yocto-uninative.inc | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/meta/conf/distro/include/yocto-uninative.inc b/meta/conf/distro/include/yocto-uninative.inc
index 3ced03d477..e9dc6c8640 100644
--- a/meta/conf/distro/include/yocto-uninative.inc
+++ b/meta/conf/distro/include/yocto-uninative.inc
@@ -7,9 +7,9 @@
#
UNINATIVE_MAXGLIBCVERSION = "2.42"
-UNINATIVE_VERSION = "4.9"
+UNINATIVE_VERSION = "5.0"
UNINATIVE_URL ?= "http://downloads.yoctoproject.org/releases/uninative/${UNINATIVE_VERSION}/"
-UNINATIVE_CHECKSUM[aarch64] ?= "812045d826b7fda88944055e8526b95a5a9440bfef608d5b53fd52faab49bf85"
-UNINATIVE_CHECKSUM[i686] ?= "5cc28efd0c15a75de4bcb147c6cce65f1c1c9d442173a220f08427f40a3ffa09"
-UNINATIVE_CHECKSUM[x86_64] ?= "4c03d1ed2b7b4e823aca4a1a23d8f2e322f1770fc10e859adcede5777aff4f3a"
+UNINATIVE_CHECKSUM[aarch64] ?= "a25f2174d0cefcb22af005e9bc72ac01ae83b011c5b6d6d5bf00dac979877f76"
+UNINATIVE_CHECKSUM[i686] ?= "959cc2539b692f9b9862825c7324a0fe4d061fca742f6c259f67f581c59af956"
+UNINATIVE_CHECKSUM[x86_64] ?= "96045e8b1e242c8a849426a8506c7043f354b39f2bc0035192780e8205e23e9d"
^ permalink raw reply related [flat|nested] 11+ messages in thread* Patchtest results for [scarthgap][PATCH 3/6] meta/conf/distro/include/yocto-uninative.inc
2026-03-26 18:14 ` [scarthgap][PATCH 3/6] meta/conf/distro/include/yocto-uninative.inc martin.jansa
@ 2026-03-26 18:31 ` patchtest
0 siblings, 0 replies; 11+ messages in thread
From: patchtest @ 2026-03-26 18:31 UTC (permalink / raw)
To: martin.jansa; +Cc: openembedded-core
[-- Attachment #1: Type: text/plain, Size: 2219 bytes --]
Thank you for your submission. Patchtest identified one
or more issues with the patch. Please see the log below for
more information:
---
Testing patch /home/patchtest/share/mboxes/scarthgap-3-6-meta-conf-distro-include-yocto-uninative.inc.patch
FAIL: test shortlog format: Commit shortlog (first line of commit message) should follow the format "<target>: <summary>" (test_mbox.TestMbox.test_shortlog_format)
PASS: test Signed-off-by presence (test_mbox.TestMbox.test_signed_off_by_presence)
PASS: test author valid (test_mbox.TestMbox.test_author_valid)
PASS: test bugzilla entry format (test_mbox.TestMbox.test_bugzilla_entry_format)
PASS: test commit message presence (test_mbox.TestMbox.test_commit_message_presence)
PASS: test commit message user tags (test_mbox.TestMbox.test_commit_message_user_tags)
PASS: test mbox format (test_mbox.TestMbox.test_mbox_format)
PASS: test non-AUH upgrade (test_mbox.TestMbox.test_non_auh_upgrade)
PASS: test shortlog length (test_mbox.TestMbox.test_shortlog_length)
PASS: test target mailing list (test_mbox.TestMbox.test_target_mailing_list)
SKIP: pretest pylint: No python related patches, skipping test (test_python_pylint.PyLint.pretest_pylint)
SKIP: test CVE tag format: No new CVE patches introduced (test_patch.TestPatch.test_cve_tag_format)
SKIP: test Signed-off-by presence: No new CVE patches introduced (test_patch.TestPatch.test_signed_off_by_presence)
SKIP: test Upstream-Status presence: No new CVE patches introduced (test_patch.TestPatch.test_upstream_status_presence_format)
SKIP: test pylint: No python related patches, skipping test (test_python_pylint.PyLint.test_pylint)
SKIP: test series merge on head: Merge test is disabled for now (test_mbox.TestMbox.test_series_merge_on_head)
---
Please address the issues identified and
submit a new revision of the patch, or alternatively, reply to this
email with an explanation of why the patch should be accepted. If you
believe these results are due to an error in patchtest, please submit a
bug at https://bugzilla.yoctoproject.org/ (use the 'Patchtest' category
under 'Yocto Project Subprojects'). For more information on specific
failures, see: https://wiki.yoctoproject.org/wiki/Patchtest. Thank
you!
^ permalink raw reply [flat|nested] 11+ messages in thread
* [scarthgap][PATCH 4/6] yocto-uninative: Update to 5.1 for glibc 2.43
2026-03-26 18:14 [scarthgap][PATCH 1/6] dtc: backport fix for build with glibc-2.43 martin.jansa
2026-03-26 18:14 ` [scarthgap][PATCH 2/6] pseudo: Add fix for glibc 2.43 martin.jansa
2026-03-26 18:14 ` [scarthgap][PATCH 3/6] meta/conf/distro/include/yocto-uninative.inc martin.jansa
@ 2026-03-26 18:14 ` martin.jansa
2026-03-26 18:14 ` [scarthgap][PATCH 5/6] elfutils: don't add -Werror to avoid discarded-qualifiers martin.jansa
2026-03-26 18:14 ` [scarthgap][PATCH 6/6] binutils: backport patch to fix build with glibc-2.43 on host martin.jansa
4 siblings, 0 replies; 11+ messages in thread
From: martin.jansa @ 2026-03-26 18:14 UTC (permalink / raw)
To: openembedded-core; +Cc: Michael Halstead, Richard Purdie
From: Michael Halstead <mhalstead@linuxfoundation.org>
yocto-uninative: Update to 5.1 for glibc 2.43
Signed-off-by: Michael Halstead <mhalstead@linuxfoundation.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
meta/conf/distro/include/yocto-uninative.inc | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/meta/conf/distro/include/yocto-uninative.inc b/meta/conf/distro/include/yocto-uninative.inc
index e9dc6c8640..d97c96f631 100644
--- a/meta/conf/distro/include/yocto-uninative.inc
+++ b/meta/conf/distro/include/yocto-uninative.inc
@@ -6,10 +6,10 @@
# to the distro running on the build machine.
#
-UNINATIVE_MAXGLIBCVERSION = "2.42"
-UNINATIVE_VERSION = "5.0"
+UNINATIVE_MAXGLIBCVERSION = "2.43"
+UNINATIVE_VERSION = "5.1"
UNINATIVE_URL ?= "http://downloads.yoctoproject.org/releases/uninative/${UNINATIVE_VERSION}/"
-UNINATIVE_CHECKSUM[aarch64] ?= "a25f2174d0cefcb22af005e9bc72ac01ae83b011c5b6d6d5bf00dac979877f76"
-UNINATIVE_CHECKSUM[i686] ?= "959cc2539b692f9b9862825c7324a0fe4d061fca742f6c259f67f581c59af956"
-UNINATIVE_CHECKSUM[x86_64] ?= "96045e8b1e242c8a849426a8506c7043f354b39f2bc0035192780e8205e23e9d"
+UNINATIVE_CHECKSUM[aarch64] ?= "4166237a9dabd222dcb9627a9435dffd756764fabf76ed7ef2e93dc2964567ad"
+UNINATIVE_CHECKSUM[i686] ?= "761502cc9aef4d54d0c6fe9418beb9fdd2c6220da6f2b04128c89f47902ab9ae"
+UNINATIVE_CHECKSUM[x86_64] ?= "2b63a078c26535e0786e87f81ae69509df30f4dce40693004c527bd5e4ab2b85"
^ permalink raw reply related [flat|nested] 11+ messages in thread* [scarthgap][PATCH 5/6] elfutils: don't add -Werror to avoid discarded-qualifiers
2026-03-26 18:14 [scarthgap][PATCH 1/6] dtc: backport fix for build with glibc-2.43 martin.jansa
` (2 preceding siblings ...)
2026-03-26 18:14 ` [scarthgap][PATCH 4/6] yocto-uninative: Update to 5.1 for glibc 2.43 martin.jansa
@ 2026-03-26 18:14 ` martin.jansa
2026-03-28 0:07 ` [OE-core] " Yoann Congal
2026-03-26 18:14 ` [scarthgap][PATCH 6/6] binutils: backport patch to fix build with glibc-2.43 on host martin.jansa
4 siblings, 1 reply; 11+ messages in thread
From: martin.jansa @ 2026-03-26 18:14 UTC (permalink / raw)
To: openembedded-core; +Cc: Martin Jansa
From: Martin Jansa <martin.jansa@gmail.com>
With glibc-2.43 on host elfutils-native fails with:
elfutils-0.191/libcpu/riscv_disasm.c:1259:46: error: initialization discards âconstâ qualifier from pointer target type [-Werror=discarded-qualifiers]
elfutils-0.194 in master doesn't have this issue thanks to this patch avoiding -Werror from:
https://git.openembedded.org/openembedded-core/commit/?id=1d6ac3c811798732e6addc798656bbe104661d77
Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
---
.../elfutils/elfutils_0.191.bb | 1 +
...001-config-eu.am-do-not-force-Werror.patch | 34 +++++++++++++++++++
2 files changed, 35 insertions(+)
create mode 100644 meta/recipes-devtools/elfutils/files/0001-config-eu.am-do-not-force-Werror.patch
diff --git a/meta/recipes-devtools/elfutils/elfutils_0.191.bb b/meta/recipes-devtools/elfutils/elfutils_0.191.bb
index 0fd6d31af1..5156e5c9f6 100644
--- a/meta/recipes-devtools/elfutils/elfutils_0.191.bb
+++ b/meta/recipes-devtools/elfutils/elfutils_0.191.bb
@@ -23,6 +23,7 @@ SRC_URI = "https://sourceware.org/elfutils/ftp/${PV}/${BP}.tar.bz2 \
file://0001-tests-Makefile.am-compile-test_nlist-with-standard-C.patch \
file://0001-debuginfod-Remove-unused-variable.patch \
file://0001-srcfiles-fix-unused-variable-BUFFER_SIZE.patch \
+ file://0001-config-eu.am-do-not-force-Werror.patch \
file://CVE-2025-1352.patch \
file://CVE-2025-1365.patch \
file://CVE-2025-1372.patch \
diff --git a/meta/recipes-devtools/elfutils/files/0001-config-eu.am-do-not-force-Werror.patch b/meta/recipes-devtools/elfutils/files/0001-config-eu.am-do-not-force-Werror.patch
new file mode 100644
index 0000000000..d4e141927f
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/files/0001-config-eu.am-do-not-force-Werror.patch
@@ -0,0 +1,34 @@
+From e169c3fc734be1783b3e1a4768dbec05fb64cb4f Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex@linutronix.de>
+Date: Fri, 22 Nov 2024 12:50:48 +0100
+Subject: [PATCH] config/eu.am: do not force -Werror
+
+This is undesirable when compiler versions may not be the same
+as what upstream is using for their own testing.
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin <alex@linutronix.de>
+---
+ config/eu.am | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/config/eu.am b/config/eu.am
+index 0b7dab5..5e7a03f 100644
+--- a/config/eu.am
++++ b/config/eu.am
+@@ -99,7 +99,6 @@ AM_CFLAGS = -std=gnu99 -Wall -Wshadow -Wformat=2 \
+ $(LOGICAL_OP_WARNING) $(DUPLICATED_COND_WARNING) \
+ $(NULL_DEREFERENCE_WARNING) $(IMPLICIT_FALLTHROUGH_WARNING) \
+ $(USE_AFTER_FREE3_WARNING) \
+- $(if $($(*F)_no_Werror),,-Werror) \
+ $(if $($(*F)_no_Wunused),,-Wunused -Wextra) \
+ $(if $($(*F)_no_Wstack_usage),,$(STACK_USAGE_WARNING)) \
+ $(if $($(*F)_no_Wpacked_not_aligned),$(NO_PACKED_NOT_ALIGNED_WARNING),) \
+@@ -109,7 +108,6 @@ AM_CXXFLAGS = -std=c++11 -Wall -Wshadow \
+ $(TRAMPOLINES_WARNING) \
+ $(LOGICAL_OP_WARNING) $(DUPLICATED_COND_WARNING) \
+ $(NULL_DEREFERENCE_WARNING) $(IMPLICIT_FALLTHROUGH_WARNING) \
+- $(if $($(*F)_no_Werror),,-Werror) \
+ $(if $($(*F)_no_Wunused),,-Wunused -Wextra) \
+ $(if $($(*F)_no_Wstack_usage),,$(STACK_USAGE_WARNING)) \
+ $(if $($(*F)_no_Wpacked_not_aligned),$(NO_PACKED_NOT_ALIGNED_WARNING),) \
^ permalink raw reply related [flat|nested] 11+ messages in thread* Re: [OE-core] [scarthgap][PATCH 5/6] elfutils: don't add -Werror to avoid discarded-qualifiers
2026-03-26 18:14 ` [scarthgap][PATCH 5/6] elfutils: don't add -Werror to avoid discarded-qualifiers martin.jansa
@ 2026-03-28 0:07 ` Yoann Congal
2026-03-28 8:37 ` Martin Jansa
[not found] ` <18A0F4787AD7D398.263554@lists.openembedded.org>
0 siblings, 2 replies; 11+ messages in thread
From: Yoann Congal @ 2026-03-28 0:07 UTC (permalink / raw)
To: martin.jansa, openembedded-core
On Thu Mar 26, 2026 at 7:14 PM CET, Martin Jansa via lists.openembedded.org wrote:
> From: Martin Jansa <martin.jansa@gmail.com>
>
> With glibc-2.43 on host elfutils-native fails with:
> elfutils-0.191/libcpu/riscv_disasm.c:1259:46: error: initialization discards âconstâ qualifier from pointer target type [-Werror=discarded-qualifiers]
>
> elfutils-0.194 in master doesn't have this issue thanks to this patch avoiding -Werror from:
> https://git.openembedded.org/openembedded-core/commit/?id=1d6ac3c811798732e6addc798656bbe104661d77
>
> Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
> ---
Hello
Isn't this patch (and 6/6) also needed on whinlatter?
Can you send what is needed from series to whinlatter please?
Thanks!
> .../elfutils/elfutils_0.191.bb | 1 +
> ...001-config-eu.am-do-not-force-Werror.patch | 34 +++++++++++++++++++
> 2 files changed, 35 insertions(+)
> create mode 100644 meta/recipes-devtools/elfutils/files/0001-config-eu.am-do-not-force-Werror.patch
>
> diff --git a/meta/recipes-devtools/elfutils/elfutils_0.191.bb b/meta/recipes-devtools/elfutils/elfutils_0.191.bb
> index 0fd6d31af1..5156e5c9f6 100644
> --- a/meta/recipes-devtools/elfutils/elfutils_0.191.bb
> +++ b/meta/recipes-devtools/elfutils/elfutils_0.191.bb
> @@ -23,6 +23,7 @@ SRC_URI = "https://sourceware.org/elfutils/ftp/${PV}/${BP}.tar.bz2 \
> file://0001-tests-Makefile.am-compile-test_nlist-with-standard-C.patch \
> file://0001-debuginfod-Remove-unused-variable.patch \
> file://0001-srcfiles-fix-unused-variable-BUFFER_SIZE.patch \
> + file://0001-config-eu.am-do-not-force-Werror.patch \
> file://CVE-2025-1352.patch \
> file://CVE-2025-1365.patch \
> file://CVE-2025-1372.patch \
> diff --git a/meta/recipes-devtools/elfutils/files/0001-config-eu.am-do-not-force-Werror.patch b/meta/recipes-devtools/elfutils/files/0001-config-eu.am-do-not-force-Werror.patch
> new file mode 100644
> index 0000000000..d4e141927f
> --- /dev/null
> +++ b/meta/recipes-devtools/elfutils/files/0001-config-eu.am-do-not-force-Werror.patch
> @@ -0,0 +1,34 @@
> +From e169c3fc734be1783b3e1a4768dbec05fb64cb4f Mon Sep 17 00:00:00 2001
> +From: Alexander Kanavin <alex@linutronix.de>
> +Date: Fri, 22 Nov 2024 12:50:48 +0100
> +Subject: [PATCH] config/eu.am: do not force -Werror
> +
> +This is undesirable when compiler versions may not be the same
> +as what upstream is using for their own testing.
> +
> +Upstream-Status: Inappropriate [oe-core specific]
> +Signed-off-by: Alexander Kanavin <alex@linutronix.de>
> +---
> + config/eu.am | 2 --
> + 1 file changed, 2 deletions(-)
> +
> +diff --git a/config/eu.am b/config/eu.am
> +index 0b7dab5..5e7a03f 100644
> +--- a/config/eu.am
> ++++ b/config/eu.am
> +@@ -99,7 +99,6 @@ AM_CFLAGS = -std=gnu99 -Wall -Wshadow -Wformat=2 \
> + $(LOGICAL_OP_WARNING) $(DUPLICATED_COND_WARNING) \
> + $(NULL_DEREFERENCE_WARNING) $(IMPLICIT_FALLTHROUGH_WARNING) \
> + $(USE_AFTER_FREE3_WARNING) \
> +- $(if $($(*F)_no_Werror),,-Werror) \
> + $(if $($(*F)_no_Wunused),,-Wunused -Wextra) \
> + $(if $($(*F)_no_Wstack_usage),,$(STACK_USAGE_WARNING)) \
> + $(if $($(*F)_no_Wpacked_not_aligned),$(NO_PACKED_NOT_ALIGNED_WARNING),) \
> +@@ -109,7 +108,6 @@ AM_CXXFLAGS = -std=c++11 -Wall -Wshadow \
> + $(TRAMPOLINES_WARNING) \
> + $(LOGICAL_OP_WARNING) $(DUPLICATED_COND_WARNING) \
> + $(NULL_DEREFERENCE_WARNING) $(IMPLICIT_FALLTHROUGH_WARNING) \
> +- $(if $($(*F)_no_Werror),,-Werror) \
> + $(if $($(*F)_no_Wunused),,-Wunused -Wextra) \
> + $(if $($(*F)_no_Wstack_usage),,$(STACK_USAGE_WARNING)) \
> + $(if $($(*F)_no_Wpacked_not_aligned),$(NO_PACKED_NOT_ALIGNED_WARNING),) \
--
Yoann Congal
Smile ECS
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: [OE-core] [scarthgap][PATCH 5/6] elfutils: don't add -Werror to avoid discarded-qualifiers
2026-03-28 0:07 ` [OE-core] " Yoann Congal
@ 2026-03-28 8:37 ` Martin Jansa
[not found] ` <18A0F4787AD7D398.263554@lists.openembedded.org>
1 sibling, 0 replies; 11+ messages in thread
From: Martin Jansa @ 2026-03-28 8:37 UTC (permalink / raw)
To: Yoann Congal; +Cc: openembedded-core
On Sat, Mar 28, 2026 at 1:07 AM Yoann Congal <yoann.congal@smile.fr> wrote:
>
> On Thu Mar 26, 2026 at 7:14 PM CET, Martin Jansa via lists.openembedded.org wrote:
> > From: Martin Jansa <martin.jansa@gmail.com>
> >
> > With glibc-2.43 on host elfutils-native fails with:
> > elfutils-0.191/libcpu/riscv_disasm.c:1259:46: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
> >
> > elfutils-0.194 in master doesn't have this issue thanks to this patch avoiding -Werror from:
> > https://git.openembedded.org/openembedded-core/commit/?id=1d6ac3c811798732e6addc798656bbe104661d77
> >
> > Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
> > ---
>
> Hello
>
> Isn't this patch (and 6/6) also needed on whinlatter?
> Can you send what is needed from series to whinlatter please?
Hi, I've asked about supporting hosts with glibc-2.43 in whinlatter
and Paul and Richard were concerned about the impact and whether it's
worth it considering that whinlatter will be EOL relatively soon.
I have some changes for whinlatter already, but it needs more fixes to
build image (m4 and gettext native are failing there), while with
these 6 in scarthgap I was able to build whole image already.
There is one more issue with latest ubuntu-26.04 (after updating
docker image to latest last week) which isn't solved by these 6
changes - libcrypt-dev is no longer installed as a dependency in my
minimal docker image, leading the python3-native failing to build
crypt and shadow-native failing to find libcrypt - I have explicitly
added it to Dockerfile to fix this one as virtual/crypt-native is in
ASSUME_PROVIDED and not sure if we want to use xcrypt-native to avoid
that.
Corresponding IRC log:
https://irc.yoctoproject.org/%23yocto.2026-03-25.log.html
JaMa paulbarker: Hi, any plans for supporting ubuntu-26.04 with glibc
2.43 on host? We will need at least new uninative from master,
m4-native, gettext-native fixes (instead of upgrades from master) and
probably more, I can help with that if there is consensus to get them
merged eventually 10:01
JaMa I mean for whinlatter branch, surprisingly older m4-native in
scarthgap doesn't fail with glibc 2.43 on host 10:02
paulbarker JaMa: I think it usually comes down to how invasive the
needed changes are 10:02
JaMa https://git.openembedded.org/openembedded-core/commit/?id=28552a7b6c94060c7ab3899619ab8afb74124d02
https://git.openembedded.org/openembedded-core/commit/?id=7d35b0e7929d666af783db835a3a809f8f6ce429
https://git.openembedded.org/openembedded-core/commit/?id=c1fb515f2a88fa0a0e95529afc07a99db001af0e
would be the start, then I can extract just the glibc fix from 10:05
JaMa https://git.openembedded.org/openembedded-core/commit/?id=97dd558277ea48e2161f389d6458517da6e04e4a
and similarly from
https://git.openembedded.org/openembedded-core/commit/?id=0ed7b56814d8337d1bd97cd2a4460065dba79207
that should be enough to build minimal image IIRC 10:05
RP paulbarker: I guess whinlatter is to be discontinued soon too which
is probably part of the reason for the question 10:05
paulbarker JaMa: I think we need to wait until 26.04 is out, then look
at whether we can easily support it in wrynose/scarthgap 10:06
paulbarker As RP says, whinlatter will be EOL, so will kirkstone 10:06
JaMa OK, won't offer my help until someone looks :) I can switch to
bit older 26.04 snapshot (the glibc was upgraded for 26.04 in last
week) 10:08
paulbarker JaMa: Sorry, I don't mean to sound dismissive. We're just
focused on the last features for the LTS release and I don't want us
to take on too much more until they're done 10:18
RP JaMa: your help is definitely welcome, it is just a question of how
much work we should do on whinlatter now 10:28
JaMa RP: paulbarker: thanks, I have started with scarthgap issues, m4
and gettext surprisingly doesn't fail there so it might be just the
first 3 commits I've mentioned, doing the rebuild from scratch now
Cheers,
^ permalink raw reply [flat|nested] 11+ messages in thread[parent not found: <18A0F4787AD7D398.263554@lists.openembedded.org>]
* Re: [OE-core] [scarthgap][PATCH 5/6] elfutils: don't add -Werror to avoid discarded-qualifiers
[not found] ` <18A0F4787AD7D398.263554@lists.openembedded.org>
@ 2026-03-28 8:41 ` Martin Jansa
0 siblings, 0 replies; 11+ messages in thread
From: Martin Jansa @ 2026-03-28 8:41 UTC (permalink / raw)
To: martin.jansa; +Cc: Yoann Congal, openembedded-core
On Sat, Mar 28, 2026 at 9:37 AM Martin Jansa via
lists.openembedded.org <martin.jansa=gmail.com@lists.openembedded.org>
wrote:
>
> On Sat, Mar 28, 2026 at 1:07 AM Yoann Congal <yoann.congal@smile.fr> wrote:
> >
> > On Thu Mar 26, 2026 at 7:14 PM CET, Martin Jansa via lists.openembedded.org wrote:
> > > From: Martin Jansa <martin.jansa@gmail.com>
> > >
> > > With glibc-2.43 on host elfutils-native fails with:
> > > elfutils-0.191/libcpu/riscv_disasm.c:1259:46: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
> > >
> > > elfutils-0.194 in master doesn't have this issue thanks to this patch avoiding -Werror from:
> > > https://git.openembedded.org/openembedded-core/commit/?id=1d6ac3c811798732e6addc798656bbe104661d77
> > >
> > > Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
> > > ---
> >
> > Hello
> >
> > Isn't this patch (and 6/6) also needed on whinlatter?
> > Can you send what is needed from series to whinlatter please?
>
> Hi, I've asked about supporting hosts with glibc-2.43 in whinlatter
> and Paul and Richard were concerned about the impact and whether it's
> worth it considering that whinlatter will be EOL relatively soon.
>
> I have some changes for whinlatter already, but it needs more fixes to
> build image (m4 and gettext native are failing there), while with
> these 6 in scarthgap I was able to build whole image already.
>
> There is one more issue with latest ubuntu-26.04 (after updating
> docker image to latest last week) which isn't solved by these 6
> changes - libcrypt-dev is no longer installed as a dependency in my
> minimal docker image, leading the python3-native failing to build
> crypt and shadow-native failing to find libcrypt - I have explicitly
> added it to Dockerfile to fix this one as virtual/crypt-native is in
> ASSUME_PROVIDED and not sure if we want to use xcrypt-native to avoid
> that.
>
> Corresponding IRC log:
> https://irc.yoctoproject.org/%23yocto.2026-03-25.log.html
>
> JaMa paulbarker: Hi, any plans for supporting ubuntu-26.04 with glibc
> 2.43 on host? We will need at least new uninative from master,
> m4-native, gettext-native fixes (instead of upgrades from master) and
> probably more, I can help with that if there is consensus to get them
> merged eventually 10:01
>
> JaMa I mean for whinlatter branch, surprisingly older m4-native in
> scarthgap doesn't fail with glibc 2.43 on host 10:02
>
> paulbarker JaMa: I think it usually comes down to how invasive the
> needed changes are 10:02
>
> JaMa https://git.openembedded.org/openembedded-core/commit/?id=28552a7b6c94060c7ab3899619ab8afb74124d02
> https://git.openembedded.org/openembedded-core/commit/?id=7d35b0e7929d666af783db835a3a809f8f6ce429
> https://git.openembedded.org/openembedded-core/commit/?id=c1fb515f2a88fa0a0e95529afc07a99db001af0e
> would be the start, then I can extract just the glibc fix from 10:05
> JaMa https://git.openembedded.org/openembedded-core/commit/?id=97dd558277ea48e2161f389d6458517da6e04e4a
> and similarly from
> https://git.openembedded.org/openembedded-core/commit/?id=0ed7b56814d8337d1bd97cd2a4460065dba79207
> that should be enough to build minimal image IIRC 10:05
>
> RP paulbarker: I guess whinlatter is to be discontinued soon too which
> is probably part of the reason for the question 10:05
>
> paulbarker JaMa: I think we need to wait until 26.04 is out, then look
> at whether we can easily support it in wrynose/scarthgap 10:06
>
> paulbarker As RP says, whinlatter will be EOL, so will kirkstone 10:06
>
> JaMa OK, won't offer my help until someone looks :) I can switch to
> bit older 26.04 snapshot (the glibc was upgraded for 26.04 in last
> week) 10:08
>
> paulbarker JaMa: Sorry, I don't mean to sound dismissive. We're just
> focused on the last features for the LTS release and I don't want us
> to take on too much more until they're done 10:18
>
> RP JaMa: your help is definitely welcome, it is just a question of how
> much work we should do on whinlatter now 10:28
>
> JaMa RP: paulbarker: thanks, I have started with scarthgap issues, m4
> and gettext surprisingly doesn't fail there so it might be just the
> first 3 commits I've mentioned, doing the rebuild from scratch now
And this elfutils .patch is already included in whinlatter:
https://git.openembedded.org/openembedded-core/tree/meta/recipes-devtools/elfutils/files/0001-config-eu.am-do-not-force-Werror.patch?h=whinlatter
so it shouldn't be needed (I haven't tried, because m4 or gettext
fails before starting elfutils).
Cheers,
^ permalink raw reply [flat|nested] 11+ messages in thread
* [scarthgap][PATCH 6/6] binutils: backport patch to fix build with glibc-2.43 on host
2026-03-26 18:14 [scarthgap][PATCH 1/6] dtc: backport fix for build with glibc-2.43 martin.jansa
` (3 preceding siblings ...)
2026-03-26 18:14 ` [scarthgap][PATCH 5/6] elfutils: don't add -Werror to avoid discarded-qualifiers martin.jansa
@ 2026-03-26 18:14 ` martin.jansa
4 siblings, 0 replies; 11+ messages in thread
From: martin.jansa @ 2026-03-26 18:14 UTC (permalink / raw)
To: openembedded-core; +Cc: Martin Jansa
From: Martin Jansa <martin.jansa@gmail.com>
Fixes:
../../../gprofng/libcollector/linetrace.c: In function ‘__collector_ext_line_install’:
../../../gprofng/libcollector/linetrace.c:219:45: error: expected identifier before ‘_Generic’
219 | if (java_follow_env != NULL && CALL_UTIL (strstr)(java_follow_env, COLLECTOR_JVMTI_OPTION))
| ^~~~~~
../../../gprofng/libcollector/linetrace.c:219:34: note: in expansion of macro ‘CALL_UTIL’
219 | if (java_follow_env != NULL && CALL_UTIL (strstr)(java_follow_env, COLLECTOR_JVMTI_OPTION))
| ^~~~~~~~~
Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
---
.../binutils/binutils-2.42.inc | 1 +
...tect-against-standard-library-macros.patch | 31 +++++++++++++++++++
2 files changed, 32 insertions(+)
create mode 100644 meta/recipes-devtools/binutils/binutils/0022-gprofng-protect-against-standard-library-macros.patch
diff --git a/meta/recipes-devtools/binutils/binutils-2.42.inc b/meta/recipes-devtools/binutils/binutils-2.42.inc
index 839d31242e..36bd49ad03 100644
--- a/meta/recipes-devtools/binutils/binutils-2.42.inc
+++ b/meta/recipes-devtools/binutils/binutils-2.42.inc
@@ -43,6 +43,7 @@ SRC_URI = "\
file://0019-Fix-32097-Warnings-when-building-gprofng-with-Clang.patch \
file://0020-gprofng-fix-std-gnu23-compatibility-wrt-unprototyped.patch \
file://0021-gprofng-fix-build-with-std-gnu23.patch \
+ file://0022-gprofng-protect-against-standard-library-macros.patch \
file://0018-CVE-2025-0840.patch \
file://CVE-2025-1176.patch \
file://CVE-2025-1178.patch \
diff --git a/meta/recipes-devtools/binutils/binutils/0022-gprofng-protect-against-standard-library-macros.patch b/meta/recipes-devtools/binutils/binutils/0022-gprofng-protect-against-standard-library-macros.patch
new file mode 100644
index 0000000000..0fa0a93991
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils/0022-gprofng-protect-against-standard-library-macros.patch
@@ -0,0 +1,31 @@
+From 5f66aee7f4bec7a2d8378034116f5e5c3dc50f41 Mon Sep 17 00:00:00 2001
+From: Andreas Schwab <schwab@suse.de>
+Date: Sat, 22 Nov 2025 11:29:43 +0100
+Subject: [PATCH] gprofng: protect against standard library macros
+
+The CALL_UTIL macro can expand to an unparsable expression of the argument
+is a macro, like with the new const-preserving standard library macros in
+C23.
+
+ * gprofng/src/collector_module.h (CALL_UTIL): Add parens to not
+ expand its argument if it is a function-like macro.
+
+Upstream-Status: Backport [2.46 5f66aee7f4bec7a2d8378034116f5e5c3dc50f41]
+Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
+---
+ gprofng/src/collector_module.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/gprofng/src/collector_module.h b/gprofng/src/collector_module.h
+index b64d69c45ab..859a6dd1f7d 100644
+--- a/gprofng/src/collector_module.h
++++ b/gprofng/src/collector_module.h
+@@ -119,7 +119,7 @@ typedef struct CollectorUtilFuncs
+ extern CollectorUtilFuncs __collector_util_funcs;
+ extern int __collector_dlsym_guard;
+
+-#define CALL_UTIL(x) __collector_util_funcs.x
++#define CALL_UTIL(x) (__collector_util_funcs.x)
+
+ /* The following constants define the meaning of the "void *arg"
+ * argument of getFrameInfo().
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [scarthgap][PATCH 1/6] dtc: backport fix for build with glibc-2.43
@ 2026-04-21 5:42 martin.jansa
2026-04-21 5:42 ` [scarthgap][PATCH 5/6] elfutils: don't add -Werror to avoid discarded-qualifiers martin.jansa
0 siblings, 1 reply; 11+ messages in thread
From: martin.jansa @ 2026-04-21 5:42 UTC (permalink / raw)
To: openembedded-core; +Cc: Martin Jansa, Mathieu Dubois-Briand, Richard Purdie
From: Martin Jansa <martin.jansa@gmail.com>
glibc-2.43 isn't used in OE builds yet, but this fixes dtc-native:
https://errors.yoctoproject.org/Errors/Details/903983/
../sources/dtc-1.7.2/libfdt/fdt_overlay.c: In function ‘overlay_fixup_phandle’:
../sources/dtc-1.7.2/libfdt/fdt_overlay.c:424:21: error: assignment discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
424 | sep = memchr(fixup_str, ':', fixup_len);
| ^
../sources/dtc-1.7.2/libfdt/fdt_overlay.c:434:21: error: assignment discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
434 | sep = memchr(name, ':', fixup_len);
| ^
cc1: all warnings being treated as errors
Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
.../0001-Fix-discarded-const-qualifiers.patch | 85 +++++++++++++++++++
meta/recipes-kernel/dtc/dtc_1.7.0.bb | 1 +
2 files changed, 86 insertions(+)
create mode 100644 meta/recipes-kernel/dtc/dtc/0001-Fix-discarded-const-qualifiers.patch
diff --git a/meta/recipes-kernel/dtc/dtc/0001-Fix-discarded-const-qualifiers.patch b/meta/recipes-kernel/dtc/dtc/0001-Fix-discarded-const-qualifiers.patch
new file mode 100644
index 0000000000..c643410ae9
--- /dev/null
+++ b/meta/recipes-kernel/dtc/dtc/0001-Fix-discarded-const-qualifiers.patch
@@ -0,0 +1,85 @@
+From 861cb43eb53afff83e28ba0e0f88ffa464ebe8ca Mon Sep 17 00:00:00 2001
+From: Stephen Gallagher <sgallagh@redhat.com>
+Date: Tue, 6 Jan 2026 14:19:30 -0500
+Subject: [PATCH] Fix discarded const qualifiers
+
+It's unsafe to implicitly discard the const qualifier on a pointer. In
+overlay_fixup_phandle(), this was probably just an oversight, and making
+the "sep" variable a const char * is sufficient to fix it.
+
+In create_node(), however, the "p" variable is directly modifying the
+buffer pointed to by "const char* node_name". To fix this, we need to
+actually make a duplicate of the buffer and operate on that instead.
+
+This introduces a malloc()/free() and an unbounded strdup() into the
+operation, but fdtput isn't a long-running service and the node_name
+argument comes directly from argv, so this shouldn't introduce a
+significant performance impact.
+
+Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
+Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
+Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
+Upstream-Status: Backport [https://git.kernel.org/pub/scm/utils/dtc/dtc.git/commit/libfdt/fdt_overlay.c?h=main&id=9a1c801a1a3c102bf95c5339c9e985b26b823a21]
+---
+ fdtput.c | 8 +++++---
+ libfdt/fdt_overlay.c | 3 ++-
+ meson.build | 3 ++-
+ 3 files changed, 9 insertions(+), 5 deletions(-)
+
+diff --git a/fdtput.c b/fdtput.c
+index c2fecf4..8deec7e 100644
+--- a/fdtput.c
++++ b/fdtput.c
+@@ -230,19 +230,21 @@ static int create_paths(char **blob, const char *in_path)
+ static int create_node(char **blob, const char *node_name)
+ {
+ int node = 0;
+- char *p;
++ const char *p;
++ char *path = NULL;
+
+ p = strrchr(node_name, '/');
+ if (!p) {
+ report_error(node_name, -1, -FDT_ERR_BADPATH);
+ return -1;
+ }
+- *p = '\0';
+
+ *blob = realloc_node(*blob, p + 1);
+
+ if (p > node_name) {
+- node = fdt_path_offset(*blob, node_name);
++ path = xstrndup(node_name, (size_t)(p - node_name));
++ node = fdt_path_offset(*blob, path);
++ free(path);
+ if (node < 0) {
+ report_error(node_name, -1, node);
+ return -1;
+diff --git a/libfdt/fdt_overlay.c b/libfdt/fdt_overlay.c
+index 5c0c398..75b0619 100644
+--- a/libfdt/fdt_overlay.c
++++ b/libfdt/fdt_overlay.c
+@@ -431,7 +431,8 @@ static int overlay_fixup_phandle(void *fdt, void *fdto, int symbols_off,
+ const char *fixup_str = value;
+ uint32_t path_len, name_len;
+ uint32_t fixup_len;
+- char *sep, *endptr;
++ const char *sep;
++ char *endptr;
+ int poffset, ret;
+
+ fixup_end = memchr(value, '\0', len);
+diff --git a/meson.build b/meson.build
+index 8952e8a..ecb0ae0 100644
+--- a/meson.build
++++ b/meson.build
+@@ -14,7 +14,8 @@ add_project_arguments(
+ '-Wstrict-prototypes',
+ '-Wmissing-prototypes',
+ '-Wredundant-decls',
+- '-Wshadow'
++ '-Wshadow',
++ '-Wdiscarded-qualifiers'
+ ]),
+ language: 'c'
+ )
diff --git a/meta/recipes-kernel/dtc/dtc_1.7.0.bb b/meta/recipes-kernel/dtc/dtc_1.7.0.bb
index 0702fc16df..a2f41197fd 100644
--- a/meta/recipes-kernel/dtc/dtc_1.7.0.bb
+++ b/meta/recipes-kernel/dtc/dtc_1.7.0.bb
@@ -12,6 +12,7 @@ SRC_URI = " \
git://git.kernel.org/pub/scm/utils/dtc/dtc.git;branch=main;protocol=https \
file://0001-meson.build-bump-version-to-1.7.0.patch \
file://0002-meson-allow-building-from-shallow-clones.patch \
+ file://0001-Fix-discarded-const-qualifiers.patch \
"
SRCREV = "039a99414e778332d8f9c04cbd3072e1dcc62798"
^ permalink raw reply related [flat|nested] 11+ messages in thread* [scarthgap][PATCH 5/6] elfutils: don't add -Werror to avoid discarded-qualifiers
2026-04-21 5:42 [scarthgap][PATCH 1/6] dtc: backport fix for build with glibc-2.43 martin.jansa
@ 2026-04-21 5:42 ` martin.jansa
0 siblings, 0 replies; 11+ messages in thread
From: martin.jansa @ 2026-04-21 5:42 UTC (permalink / raw)
To: openembedded-core; +Cc: Martin Jansa
From: Martin Jansa <martin.jansa@gmail.com>
With glibc-2.43 on host elfutils-native fails with:
elfutils-0.191/libcpu/riscv_disasm.c:1259:46: error: initialization discards âconstâ qualifier from pointer target type [-Werror=discarded-qualifiers]
elfutils-0.194 in master doesn't have this issue thanks to this patch avoiding -Werror from:
https://git.openembedded.org/openembedded-core/commit/?id=1d6ac3c811798732e6addc798656bbe104661d77
Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
---
.../elfutils/elfutils_0.191.bb | 1 +
...001-config-eu.am-do-not-force-Werror.patch | 34 +++++++++++++++++++
2 files changed, 35 insertions(+)
create mode 100644 meta/recipes-devtools/elfutils/files/0001-config-eu.am-do-not-force-Werror.patch
diff --git a/meta/recipes-devtools/elfutils/elfutils_0.191.bb b/meta/recipes-devtools/elfutils/elfutils_0.191.bb
index 0fd6d31af1..5156e5c9f6 100644
--- a/meta/recipes-devtools/elfutils/elfutils_0.191.bb
+++ b/meta/recipes-devtools/elfutils/elfutils_0.191.bb
@@ -23,6 +23,7 @@ SRC_URI = "https://sourceware.org/elfutils/ftp/${PV}/${BP}.tar.bz2 \
file://0001-tests-Makefile.am-compile-test_nlist-with-standard-C.patch \
file://0001-debuginfod-Remove-unused-variable.patch \
file://0001-srcfiles-fix-unused-variable-BUFFER_SIZE.patch \
+ file://0001-config-eu.am-do-not-force-Werror.patch \
file://CVE-2025-1352.patch \
file://CVE-2025-1365.patch \
file://CVE-2025-1372.patch \
diff --git a/meta/recipes-devtools/elfutils/files/0001-config-eu.am-do-not-force-Werror.patch b/meta/recipes-devtools/elfutils/files/0001-config-eu.am-do-not-force-Werror.patch
new file mode 100644
index 0000000000..d4e141927f
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/files/0001-config-eu.am-do-not-force-Werror.patch
@@ -0,0 +1,34 @@
+From e169c3fc734be1783b3e1a4768dbec05fb64cb4f Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex@linutronix.de>
+Date: Fri, 22 Nov 2024 12:50:48 +0100
+Subject: [PATCH] config/eu.am: do not force -Werror
+
+This is undesirable when compiler versions may not be the same
+as what upstream is using for their own testing.
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin <alex@linutronix.de>
+---
+ config/eu.am | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/config/eu.am b/config/eu.am
+index 0b7dab5..5e7a03f 100644
+--- a/config/eu.am
++++ b/config/eu.am
+@@ -99,7 +99,6 @@ AM_CFLAGS = -std=gnu99 -Wall -Wshadow -Wformat=2 \
+ $(LOGICAL_OP_WARNING) $(DUPLICATED_COND_WARNING) \
+ $(NULL_DEREFERENCE_WARNING) $(IMPLICIT_FALLTHROUGH_WARNING) \
+ $(USE_AFTER_FREE3_WARNING) \
+- $(if $($(*F)_no_Werror),,-Werror) \
+ $(if $($(*F)_no_Wunused),,-Wunused -Wextra) \
+ $(if $($(*F)_no_Wstack_usage),,$(STACK_USAGE_WARNING)) \
+ $(if $($(*F)_no_Wpacked_not_aligned),$(NO_PACKED_NOT_ALIGNED_WARNING),) \
+@@ -109,7 +108,6 @@ AM_CXXFLAGS = -std=c++11 -Wall -Wshadow \
+ $(TRAMPOLINES_WARNING) \
+ $(LOGICAL_OP_WARNING) $(DUPLICATED_COND_WARNING) \
+ $(NULL_DEREFERENCE_WARNING) $(IMPLICIT_FALLTHROUGH_WARNING) \
+- $(if $($(*F)_no_Werror),,-Werror) \
+ $(if $($(*F)_no_Wunused),,-Wunused -Wextra) \
+ $(if $($(*F)_no_Wstack_usage),,$(STACK_USAGE_WARNING)) \
+ $(if $($(*F)_no_Wpacked_not_aligned),$(NO_PACKED_NOT_ALIGNED_WARNING),) \
^ permalink raw reply related [flat|nested] 11+ messages in thread
end of thread, other threads:[~2026-04-21 5:42 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-26 18:14 [scarthgap][PATCH 1/6] dtc: backport fix for build with glibc-2.43 martin.jansa
2026-03-26 18:14 ` [scarthgap][PATCH 2/6] pseudo: Add fix for glibc 2.43 martin.jansa
2026-03-26 18:14 ` [scarthgap][PATCH 3/6] meta/conf/distro/include/yocto-uninative.inc martin.jansa
2026-03-26 18:31 ` Patchtest results for " patchtest
2026-03-26 18:14 ` [scarthgap][PATCH 4/6] yocto-uninative: Update to 5.1 for glibc 2.43 martin.jansa
2026-03-26 18:14 ` [scarthgap][PATCH 5/6] elfutils: don't add -Werror to avoid discarded-qualifiers martin.jansa
2026-03-28 0:07 ` [OE-core] " Yoann Congal
2026-03-28 8:37 ` Martin Jansa
[not found] ` <18A0F4787AD7D398.263554@lists.openembedded.org>
2026-03-28 8:41 ` Martin Jansa
2026-03-26 18:14 ` [scarthgap][PATCH 6/6] binutils: backport patch to fix build with glibc-2.43 on host martin.jansa
-- strict thread matches above, loose matches on Subject: below --
2026-04-21 5:42 [scarthgap][PATCH 1/6] dtc: backport fix for build with glibc-2.43 martin.jansa
2026-04-21 5:42 ` [scarthgap][PATCH 5/6] elfutils: don't add -Werror to avoid discarded-qualifiers martin.jansa
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox