Fix build break with clang Signed-off-by: Jose Quaresma <jose.quare...@foundries.io> ---
v1: change patch status to backport .../elfutils/elfutils_0.191.bb | 1 + ...iles-fix-unused-variable-BUFFER_SIZE.patch | 36 +++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 meta/recipes-devtools/elfutils/files/0001-srcfiles-fix-unused-variable-BUFFER_SIZE.patch diff --git a/meta/recipes-devtools/elfutils/elfutils_0.191.bb b/meta/recipes-devtools/elfutils/elfutils_0.191.bb index c5c1542b05..c4d872430b 100644 --- a/meta/recipes-devtools/elfutils/elfutils_0.191.bb +++ b/meta/recipes-devtools/elfutils/elfutils_0.191.bb @@ -22,6 +22,7 @@ SRC_URI = "https://sourceware.org/elfutils/ftp/${PV}/${BP}.tar.bz2 \ file://ptest.patch \ 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 \ " SRC_URI:append:libc-musl = " \ file://0003-musl-utils.patch \ diff --git a/meta/recipes-devtools/elfutils/files/0001-srcfiles-fix-unused-variable-BUFFER_SIZE.patch b/meta/recipes-devtools/elfutils/files/0001-srcfiles-fix-unused-variable-BUFFER_SIZE.patch new file mode 100644 index 0000000000..b3032327a2 --- /dev/null +++ b/meta/recipes-devtools/elfutils/files/0001-srcfiles-fix-unused-variable-BUFFER_SIZE.patch @@ -0,0 +1,36 @@ +From db51a55a8e3811d19265bf12d2ff715c6cf558b4 Mon Sep 17 00:00:00 2001 +From: Jose Quaresma <jose.quare...@foundries.io> +Date: Tue, 19 Mar 2024 10:17:59 +0000 +Subject: [PATCH] srcfiles: fix unused variable BUFFER_SIZE + +The const variable BUFFER_SIZE is used only on the zip_files +function witch is only available with LIBARCHIVE. + +| ../../elfutils-0.191/src/srcfiles.cxx:81:18: error: unused variable 'BUFFER_SIZE' [-Werror,-Wunused-const-variable] +| 81 | constexpr size_t BUFFER_SIZE = 8192; +| | ^~~~~~~~~~~ + +Upstream-Status: Backport [https://sourceware.org/git/?p=elfutils.git;a=commitdiff;h=ef8a4b841aaf26326b8961a651dbe915d54d23e7] + +Signed-off-by: Jose Quaresma <jose.quare...@foundries.io> +--- + src/srcfiles.cxx | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/srcfiles.cxx b/src/srcfiles.cxx +index 892737cc..09d50f8d 100644 +--- a/src/srcfiles.cxx ++++ b/src/srcfiles.cxx +@@ -78,7 +78,9 @@ ARGP_PROGRAM_VERSION_HOOK_DEF = print_version; + /* Bug report address. */ + ARGP_PROGRAM_BUG_ADDRESS_DEF = PACKAGE_BUGREPORT; + ++#ifdef HAVE_LIBARCHIVE + constexpr size_t BUFFER_SIZE = 8192; ++#endif + + /* Definitions of arguments for argp functions. */ + static const struct argp_option options[] = +-- +2.44.0 + -- 2.44.0
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#197319): https://lists.openembedded.org/g/openembedded-core/message/197319 Mute This Topic: https://lists.openembedded.org/mt/105021674/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-