From 1ee1a73070d91e0c727f9d0db11943a61765c8d9 Mon Sep 17 00:00:00 2001 From: Martin Jansa Date: Mon, 3 May 2021 08:41:18 +0200 Subject: elfutils: ignore format-truncation and stringop-overflow issues to fix build with gcc-11 * works around: http://errors.yoctoproject.org/Errors/Details/580076/ elfutils-0.148/src/ar.c:1088:56: error: '%-*ld' directive output may be truncated writing between 6 and 10 bytes into a region of size 7 [-Werror=format-truncation=] 1088 | snprintf (tmpbuf, sizeof (tmpbuf), ofmt ? "%-*lo" : "%-*ld", bufsize, val); | ^~~~~ elfutils-0.148/src/ar.c:1088:55: note: directive argument in the range [0, 4294967295] 1088 | snprintf (tmpbuf, sizeof (tmpbuf), ofmt ? "%-*lo" : "%-*ld", bufsize, val); | ^~~~~~~ http://errors.yoctoproject.org/Errors/Details/580078/ elfutils-0.148/tests/addrcfi.c:90:16: error: 'dwarf_frame_register' accessing 96 bytes in a region of size 64 [-Werror=stringop-overflow=] 90 | int result = dwarf_frame_register (stuff->frame, regno, ops_mem, &ops, &nops); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Martin Jansa Signed-off-by: Ross Burton --- recipes-devtools/elfutils/elfutils_0.148.bb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'recipes-devtools') diff --git a/recipes-devtools/elfutils/elfutils_0.148.bb b/recipes-devtools/elfutils/elfutils_0.148.bb index 1f07a28..654a715 100644 --- a/recipes-devtools/elfutils/elfutils_0.148.bb +++ b/recipes-devtools/elfutils/elfutils_0.148.bb @@ -61,6 +61,14 @@ inherit autotools gettext # but 0.175 has different license, so to be safe don't backport the fix, just ignore the issue CFLAGS += "-Wno-error=missing-attributes" +# There is a fix in 0.171 version (commit b10d7eb74064c5906f031cd17c0f82041c6a4ca1) +# but 0.171 has different license, so to be safe don't backport the fix, just ignore the issue +CFLAGS += "-Wno-error=format-truncation=" + +# There is a fix in 0.182 version (commit 5621fe5443da23112170235dd5cac161e5c75e65) +# but 0.182 has different license, so to be safe don't backport the fix, just ignore the issue +CFLAGS += "-Wno-error=stringop-overflow=" + EXTRA_OECONF = "--program-prefix=eu- --without-lzma" EXTRA_OECONF_append_class-native = " --without-bzlib" EXTRA_OECONF_append_libc-uclibc = " --enable-uclibc" -- cgit v1.2.3-54-g00ecf