From: Khem Raj <raj.khem@gmail.com>
To: openembedded-core@lists.openembedded.org
Cc: Khem Raj <raj.khem@gmail.com>
Subject: [PATCH v2 2/2] elfutils: Do not suppress stringop-overflow warning on build hosts
Date: Sun, 26 Oct 2025 11:07:48 -0700 [thread overview]
Message-ID: <20251026180748.2624488-2-raj.khem@gmail.com> (raw)
In-Reply-To: <20251026180748.2624488-1-raj.khem@gmail.com>
stringop-overflow is a gcc specific option and when we try to use non-gcc
compiler as host compiler e.g. clang, this causes several configure tests to fail
because clang reports this as an option it does not understand and bails out
error: unknown warning option '-Werror=stringop-overflow'; did you mean '-Werror=shift-overflow'? [-Werror,-Wunknown-warning-option]
One of the failing tests is the check for PIC support in compiler and results
in errors during compilation like
/usr/bin/ld: libelf_pic.a(elf_error.os): relocation R_X86_64_TPOFF32 against `global_error' can not be used when making a shared object; recompile with -fPIC
and elfutils-native failing to build with clang as host compiler
This patch was added to support version of fedora in 2022 and the error
has since been addressed in glibc [1]
This is effectively reverting bb76fe2baf00b0874d221445c9fba4481740024f
[1] https://sourceware.org/bugzilla/show_bug.cgi?id=29141
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
v2: Fix the problem by removing offending option
meta/recipes-devtools/elfutils/elfutils_0.193.bb | 2 --
1 file changed, 2 deletions(-)
diff --git a/meta/recipes-devtools/elfutils/elfutils_0.193.bb b/meta/recipes-devtools/elfutils/elfutils_0.193.bb
index 29a8ee5af63..85aef7881b4 100644
--- a/meta/recipes-devtools/elfutils/elfutils_0.193.bb
+++ b/meta/recipes-devtools/elfutils/elfutils_0.193.bb
@@ -33,8 +33,6 @@ EXTRA_OECONF = "--program-prefix=eu-"
# Only used at runtime for make check but we want deterministic makefiles for ptest so hardcode
CACHED_CONFIGUREVARS += "ac_cv_prog_HAVE_BUNZIP2=yes"
-BUILD_CFLAGS += "-Wno-error=stringop-overflow"
-
DEPENDS_BZIP2 = "bzip2-replacement-native"
DEPENDS_BZIP2:class-target = "bzip2"
prev parent reply other threads:[~2025-10-26 18:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-26 18:07 [PATCH v2 1/2] pkgconfig: Fix bundled glib build with clang Khem Raj
2025-10-26 18:07 ` Khem Raj [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251026180748.2624488-2-raj.khem@gmail.com \
--to=raj.khem@gmail.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox