diff options
author | Jose Quaresma <quaresma.jose@gmail.com> | 2024-03-19 11:12:59 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-03-20 18:20:38 +0000 |
commit | b4be67b5f7cd92467a27ea3e47c62e869b2bfac2 (patch) | |
tree | 75df6bcafb658073a24a0cfbccd444dd5182f153 /meta/recipes-devtools/elfutils | |
parent | 7d530aa4170fe1ce66051c493d17c058d8c48572 (diff) | |
download | poky-b4be67b5f7cd92467a27ea3e47c62e869b2bfac2.tar.gz |
elfutils: fix unused variable BUFFER_SIZE
Fix build break with clang
(From OE-Core rev: 760292c23213476169116b8608ca4119b99e6ff8)
Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/elfutils')
-rw-r--r-- | meta/recipes-devtools/elfutils/elfutils_0.191.bb | 1 | ||||
-rw-r--r-- | meta/recipes-devtools/elfutils/files/0001-srcfiles-fix-unused-variable-BUFFER_SIZE.patch | 36 |
2 files changed, 37 insertions, 0 deletions
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 \ | |||
22 | file://ptest.patch \ | 22 | file://ptest.patch \ |
23 | file://0001-tests-Makefile.am-compile-test_nlist-with-standard-C.patch \ | 23 | file://0001-tests-Makefile.am-compile-test_nlist-with-standard-C.patch \ |
24 | file://0001-debuginfod-Remove-unused-variable.patch \ | 24 | file://0001-debuginfod-Remove-unused-variable.patch \ |
25 | file://0001-srcfiles-fix-unused-variable-BUFFER_SIZE.patch \ | ||
25 | " | 26 | " |
26 | SRC_URI:append:libc-musl = " \ | 27 | SRC_URI:append:libc-musl = " \ |
27 | file://0003-musl-utils.patch \ | 28 | 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 @@ | |||
1 | From db51a55a8e3811d19265bf12d2ff715c6cf558b4 Mon Sep 17 00:00:00 2001 | ||
2 | From: Jose Quaresma <jose.quaresma@foundries.io> | ||
3 | Date: Tue, 19 Mar 2024 10:17:59 +0000 | ||
4 | Subject: [PATCH] srcfiles: fix unused variable BUFFER_SIZE | ||
5 | |||
6 | The const variable BUFFER_SIZE is used only on the zip_files | ||
7 | function witch is only available with LIBARCHIVE. | ||
8 | |||
9 | | ../../elfutils-0.191/src/srcfiles.cxx:81:18: error: unused variable 'BUFFER_SIZE' [-Werror,-Wunused-const-variable] | ||
10 | | 81 | constexpr size_t BUFFER_SIZE = 8192; | ||
11 | | | ^~~~~~~~~~~ | ||
12 | |||
13 | Upstream-Status: Backport [https://sourceware.org/git/?p=elfutils.git;a=commitdiff;h=ef8a4b841aaf26326b8961a651dbe915d54d23e7] | ||
14 | |||
15 | Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io> | ||
16 | --- | ||
17 | src/srcfiles.cxx | 2 ++ | ||
18 | 1 file changed, 2 insertions(+) | ||
19 | |||
20 | diff --git a/src/srcfiles.cxx b/src/srcfiles.cxx | ||
21 | index 892737cc..09d50f8d 100644 | ||
22 | --- a/src/srcfiles.cxx | ||
23 | +++ b/src/srcfiles.cxx | ||
24 | @@ -78,7 +78,9 @@ ARGP_PROGRAM_VERSION_HOOK_DEF = print_version; | ||
25 | /* Bug report address. */ | ||
26 | ARGP_PROGRAM_BUG_ADDRESS_DEF = PACKAGE_BUGREPORT; | ||
27 | |||
28 | +#ifdef HAVE_LIBARCHIVE | ||
29 | constexpr size_t BUFFER_SIZE = 8192; | ||
30 | +#endif | ||
31 | |||
32 | /* Definitions of arguments for argp functions. */ | ||
33 | static const struct argp_option options[] = | ||
34 | -- | ||
35 | 2.44.0 | ||
36 | |||