summaryrefslogtreecommitdiff
path: root/poky/meta/recipes-devtools/elfutils
diff options
context:
space:
mode:
Diffstat (limited to 'poky/meta/recipes-devtools/elfutils')
-rw-r--r--poky/meta/recipes-devtools/elfutils/elfutils_0.185.bb (renamed from poky/meta/recipes-devtools/elfutils/elfutils_0.183.bb)12
-rw-r--r--poky/meta/recipes-devtools/elfutils/files/0001-add-support-for-ipkg-to-debuginfod.cxx.patch33
-rw-r--r--poky/meta/recipes-devtools/elfutils/files/0001-debuginfod-debuginfod-client.c-correct-string-format.patch63
-rw-r--r--poky/meta/recipes-devtools/elfutils/files/0002-musl-libs.patch4
-rw-r--r--poky/meta/recipes-devtools/elfutils/files/0003-musl-utils.patch8
-rw-r--r--poky/meta/recipes-devtools/elfutils/files/0004-Fix-error-on-musl.patch4
-rw-r--r--poky/meta/recipes-devtools/elfutils/files/0015-config-eu.am-do-not-use-Werror.patch16
7 files changed, 86 insertions, 54 deletions
diff --git a/poky/meta/recipes-devtools/elfutils/elfutils_0.183.bb b/poky/meta/recipes-devtools/elfutils/elfutils_0.185.bb
index c0833686d..b1ffbc18b 100644
--- a/poky/meta/recipes-devtools/elfutils/elfutils_0.183.bb
+++ b/poky/meta/recipes-devtools/elfutils/elfutils_0.185.bb
@@ -21,7 +21,7 @@ SRC_URI = "https://sourceware.org/elfutils/ftp/${PV}/${BP}.tar.bz2 \
file://run-ptest \
file://ptest.patch \
file://0001-tests-Makefile.am-compile-test_nlist-with-standard-C.patch \
- file://0001-add-support-for-ipkg-to-debuginfod.cxx.patch \
+ file://0001-debuginfod-debuginfod-client.c-correct-string-format.patch \
"
SRC_URI_append_libc-musl = " \
file://0002-musl-libs.patch \
@@ -29,7 +29,7 @@ SRC_URI_append_libc-musl = " \
file://0004-Fix-error-on-musl.patch \
file://0015-config-eu.am-do-not-use-Werror.patch \
"
-SRC_URI[sha256sum] = "c3637c208d309d58714a51e61e63f1958808fead882e9b607506a29e5474f2c5"
+SRC_URI[sha256sum] = "dc8d3e74ab209465e7f568e1b3bb9a5a142f8656e2b57d10049a73da2ae6b5a6"
inherit autotools gettext ptest pkgconfig
@@ -38,13 +38,13 @@ EXTRA_OECONF = "--program-prefix=eu-"
DEPENDS_BZIP2 = "bzip2-replacement-native"
DEPENDS_BZIP2_class-target = "bzip2"
-PACKAGECONFIG ??= ""
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'debuginfod', 'debuginfod libdebuginfod', '', d)}"
PACKAGECONFIG[bzip2] = "--with-bzlib,--without-bzlib,${DEPENDS_BZIP2}"
PACKAGECONFIG[xz] = "--with-lzma,--without-lzma,xz"
PACKAGECONFIG[libdebuginfod] = "--enable-libdebuginfod,--disable-libdebuginfod,curl"
PACKAGECONFIG[debuginfod] = "--enable-debuginfod,--disable-debuginfod,libarchive sqlite3 libmicrohttpd"
-RDEPENDS_${PN}-ptest += "libasm libelf bash make coreutils ${PN}-binutils"
+RDEPENDS_${PN}-ptest += "libasm libelf bash make coreutils ${PN}-binutils iproute2-ss bsdtar"
EXTRA_OECONF_append_class-target = " --disable-tests-rpath"
@@ -86,6 +86,7 @@ do_install_ptest() {
cp -r ${B}/tests/* ${D}${PTEST_PATH}/tests
cp -r ${B}/config.h ${D}${PTEST_PATH}
cp -r ${B}/backends ${D}${PTEST_PATH}
+ cp -r ${B}/debuginfod ${D}${PTEST_PATH}
sed -i '/^Makefile:/c Makefile:' ${D}${PTEST_PATH}/tests/Makefile
find ${D}${PTEST_PATH} -type f -name *.[hoc] | xargs -i rm {}
fi
@@ -142,6 +143,7 @@ INHIBIT_PACKAGE_STRIP_FILES = "\
${PKGD}${PTEST_PATH}/tests/backtrace-data \
${PKGD}${PTEST_PATH}/tests/backtrace-dwarf \
${PKGD}${PTEST_PATH}/tests/deleted \
+ ${PKGD}${PTEST_PATH}/tests/dwfllines \
${PKGD}${PTEST_PATH}/src/strip \
${PKGD}${PTEST_PATH}/src/addr2line \
${PKGD}${PTEST_PATH}/src/elfcmp \
@@ -159,4 +161,4 @@ INHIBIT_PACKAGE_STRIP_FILES = "\
${PKGD}${PTEST_PATH}/backends/libebl_x86_64.so \
"
-PRIVATE_LIBS_${PN}-ptest = "libdw.so.1 libelf.so.1 libasm.so.1"
+PRIVATE_LIBS_${PN}-ptest = "libdw.so.1 libelf.so.1 libasm.so.1 libdebuginfod.so.1"
diff --git a/poky/meta/recipes-devtools/elfutils/files/0001-add-support-for-ipkg-to-debuginfod.cxx.patch b/poky/meta/recipes-devtools/elfutils/files/0001-add-support-for-ipkg-to-debuginfod.cxx.patch
deleted file mode 100644
index 5f82afef0..000000000
--- a/poky/meta/recipes-devtools/elfutils/files/0001-add-support-for-ipkg-to-debuginfod.cxx.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 571416bf5b5ef319df6d9c79e46680920487e4a7 Mon Sep 17 00:00:00 2001
-From: dorindabassey <dorindabassey@gmail.com>
-Date: Sat, 19 Dec 2020 01:11:46 +0100
-Subject: [PATCH] add support for ipkg to debuginfod.cxx
-
-added support for ipkg to the debuginfod scanner. 0.182 only supports RPM and scan .debs, with this patch, debuginfod scanner would be able to scan .ipk
-
-Upstream-status: Submitted [https://sourceware.org/pipermail/elfutils-devel/2020q4/003357.html]
-
-Signed-off-by: dorindabassey <dorindabassey@gmail.com>
-
----
- debuginfod/debuginfod.cxx | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/debuginfod/debuginfod.cxx b/debuginfod/debuginfod.cxx
-index b34eacc..a8915f2 100644
---- a/debuginfod/debuginfod.cxx
-+++ b/debuginfod/debuginfod.cxx
-@@ -484,11 +484,13 @@ parse_opt (int key, char *arg,
- {
- scan_archives[".deb"]="dpkg-deb --fsys-tarfile";
- scan_archives[".ddeb"]="dpkg-deb --fsys-tarfile";
-+ scan_archives[".ipk"]="dpkg-deb --fsys-tarfile";
- }
- else
- {
- scan_archives[".deb"]="(bsdtar -O -x -f - data.tar.xz)<";
- scan_archives[".ddeb"]="(bsdtar -O -x -f - data.tar.xz)<";
-+ scan_archives[".ipk"]="(bsdtar -O -x -f - data.tar.xz)<";
- }
- // .udeb too?
- break;
diff --git a/poky/meta/recipes-devtools/elfutils/files/0001-debuginfod-debuginfod-client.c-correct-string-format.patch b/poky/meta/recipes-devtools/elfutils/files/0001-debuginfod-debuginfod-client.c-correct-string-format.patch
new file mode 100644
index 000000000..5b225c532
--- /dev/null
+++ b/poky/meta/recipes-devtools/elfutils/files/0001-debuginfod-debuginfod-client.c-correct-string-format.patch
@@ -0,0 +1,63 @@
+From c3055ce9eb32d0d24abc5cea5e1d231c499312a7 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Mon, 19 Apr 2021 23:29:10 +0200
+Subject: [PATCH] debuginfod/debuginfod-client.c: correct string format on
+ 32bit arches with 64bit time_t
+
+Use intmax_t to print time_t
+
+time_t is platform dependent and some of architectures e.g.
+x32, riscv32, arc use 64bit time_t even while they are 32bit
+architectures, therefore directly using integer printf formats will not
+work portably, use intmax_t to typecast time_t into printf family of
+functions
+
+Upstream-Status: Pending
+
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+---
+ debuginfod/debuginfod-client.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/debuginfod/debuginfod-client.c b/debuginfod/debuginfod-client.c
+index ee7eda2..083ec2c 100644
+--- a/debuginfod/debuginfod-client.c
++++ b/debuginfod/debuginfod-client.c
+@@ -226,7 +226,7 @@ debuginfod_config_cache(char *config_path,
+ if (fd < 0)
+ return -errno;
+
+- if (dprintf(fd, "%ld", cache_config_default_s) < 0)
++ if (dprintf(fd, "%jd", (intmax_t)cache_config_default_s) < 0)
+ return -errno;
+ }
+
+@@ -234,7 +234,7 @@ debuginfod_config_cache(char *config_path,
+ FILE *config_file = fopen(config_path, "r");
+ if (config_file)
+ {
+- if (fscanf(config_file, "%ld", &cache_config) != 1)
++ if (fscanf(config_file, "%jd", (intmax_t*)(&cache_config)) != 1)
+ cache_config = cache_config_default_s;
+ fclose(config_file);
+ }
+@@ -267,7 +267,7 @@ debuginfod_init_cache (char *cache_path, char *interval_path, char *maxage_path)
+ if (fd < 0)
+ return -errno;
+
+- if (dprintf(fd, "%ld", cache_clean_default_interval_s) < 0)
++ if (dprintf(fd, "%jd", (intmax_t)cache_clean_default_interval_s) < 0)
+ return -errno;
+
+ /* init max age config file. */
+@@ -275,7 +275,7 @@ debuginfod_init_cache (char *cache_path, char *interval_path, char *maxage_path)
+ && (fd = open(maxage_path, O_CREAT | O_RDWR, DEFFILEMODE)) < 0)
+ return -errno;
+
+- if (dprintf(fd, "%ld", cache_default_max_unused_age_s) < 0)
++ if (dprintf(fd, "%jd", (intmax_t)cache_default_max_unused_age_s) < 0)
+ return -errno;
+
+ return 0;
diff --git a/poky/meta/recipes-devtools/elfutils/files/0002-musl-libs.patch b/poky/meta/recipes-devtools/elfutils/files/0002-musl-libs.patch
index b373940d3..c7360da7a 100644
--- a/poky/meta/recipes-devtools/elfutils/files/0002-musl-libs.patch
+++ b/poky/meta/recipes-devtools/elfutils/files/0002-musl-libs.patch
@@ -1,4 +1,4 @@
-From 18c527991deee93170a887b6da622560d5606913 Mon Sep 17 00:00:00 2001
+From 0f4667f0bb4b000d74ade07e90bd690b7217a19d Mon Sep 17 00:00:00 2001
From: Hongxu Jia <hongxu.jia@windriver.com>
Date: Fri, 23 Aug 2019 10:18:47 +0800
Subject: [PATCH] musl-libs
@@ -82,7 +82,7 @@ index ecb4d01..edc85e3 100644
#include <stdint.h>
diff --git a/libdwfl/linux-kernel-modules.c b/libdwfl/linux-kernel-modules.c
-index 6edb27f..f331e3c 100644
+index c0f8dfa..aa78033 100644
--- a/libdwfl/linux-kernel-modules.c
+++ b/libdwfl/linux-kernel-modules.c
@@ -50,6 +50,7 @@
diff --git a/poky/meta/recipes-devtools/elfutils/files/0003-musl-utils.patch b/poky/meta/recipes-devtools/elfutils/files/0003-musl-utils.patch
index 65593be32..2e379cdba 100644
--- a/poky/meta/recipes-devtools/elfutils/files/0003-musl-utils.patch
+++ b/poky/meta/recipes-devtools/elfutils/files/0003-musl-utils.patch
@@ -1,4 +1,4 @@
-From 2dab1a02a3cfd80629f3e0f380805a5e58dd0ac3 Mon Sep 17 00:00:00 2001
+From 2f94d488bf3daaa6a8548ee77120fc2506a9bbe3 Mon Sep 17 00:00:00 2001
From: Hongxu Jia <hongxu.jia@windriver.com>
Date: Fri, 23 Aug 2019 10:19:48 +0800
Subject: [PATCH] musl-utils
@@ -39,7 +39,7 @@ index e117166..8326f6c 100644
/* State of -D/-U flags. */
extern bool arlib_deterministic_output;
diff --git a/src/elfcompress.c b/src/elfcompress.c
-index 1b5b1e3..21c9024 100644
+index 2c6d91b..608646e 100644
--- a/src/elfcompress.c
+++ b/src/elfcompress.c
@@ -37,6 +37,13 @@
@@ -57,7 +57,7 @@ index 1b5b1e3..21c9024 100644
ARGP_PROGRAM_VERSION_HOOK_DEF = print_version;
diff --git a/src/strip.c b/src/strip.c
-index 7a5d4e4..81a0d57 100644
+index 70fc8c0..d035d9e 100644
--- a/src/strip.c
+++ b/src/strip.c
@@ -46,6 +46,13 @@
@@ -75,7 +75,7 @@ index 7a5d4e4..81a0d57 100644
/* Name and version of program. */
diff --git a/src/unstrip.c b/src/unstrip.c
-index 8580329..d547487 100644
+index e488e81..0e44456 100644
--- a/src/unstrip.c
+++ b/src/unstrip.c
@@ -52,6 +52,15 @@
diff --git a/poky/meta/recipes-devtools/elfutils/files/0004-Fix-error-on-musl.patch b/poky/meta/recipes-devtools/elfutils/files/0004-Fix-error-on-musl.patch
index 8e1e97041..2fa60c333 100644
--- a/poky/meta/recipes-devtools/elfutils/files/0004-Fix-error-on-musl.patch
+++ b/poky/meta/recipes-devtools/elfutils/files/0004-Fix-error-on-musl.patch
@@ -1,4 +1,4 @@
-From ce3b1403bd88261b5461a9dcb7d6d6be9185703e Mon Sep 17 00:00:00 2001
+From 72819106d0e5666d172d39c24c19e4e7a3b8be0e Mon Sep 17 00:00:00 2001
From: Richard Purdie <richard.purdie@linuxfoundation.org>
Date: Wed, 1 May 2019 22:15:03 +0100
Subject: [PATCH] Fix error on musl:
@@ -19,7 +19,7 @@ Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
1 file changed, 5 insertions(+)
diff --git a/tests/elfstrmerge.c b/tests/elfstrmerge.c
-index abbdf3f..bd90f4d 100644
+index 197c6a5..3683672 100644
--- a/tests/elfstrmerge.c
+++ b/tests/elfstrmerge.c
@@ -33,6 +33,11 @@
diff --git a/poky/meta/recipes-devtools/elfutils/files/0015-config-eu.am-do-not-use-Werror.patch b/poky/meta/recipes-devtools/elfutils/files/0015-config-eu.am-do-not-use-Werror.patch
index 205362626..5cd6fffc2 100644
--- a/poky/meta/recipes-devtools/elfutils/files/0015-config-eu.am-do-not-use-Werror.patch
+++ b/poky/meta/recipes-devtools/elfutils/files/0015-config-eu.am-do-not-use-Werror.patch
@@ -1,4 +1,4 @@
-From dfe11e043cd8ea0b0f0252bcff9f5a6b98c0ecd3 Mon Sep 17 00:00:00 2001
+From cfced441d4a6f2eca51d29c52240275bd6f54e49 Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Mon, 22 Jun 2020 21:35:16 +0000
Subject: [PATCH] config/eu.am: do not use -Werror
@@ -16,22 +16,22 @@ Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
1 file changed, 2 deletions(-)
diff --git a/config/eu.am b/config/eu.am
-index 6c3c444..3bc0dc9 100644
+index 2c3e457..8fb0411 100644
--- a/config/eu.am
+++ b/config/eu.am
-@@ -73,7 +73,6 @@ AM_CFLAGS = -std=gnu99 -Wall -Wshadow -Wformat=2 \
- -Wold-style-definition -Wstrict-prototypes -Wtrampolines \
+@@ -89,7 +89,6 @@ AM_CFLAGS = -std=gnu99 -Wall -Wshadow -Wformat=2 \
+ -Wold-style-definition -Wstrict-prototypes $(TRAMPOLINES_WARNING) \
$(LOGICAL_OP_WARNING) $(DUPLICATED_COND_WARNING) \
$(NULL_DEREFERENCE_WARNING) $(IMPLICIT_FALLTHROUGH_WARNING) \
- $(if $($(*F)_no_Werror),,-Werror) \
$(if $($(*F)_no_Wunused),,-Wunused -Wextra) \
$(if $($(*F)_no_Wstack_usage),,$(STACK_USAGE_WARNING)) \
- $(if $($(*F)_no_Wpacked_not_aligned),-Wno-packed-not-aligned,) \
-@@ -83,7 +82,6 @@ AM_CXXFLAGS = -std=c++11 -Wall -Wshadow \
- -Wtrampolines \
+ $(if $($(*F)_no_Wpacked_not_aligned),$(NO_PACKED_NOT_ALIGNED_WARNING),) \
+@@ -99,7 +98,6 @@ AM_CXXFLAGS = -std=c++11 -Wall -Wshadow \
+ $(TRAMPOLINES_WARNING) \
$(LOGICAL_OP_WARNING) $(DUPLICATED_COND_WARNING) \
$(NULL_DEREFERENCE_WARNING) $(IMPLICIT_FALLTHROUGH_WARNING) \
- $(if $($(*F)_no_Werror),,-Werror) \
$(if $($(*F)_no_Wunused),,-Wunused -Wextra) \
$(if $($(*F)_no_Wstack_usage),,$(STACK_USAGE_WARNING)) \
- $(if $($(*F)_no_Wpacked_not_aligned),-Wno-packed-not-aligned,) \
+ $(if $($(*F)_no_Wpacked_not_aligned),$(NO_PACKED_NOT_ALIGNED_WARNING),) \