]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
elfutils: Do not suppress stringop-overflow warning on build hosts
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 27 Oct 2025 16:58:48 +0000 (16:58 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 27 Oct 2025 16:58:48 +0000 (16:58 +0000)
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>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-devtools/elfutils/elfutils_0.193.bb

index 29a8ee5af63a0ce1985132c3d828303307d575bf..85aef7881b429c997d79aa5d9fab45a1b912d0c3 100644 (file)
@@ -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"