diff options
Diffstat (limited to 'meta/recipes-devtools/elfutils/files')
19 files changed, 154 insertions, 583 deletions
diff --git a/meta/recipes-devtools/elfutils/files/0001-debuginfod-Remove-unused-variable.patch b/meta/recipes-devtools/elfutils/files/0001-debuginfod-Remove-unused-variable.patch new file mode 100644 index 0000000000..81f49dbf21 --- /dev/null +++ b/meta/recipes-devtools/elfutils/files/0001-debuginfod-Remove-unused-variable.patch @@ -0,0 +1,34 @@ +From c3502140e51886bffc6ae5cd256308e40e0cbb78 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Sat, 9 Mar 2024 15:52:32 -0800 +Subject: [PATCH] debuginfod: Remove unused variable + +Recent commit acd9525e9 has removed all references to max_fds +therefore remove it, moreover clang18 is happier + +| ../../elfutils-0.191/debuginfod/debuginfod.cxx:1448:8: error: private field 'max_fds' is not used [-Werror,-Wunused-private-field] +| 1448 | long max_fds; +| | ^ +| 1 error generated. + +Upstream-Status: Submitted [https://sourceware.org/pipermail/elfutils-devel/2024q1/006900.html] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + debuginfod/debuginfod.cxx | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/debuginfod/debuginfod.cxx b/debuginfod/debuginfod.cxx +index 560880f2..72617848 100644 +--- a/debuginfod/debuginfod.cxx ++++ b/debuginfod/debuginfod.cxx +@@ -1445,7 +1445,6 @@ private: + + map<key,fdcache_entry> entries; // optimized for lookup + time_t last_cleaning; +- long max_fds; + long max_mbs; + + public: +-- +2.44.0 + diff --git a/meta/recipes-devtools/elfutils/files/0001-dso-link-change.patch b/meta/recipes-devtools/elfutils/files/0001-dso-link-change.patch index 62031073e3..4f7539bef2 100644 --- a/meta/recipes-devtools/elfutils/files/0001-dso-link-change.patch +++ b/meta/recipes-devtools/elfutils/files/0001-dso-link-change.patch @@ -1,4 +1,4 @@ -From ec9a7742734aae5417c0ebbffce66ac353e6cae7 Mon Sep 17 00:00:00 2001 +From 63070df4b0dc7af37a720915b5e6494204463c9a Mon Sep 17 00:00:00 2001 From: Hongxu Jia <hongxu.jia@windriver.com> Date: Tue, 15 Aug 2017 17:10:57 +0800 Subject: [PATCH] dso link change @@ -16,31 +16,30 @@ more details. Rebase to 0.170 Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> - --- src/Makefile.am | 2 +- tests/Makefile.am | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am -index e462e7d..ea1215b 100644 +index 1d592d4..853eda4 100644 --- a/src/Makefile.am +++ b/src/Makefile.am -@@ -45,7 +45,7 @@ libdw = ../libdw/libdw.a -lz $(zip_LIBS) $(libelf) -ldl -lpthread - libelf = ../libelf/libelf.a -lz +@@ -50,7 +50,7 @@ libdebuginfod = + endif else libasm = ../libasm/libasm.so -libdw = ../libdw/libdw.so +libdw = ../libdw/libdw.so $(zip_LIBS) $(libelf) $(libebl) -ldl libelf = ../libelf/libelf.so - endif - libebl = ../libebl/libebl.a ../backends/libebl_backends.a ../libcpu/libcpu.a + if LIBDEBUGINFOD + libdebuginfod = ../debuginfod/libdebuginfod.so diff --git a/tests/Makefile.am b/tests/Makefile.am -index eab4ae6..f59a01f 100644 +index 9141074..ee49d07 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am -@@ -516,7 +516,7 @@ libdw = ../libdw/libdw.a -lz $(zip_LIBS) $(libelf) $(libebl) -ldl -lpthread - libelf = ../libelf/libelf.a -lz +@@ -694,7 +694,7 @@ libdw = ../libdw/libdw.a -lz $(zip_LIBS) $(libelf) $(libebl) -ldl -lpthread + libelf = ../libelf/libelf.a -lz $(zstd_LIBS) libasm = ../libasm/libasm.a else -libdw = ../libdw/libdw.so diff --git a/meta/recipes-devtools/elfutils/files/0001-libasm-may-link-with-libbz2-if-found.patch b/meta/recipes-devtools/elfutils/files/0001-libasm-may-link-with-libbz2-if-found.patch index 73ead6d412..a9f5e030fc 100644 --- a/meta/recipes-devtools/elfutils/files/0001-libasm-may-link-with-libbz2-if-found.patch +++ b/meta/recipes-devtools/elfutils/files/0001-libasm-may-link-with-libbz2-if-found.patch @@ -1,4 +1,4 @@ -From 8e5fff8b1d819e0870fb22b27950bb5f10c7a272 Mon Sep 17 00:00:00 2001 +From 46d9d889a07fc9f9f089f800e5c0e895889c44ae Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Wed, 4 Oct 2017 22:30:46 -0700 Subject: [PATCH] libasm may link with libbz2 if found @@ -11,26 +11,29 @@ where indirect libraries may be not found by linker Upstream-Status: Pending Signed-off-by: Khem Raj <raj.khem@gmail.com> - --- src/Makefile.am | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am -index ea1215b..13d9bda 100644 +index 853eda4..da7f3b4 100644 --- a/src/Makefile.am +++ b/src/Makefile.am -@@ -40,11 +40,11 @@ EXTRA_DIST += make-debug-archive.in +@@ -40,7 +40,7 @@ EXTRA_DIST += make-debug-archive.in CLEANFILES += make-debug-archive if BUILD_STATIC -libasm = ../libasm/libasm.a +libasm = ../libasm/libasm.a $(zip_LIBS) libdw = ../libdw/libdw.a -lz $(zip_LIBS) $(libelf) -ldl -lpthread - libelf = ../libelf/libelf.a -lz + libelf = ../libelf/libelf.a -lz $(zstd_LIBS) + if LIBDEBUGINFOD +@@ -49,7 +49,7 @@ else + libdebuginfod = + endif else -libasm = ../libasm/libasm.so +libasm = ../libasm/libasm.so $(zip_LIBS) libdw = ../libdw/libdw.so $(zip_LIBS) $(libelf) $(libebl) -ldl libelf = ../libelf/libelf.so - endif + if LIBDEBUGINFOD diff --git a/meta/recipes-devtools/elfutils/files/0001-libelf-elf_end.c-check-data_list.data.d.d_buf-before.patch b/meta/recipes-devtools/elfutils/files/0001-libelf-elf_end.c-check-data_list.data.d.d_buf-before.patch index b26ed99f65..57e4b3890a 100644 --- a/meta/recipes-devtools/elfutils/files/0001-libelf-elf_end.c-check-data_list.data.d.d_buf-before.patch +++ b/meta/recipes-devtools/elfutils/files/0001-libelf-elf_end.c-check-data_list.data.d.d_buf-before.patch @@ -1,4 +1,4 @@ -From e571cbd0c20085ec71969971f19280b5de95cfb7 Mon Sep 17 00:00:00 2001 +From 19d9e9d838e74e4a0a22f08ae03167380f8aa490 Mon Sep 17 00:00:00 2001 From: Robert Yang <liezhi.yang@windriver.com> Date: Thu, 16 Aug 2018 09:58:26 +0800 Subject: [PATCH] libelf/elf_end.c: check data_list.data.d.d_buf before free it @@ -14,16 +14,15 @@ The segmentation fault happens when prelink call elf_end(). Upstream-Status: Submitted [https://sourceware.org/ml/elfutils-devel/2018-q3/msg00085.html] Signed-off-by: Robert Yang <liezhi.yang@windriver.com> - --- libelf/elf_end.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libelf/elf_end.c b/libelf/elf_end.c -index 160f0b8..5280a70 100644 +index 80f4d13..b103959 100644 --- a/libelf/elf_end.c +++ b/libelf/elf_end.c -@@ -160,14 +160,16 @@ elf_end (Elf *elf) +@@ -169,14 +169,16 @@ elf_end (Elf *elf) architecture doesn't require overly stringent alignment the raw data buffer is the same as the one used for presenting to the caller. */ diff --git a/meta/recipes-devtools/elfutils/files/0001-musl-obstack-fts.patch b/meta/recipes-devtools/elfutils/files/0001-musl-obstack-fts.patch deleted file mode 100644 index 2450b0d6b8..0000000000 --- a/meta/recipes-devtools/elfutils/files/0001-musl-obstack-fts.patch +++ /dev/null @@ -1,124 +0,0 @@ -From 1ec7b2208803e0fbdcbe6c07b849e7dc4d9fa8a2 Mon Sep 17 00:00:00 2001 -From: Hongxu Jia <hongxu.jia@windriver.com> -Date: Fri, 23 Aug 2019 10:17:25 +0800 -Subject: [PATCH] musl-obstack-fts - -Look for libfts and libobstack during configure, these -libraries are external to libc when using musl, whereas -on glibc these libraries are provided in libc itself. - -Signed-off-by: Khem Raj <raj.khem@gmail.com> -Upstream-Status: Inappropriate [workaround for musl] - -Rebase to 0.177 -Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> - ---- - configure.ac | 54 +++++++++++++++++++++++++++++++++++++++++++++++ - libdw/Makefile.am | 2 +- - src/Makefile.am | 6 +++--- - 3 files changed, 58 insertions(+), 4 deletions(-) - -diff --git a/configure.ac b/configure.ac -index e9649c2..03643c8 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -538,6 +538,60 @@ else - fi - AC_SUBST([argp_LDADD]) - -+dnl Check if we have fts available from our libc -+AC_LINK_IFELSE( -+ [AC_LANG_PROGRAM( -+ [#if !defined(__x86_64__) -+ #undef _FILE_OFFSET_BITS -+ #define _FILE_OFFSET_BITS 32 -+ #endif -+ #include <fts.h>], -+ [FTS* fts = 0; return fts_close(fts); return 0;] -+ )], -+ [libc_has_fts="true"], -+ [libc_has_fts="false"] -+) -+ -+dnl If our libc doesn't provide fts, then test for libfts -+if test "$libc_has_fts" = "false" ; then -+ AC_MSG_WARN("libc does not have fts") -+ AC_CHECK_LIB([fts], [fts_close], [have_fts="true"], [have_fts="false"]) -+ -+ if test "$have_fts" = "false"; then -+ AC_MSG_ERROR("no libfts found") -+ else -+ fts_LDADD="-lfts" -+ fi -+else -+ fts_LDADD="" -+fi -+AC_SUBST([fts_LDADD]) -+ -+dnl Check if we have obstack available from our libc -+AC_LINK_IFELSE( -+ [AC_LANG_PROGRAM( -+ [#include <obstack.h>], -+ [_obstack_begin(0, 0, 0, NULL, NULL); return 0;] -+ )], -+ [libc_has_obstack="true"], -+ [libc_has_obstack="false"] -+) -+ -+dnl If our libc doesn't provide obstack, then test for libobstack -+if test "$libc_has_obstack" = "false" ; then -+ AC_MSG_WARN("libc does not have obstack") -+ AC_CHECK_LIB([obstack], [_obstack_begin], [have_obstack="true"], [have_obstack="false"]) -+ -+ if test "$have_obstack" = "false"; then -+ AC_MSG_ERROR("no libobstack found") -+ else -+ obstack_LDADD="-lobstack" -+ fi -+else -+ obstack_LDADD="" -+fi -+AC_SUBST([obstack_LDADD]) -+ - dnl The directories with content. - - dnl Documentation. -diff --git a/libdw/Makefile.am b/libdw/Makefile.am -index 33b5838..ff92e02 100644 ---- a/libdw/Makefile.am -+++ b/libdw/Makefile.am -@@ -109,7 +109,7 @@ libdw_so_LIBS = ../libebl/libebl_pic.a ../backends/libebl_backends_pic.a \ - ../libcpu/libcpu_pic.a libdw_pic.a ../libdwelf/libdwelf_pic.a \ - ../libdwfl/libdwfl_pic.a - libdw_so_DEPS = ../lib/libeu.a ../libelf/libelf.so --libdw_so_LDLIBS = $(libdw_so_DEPS) -ldl -lz $(argp_LDADD) $(zip_LIBS) -pthread -+libdw_so_LDLIBS = $(libdw_so_DEPS) -ldl -lz $(argp_LDADD) $(fts_LDADD) $(zip_LIBS) -pthread - libdw_so_SOURCES = - libdw.so$(EXEEXT): $(srcdir)/libdw.map $(libdw_so_LIBS) $(libdw_so_DEPS) - $(AM_V_CCLD)$(LINK) $(dso_LDFLAGS) -o $@ \ -diff --git a/src/Makefile.am b/src/Makefile.am -index 13d9bda..d5a4f7d 100644 ---- a/src/Makefile.am -+++ b/src/Makefile.am -@@ -69,7 +69,7 @@ ar_no_Wstack_usage = yes - unstrip_no_Wstack_usage = yes - - readelf_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(argp_LDADD) --nm_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(argp_LDADD) \ -+nm_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(argp_LDADD) $(obstack_LDADD) \ - $(demanglelib) - size_LDADD = $(libelf) $(libeu) $(argp_LDADD) - strip_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) $(argp_LDADD) -@@ -78,9 +78,9 @@ findtextrel_LDADD = $(libdw) $(libelf) $(libeu) $(argp_LDADD) - addr2line_LDADD = $(libdw) $(libelf) $(libeu) $(argp_LDADD) $(demanglelib) - elfcmp_LDADD = $(libebl) $(libdw) $(libelf) $(libeu) $(argp_LDADD) - objdump_LDADD = $(libasm) $(libebl) $(libdw) $(libelf) $(libeu) $(argp_LDADD) --ranlib_LDADD = libar.a $(libelf) $(libeu) $(argp_LDADD) -+ranlib_LDADD = libar.a $(libelf) $(libeu) $(argp_LDADD) $(obstack_LDADD) - strings_LDADD = $(libelf) $(libeu) $(argp_LDADD) --ar_LDADD = libar.a $(libelf) $(libeu) $(argp_LDADD) -+ar_LDADD = libar.a $(libelf) $(libeu) $(argp_LDADD) $(obstack_LDADD) - unstrip_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) $(argp_LDADD) - stack_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) $(argp_LDADD) $(demanglelib) - elfcompress_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) $(argp_LDADD) diff --git a/meta/recipes-devtools/elfutils/files/0001-ppc_initreg.c-Incliude-asm-ptrace.h-for-pt_regs-defi.patch b/meta/recipes-devtools/elfutils/files/0001-ppc_initreg.c-Incliude-asm-ptrace.h-for-pt_regs-defi.patch deleted file mode 100644 index 3303333c45..0000000000 --- a/meta/recipes-devtools/elfutils/files/0001-ppc_initreg.c-Incliude-asm-ptrace.h-for-pt_regs-defi.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 2e2232d0935bf8ef6e66ebffba3be68a73b5b3e5 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Sun, 8 Sep 2019 15:57:59 -0700 -Subject: [PATCH] ppc_initreg.c: Incliude asm/ptrace.h for pt_regs definition - -Fixes -| ../../elfutils-0.176/backends/ppc_initreg.c:79:22: error: field 'r' has incomplete type -| struct pt_regs r; -| ^ - -Upstream-Status: Pending - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - backends/ppc_initreg.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/backends/ppc_initreg.c b/backends/ppc_initreg.c -index 0e0d359..e5cca7e 100644 ---- a/backends/ppc_initreg.c -+++ b/backends/ppc_initreg.c -@@ -33,6 +33,7 @@ - #include <stdlib.h> - #if defined(__powerpc__) && defined(__linux__) - # include <sys/ptrace.h> -+# include <asm/ptrace.h> - # include <sys/user.h> - #endif - --- -2.23.0 - diff --git a/meta/recipes-devtools/elfutils/files/0001-skip-the-test-when-gcc-not-deployed.patch b/meta/recipes-devtools/elfutils/files/0001-skip-the-test-when-gcc-not-deployed.patch index de8c05f11e..096361e215 100644 --- a/meta/recipes-devtools/elfutils/files/0001-skip-the-test-when-gcc-not-deployed.patch +++ b/meta/recipes-devtools/elfutils/files/0001-skip-the-test-when-gcc-not-deployed.patch @@ -1,12 +1,12 @@ -From e82a055f85e398cb03a4eaf5faf351a3a1f19344 Mon Sep 17 00:00:00 2001 +From f9ab54454000fd210dbaa92cf516084d05060f9d Mon Sep 17 00:00:00 2001 From: Mingli Yu <Mingli.Yu@windriver.com> Date: Tue, 21 May 2019 15:20:34 +0800 -Subject: [PATCH v2] skip the test when gcc not deployed +Subject: [PATCH] skip the test when gcc not deployed Skip the tests which depend on gcc when gcc not deployed. -Upstream-Status: Submitted[https://sourceware.org/ml/elfutils-devel/2019-q2/msg00091.html] +Upstream-Status: Submitted [https://sourceware.org/ml/elfutils-devel/2019-q2/msg00091.html] Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com> --- @@ -17,7 +17,7 @@ Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com> 4 files changed, 8 insertions(+) diff --git a/tests/run-disasm-x86-64.sh b/tests/run-disasm-x86-64.sh -index a6be62b..c3ef238 100755 +index 07b612b..7a32996 100755 --- a/tests/run-disasm-x86-64.sh +++ b/tests/run-disasm-x86-64.sh @@ -22,6 +22,8 @@ case "`uname -m`" in @@ -26,11 +26,11 @@ index a6be62b..c3ef238 100755 testfiles testfile45.S testfile45.expect + # skip the case if no gcc deployed + which gcc || exit 77 - gcc -m64 -c -o testfile45.o testfile45.S + ${CC} -m64 -c -o testfile45.o testfile45.S testrun_compare ${abs_top_builddir}/src/objdump -d testfile45.o < testfile45.expect ;; diff --git a/tests/run-disasm-x86.sh b/tests/run-disasm-x86.sh -index 28a3df7..544fc28 100755 +index 7ac73ad..f0d4796 100755 --- a/tests/run-disasm-x86.sh +++ b/tests/run-disasm-x86.sh @@ -22,6 +22,8 @@ case "`uname -m`" in @@ -39,11 +39,11 @@ index 28a3df7..544fc28 100755 testfiles testfile44.S testfile44.expect + # skip the case if no gcc deployed + which gcc || exit 77 - gcc -m32 -c -o testfile44.o testfile44.S + ${CC} -m32 -c -o testfile44.o testfile44.S testrun_compare ${abs_top_builddir}/src/objdump -d testfile44.o < testfile44.expect ;; diff --git a/tests/run-strip-g.sh b/tests/run-strip-g.sh -index 1303819..a943dec 100755 +index 1592121..9b8157e 100755 --- a/tests/run-strip-g.sh +++ b/tests/run-strip-g.sh @@ -24,6 +24,8 @@ @@ -53,10 +53,10 @@ index 1303819..a943dec 100755 +# skip the test if gcc deployed +which gcc || exit 77 echo Create debug a.out. - echo "int main() { return 1; }" | gcc -g -xc - + echo "int main() { return 1; }" | ${CC} -g -xc - diff --git a/tests/run-strip-nothing.sh b/tests/run-strip-nothing.sh -index 914fdfb..d03f734 100755 +index 710c200..3a81d8e 100755 --- a/tests/run-strip-nothing.sh +++ b/tests/run-strip-nothing.sh @@ -22,6 +22,8 @@ @@ -66,8 +66,5 @@ index 914fdfb..d03f734 100755 +# skip the case if no gcc deployed +which gcc || exit 77 # Create no-debug a.out. - echo "int main() { return 1; }" | gcc -s -xc - + echo "int main() { return 1; }" | ${CC} -s -xc - --- -2.7.4 - 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.quaresma@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.quaresma@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 + diff --git a/meta/recipes-devtools/elfutils/files/0001-tests-Makefile.am-compile-test_nlist-with-standard-C.patch b/meta/recipes-devtools/elfutils/files/0001-tests-Makefile.am-compile-test_nlist-with-standard-C.patch index 481b912387..d410eb13d8 100644 --- a/meta/recipes-devtools/elfutils/files/0001-tests-Makefile.am-compile-test_nlist-with-standard-C.patch +++ b/meta/recipes-devtools/elfutils/files/0001-tests-Makefile.am-compile-test_nlist-with-standard-C.patch @@ -1,4 +1,4 @@ -From 1ca86294ee5454592c9ad855e13080509d8a92d3 Mon Sep 17 00:00:00 2001 +From 2d4dfb814dda02193e49c9203147cf73e6d3f8b7 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin <alex.kanavin@gmail.com> Date: Tue, 23 Jun 2020 07:49:35 +0000 Subject: [PATCH] tests/Makefile.am: compile test_nlist with standard CFLAGS @@ -13,15 +13,15 @@ Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Makefile.am b/tests/Makefile.am -index 8048b69..d2b28a4 100644 +index 3bd8e58..370c6a8 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am -@@ -86,7 +86,7 @@ backtrace-child-biarch$(EXEEXT): backtrace-child.c +@@ -103,7 +103,7 @@ endif test-nlist$(EXEEXT): test-nlist.c $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) \ -- $(test_nlist_CFLAGS) $(test_nlist_LDADD) -o $@ $< -+ $(CFLAGS) $(test_nlist_LDADD) -o $@ $< +- $(test_nlist_CFLAGS) $(GCOV_FLAGS) -o $@ $< $(test_nlist_LDADD) ++ $(CFLAGS) $(GCOV_FLAGS) -o $@ $< $(test_nlist_LDADD) TESTS = run-arextract.sh run-arsymtest.sh run-ar.sh newfile test-nlist \ - update1 update2 update3 update4 \ + run-ar-N.sh \ diff --git a/meta/recipes-devtools/elfutils/files/0002-Fix-elf_cvt_gunhash-if-dest-and-src-are-same.patch b/meta/recipes-devtools/elfutils/files/0002-Fix-elf_cvt_gunhash-if-dest-and-src-are-same.patch index 96c2565e3e..fa2282b8dd 100644 --- a/meta/recipes-devtools/elfutils/files/0002-Fix-elf_cvt_gunhash-if-dest-and-src-are-same.patch +++ b/meta/recipes-devtools/elfutils/files/0002-Fix-elf_cvt_gunhash-if-dest-and-src-are-same.patch @@ -1,4 +1,4 @@ -From f8e4118b60a9b54950437006a82b4047f38f5347 Mon Sep 17 00:00:00 2001 +From d8f07a23d608b744dcc0592f9f32f258b186a77c Mon Sep 17 00:00:00 2001 From: Hongxu Jia <hongxu.jia@windriver.com> Date: Tue, 15 Aug 2017 17:13:59 +0800 Subject: [PATCH] Fix elf_cvt_gunhash if dest and src are same. @@ -12,16 +12,15 @@ Signed-off-by: Baoshan Pang <BaoShan.Pang@windriver.com> Rebase to 0.170 Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> - --- libelf/gnuhash_xlate.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libelf/gnuhash_xlate.h b/libelf/gnuhash_xlate.h -index 6faf113..04d9ca1 100644 +index 3a00ae0..40468fc 100644 --- a/libelf/gnuhash_xlate.h +++ b/libelf/gnuhash_xlate.h -@@ -40,6 +40,7 @@ elf_cvt_gnuhash (void *dest, const void *src, size_t len, int encode) +@@ -42,6 +42,7 @@ elf_cvt_gnuhash (void *dest, const void *src, size_t len, int encode) words. We must detangle them here. */ Elf32_Word *dest32 = dest; const Elf32_Word *src32 = src; @@ -29,7 +28,7 @@ index 6faf113..04d9ca1 100644 /* First four control words, 32 bits. */ for (unsigned int cnt = 0; cnt < 4; ++cnt) -@@ -50,7 +51,7 @@ elf_cvt_gnuhash (void *dest, const void *src, size_t len, int encode) +@@ -52,7 +53,7 @@ elf_cvt_gnuhash (void *dest, const void *src, size_t len, int encode) len -= 4; } diff --git a/meta/recipes-devtools/elfutils/files/0002-musl-libs.patch b/meta/recipes-devtools/elfutils/files/0002-musl-libs.patch deleted file mode 100644 index d5ec0ec9e5..0000000000 --- a/meta/recipes-devtools/elfutils/files/0002-musl-libs.patch +++ /dev/null @@ -1,142 +0,0 @@ -From 9a57efb0f826a70ae360aa55504ee2de656b92b6 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 - -Collection of fixes needed to compile libelf and other libraries -provided by elfutils for musl targets - -error is glibc specific API, so this patch will mostly not accepted -upstream given that elfutils has been closely tied to glibc - -Signed-off-by: Khem Raj <raj.khem@gmail.com> -Upstream-Status: Inappropriate [workaround for musl] - -Rebase to 0.177 -Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> - ---- - lib/error.h | 27 +++++++++++++++++++++++++++ - lib/fixedsizehash.h | 1 - - lib/libeu.h | 1 + - libdwfl/dwfl_error.c | 9 +++++++++ - libdwfl/linux-kernel-modules.c | 1 + - libelf/elf.h | 9 ++++++--- - 6 files changed, 44 insertions(+), 4 deletions(-) - create mode 100644 lib/error.h - -diff --git a/lib/error.h b/lib/error.h -new file mode 100644 -index 0000000..ef06827 ---- /dev/null -+++ b/lib/error.h -@@ -0,0 +1,27 @@ -+#ifndef _ERROR_H_ -+#define _ERROR_H_ -+ -+#include <stdarg.h> -+#include <stdio.h> -+#include <stdlib.h> -+#include <string.h> -+#include <errno.h> -+ -+static unsigned int error_message_count = 0; -+ -+static inline void error(int status, int errnum, const char* format, ...) -+{ -+ va_list ap; -+ fprintf(stderr, "%s: ", program_invocation_name); -+ va_start(ap, format); -+ vfprintf(stderr, format, ap); -+ va_end(ap); -+ if (errnum) -+ fprintf(stderr, ": %s", strerror(errnum)); -+ fprintf(stderr, "\n"); -+ error_message_count++; -+ if (status) -+ exit(status); -+} -+ -+#endif /* _ERROR_H_ */ -diff --git a/lib/fixedsizehash.h b/lib/fixedsizehash.h -index dac2a5f..43016fc 100644 ---- a/lib/fixedsizehash.h -+++ b/lib/fixedsizehash.h -@@ -30,7 +30,6 @@ - #include <errno.h> - #include <stdlib.h> - #include <string.h> --#include <sys/cdefs.h> - - #include <system.h> - -diff --git a/lib/libeu.h b/lib/libeu.h -index ecb4d01..edc85e3 100644 ---- a/lib/libeu.h -+++ b/lib/libeu.h -@@ -29,6 +29,7 @@ - #ifndef LIBEU_H - #define LIBEU_H - -+#include "system.h" - #include <stddef.h> - #include <stdint.h> - -diff --git a/libdwfl/dwfl_error.c b/libdwfl/dwfl_error.c -index 7bcf61c..11dcc8b 100644 ---- a/libdwfl/dwfl_error.c -+++ b/libdwfl/dwfl_error.c -@@ -154,7 +154,16 @@ dwfl_errmsg (int error) - switch (error &~ 0xffff) - { - case OTHER_ERROR (ERRNO): -+#if defined(__GLIBC__) - return strerror_r (error & 0xffff, "bad", 0); -+#else -+ { -+ static __thread char buf[128] = ""; -+ if (strerror_r (error & 0xffff, buf, sizeof(buf)) == 0) -+ return buf; -+ } -+ return "strerror_r() failed"; -+#endif - case OTHER_ERROR (LIBELF): - return elf_errmsg (error & 0xffff); - case OTHER_ERROR (LIBDW): -diff --git a/libdwfl/linux-kernel-modules.c b/libdwfl/linux-kernel-modules.c -index 0434f1e..5afaee8 100644 ---- a/libdwfl/linux-kernel-modules.c -+++ b/libdwfl/linux-kernel-modules.c -@@ -50,6 +50,7 @@ - #include <sys/utsname.h> - #include <fcntl.h> - #include <unistd.h> -+#include "system.h" - - /* If fts.h is included before config.h, its indirect inclusions may not - give us the right LFS aliases of these functions, so map them manually. */ -diff --git a/libelf/elf.h b/libelf/elf.h -index 197b557..8e5b94c 100644 ---- a/libelf/elf.h -+++ b/libelf/elf.h -@@ -21,7 +21,9 @@ - - #include <features.h> - --__BEGIN_DECLS -+#ifdef __cplusplus -+extern "C" { -+#endif - - /* Standard ELF types. */ - -@@ -4103,6 +4105,7 @@ enum - #define R_ARC_TLS_LE_S9 0x4a - #define R_ARC_TLS_LE_32 0x4b - --__END_DECLS -- -+#ifdef __cplusplus -+} -+#endif - #endif /* elf.h */ diff --git a/meta/recipes-devtools/elfutils/files/0003-fixheadercheck.patch b/meta/recipes-devtools/elfutils/files/0003-fixheadercheck.patch index e36d3f44dd..e8b986e4ba 100644 --- a/meta/recipes-devtools/elfutils/files/0003-fixheadercheck.patch +++ b/meta/recipes-devtools/elfutils/files/0003-fixheadercheck.patch @@ -1,4 +1,4 @@ -From dd7c8c730457def5f62ebd43022b2f06df8c6ed9 Mon Sep 17 00:00:00 2001 +From 614f062b22e6da108643f8644a3e92a1108f2b9b Mon Sep 17 00:00:00 2001 From: Hongxu Jia <hongxu.jia@windriver.com> Date: Tue, 15 Aug 2017 17:17:20 +0800 Subject: [PATCH] fixheadercheck @@ -16,16 +16,15 @@ Upstream-Status: Pending Rebase to 0.170 Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> - --- libelf/elf32_updatenull.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libelf/elf32_updatenull.c b/libelf/elf32_updatenull.c -index 3e9ef61..5351518 100644 +index 3594e8b..a3314e5 100644 --- a/libelf/elf32_updatenull.c +++ b/libelf/elf32_updatenull.c -@@ -339,8 +339,8 @@ __elfw2(LIBELFBITS,updatenull_wrlock) (Elf *elf, int *change_bop, size_t shnum) +@@ -355,8 +355,8 @@ __elfw2(LIBELFBITS,updatenull_wrlock) (Elf *elf, int *change_bop, size_t shnum) we test for the alignment of the section being large enough for the largest alignment required by a data block. */ diff --git a/meta/recipes-devtools/elfutils/files/0003-musl-utils.patch b/meta/recipes-devtools/elfutils/files/0003-musl-utils.patch index 4f28d9d027..230ea88f41 100644 --- a/meta/recipes-devtools/elfutils/files/0003-musl-utils.patch +++ b/meta/recipes-devtools/elfutils/files/0003-musl-utils.patch @@ -1,4 +1,4 @@ -From 6923400b777d4ba6f040c4006413bf997326460f Mon Sep 17 00:00:00 2001 +From aab5985a29bd7ab6e0b06eaab190b42a04e10f70 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 @@ -13,17 +13,15 @@ Upstream-Status: Inappropriate [workaround for musl] Rebase to 0.177 Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> - --- - src/arlib.h | 6 ++++++ - src/elfcompress.c | 7 +++++++ - src/readelf.c | 20 ++++++++++++-------- - src/strip.c | 7 +++++++ - src/unstrip.c | 9 +++++++++ - 5 files changed, 41 insertions(+), 8 deletions(-) + src/arlib.h | 6 ++++++ + src/elfcompress.c | 7 +++++++ + src/strip.c | 7 +++++++ + src/unstrip.c | 9 +++++++++ + 4 files changed, 29 insertions(+) diff --git a/src/arlib.h b/src/arlib.h -index e117166..8326f6c 100644 +index d4a4221..f6336d9 100644 --- a/src/arlib.h +++ b/src/arlib.h @@ -29,6 +29,12 @@ @@ -40,7 +38,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 6ba6af4..0c7674b 100644 +index f771b92..263de62 100644 --- a/src/elfcompress.c +++ b/src/elfcompress.c @@ -37,6 +37,13 @@ @@ -57,77 +55,11 @@ index 6ba6af4..0c7674b 100644 /* Name and version of program. */ ARGP_PROGRAM_VERSION_HOOK_DEF = print_version; -diff --git a/src/readelf.c b/src/readelf.c -index 5994615..f3cc071 100644 ---- a/src/readelf.c -+++ b/src/readelf.c -@@ -4829,10 +4829,11 @@ listptr_base (struct listptr *p) - return cudie_base (&cu); - } - -+static const char *listptr_name; -+ - static int --compare_listptr (const void *a, const void *b, void *arg) -+compare_listptr (const void *a, const void *b) - { -- const char *name = arg; - struct listptr *p1 = (void *) a; - struct listptr *p2 = (void *) b; - -@@ -4848,21 +4849,21 @@ compare_listptr (const void *a, const void *b, void *arg) - p1->warned = p2->warned = true; - error (0, 0, - gettext ("%s %#" PRIx64 " used with different address sizes"), -- name, (uint64_t) p1->offset); -+ listptr_name, (uint64_t) p1->offset); - } - if (p1->dwarf64 != p2->dwarf64) - { - p1->warned = p2->warned = true; - error (0, 0, - gettext ("%s %#" PRIx64 " used with different offset sizes"), -- name, (uint64_t) p1->offset); -+ listptr_name, (uint64_t) p1->offset); - } - if (listptr_base (p1) != listptr_base (p2)) - { - p1->warned = p2->warned = true; - error (0, 0, - gettext ("%s %#" PRIx64 " used with different base addresses"), -- name, (uint64_t) p1->offset); -+ listptr_name, (uint64_t) p1->offset); - } - if (p1->attr != p2 ->attr) - { -@@ -4870,7 +4871,7 @@ compare_listptr (const void *a, const void *b, void *arg) - error (0, 0, - gettext ("%s %#" PRIx64 - " used with different attribute %s and %s"), -- name, (uint64_t) p1->offset, dwarf_attr_name (p2->attr), -+ listptr_name, (uint64_t) p1->offset, dwarf_attr_name (p2->attr), - dwarf_attr_name (p2->attr)); - } - } -@@ -4942,8 +4943,11 @@ static void - sort_listptr (struct listptr_table *table, const char *name) - { - if (table->n > 0) -- qsort_r (table->table, table->n, sizeof table->table[0], -- &compare_listptr, (void *) name); -+ { -+ listptr_name = name; -+ qsort (table->table, table->n, sizeof table->table[0], -+ &compare_listptr); -+ } - } - - static bool diff --git a/src/strip.c b/src/strip.c -index 4054c2a..d2d2176 100644 +index 6436443..1608496 100644 --- a/src/strip.c +++ b/src/strip.c -@@ -46,6 +46,13 @@ +@@ -45,6 +45,13 @@ #include <system.h> #include <printversion.h> @@ -142,12 +74,12 @@ index 4054c2a..d2d2176 100644 /* Name and version of program. */ diff --git a/src/unstrip.c b/src/unstrip.c -index 9b8c09a..1fb5063 100644 +index d70053d..b8a6ff3 100644 --- a/src/unstrip.c +++ b/src/unstrip.c -@@ -56,6 +56,15 @@ - # define _(str) gettext (str) - #endif +@@ -51,6 +51,15 @@ + #include "libeu.h" + #include "printversion.h" +#ifndef strndupa +#define strndupa(s, n) \ diff --git a/meta/recipes-devtools/elfutils/files/0004-Disable-the-test-to-convert-euc-jp.patch b/meta/recipes-devtools/elfutils/files/0004-Disable-the-test-to-convert-euc-jp.patch deleted file mode 100644 index 5dee61210a..0000000000 --- a/meta/recipes-devtools/elfutils/files/0004-Disable-the-test-to-convert-euc-jp.patch +++ /dev/null @@ -1,42 +0,0 @@ -From e4ede22e28eaa38d81667ddcb19541ece1a83cf8 Mon Sep 17 00:00:00 2001 -From: Hongxu Jia <hongxu.jia@windriver.com> -Date: Tue, 15 Aug 2017 17:24:06 +0800 -Subject: [PATCH] Disable the test to convert euc-jp - -Remove the test "Test against HP-UX 11.11 bug: -No converter from EUC-JP to UTF-8 is provided" -since we don't support HP-UX and if the euc-jp is not -installed on the host, the dependence will be built without -iconv support and will cause guild-native building fail. - -Upstream-Status: Inappropriate [OE specific] - -Signed-off-by: Roy Li <rongqing.li@windriver.com> - -Rebase to 0.170 -Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> - ---- - m4/iconv.m4 | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/m4/iconv.m4 b/m4/iconv.m4 -index a503646..299f1eb 100644 ---- a/m4/iconv.m4 -+++ b/m4/iconv.m4 -@@ -159,6 +159,7 @@ int main () - } - } - #endif -+#if 0 - /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is - provided. */ - if (/* Try standardized names. */ -@@ -170,6 +171,7 @@ int main () - /* Try HP-UX names. */ - && iconv_open ("utf8", "eucJP") == (iconv_t)(-1)) - result |= 16; -+#endif - return result; - }]])], - [am_cv_func_iconv_works=yes], diff --git a/meta/recipes-devtools/elfutils/files/0004-Fix-error-on-musl.patch b/meta/recipes-devtools/elfutils/files/0004-Fix-error-on-musl.patch deleted file mode 100644 index 481e4b38eb..0000000000 --- a/meta/recipes-devtools/elfutils/files/0004-Fix-error-on-musl.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 48b769ab692c8f02c1ae467229fe3404f662098a 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: - -| ../../elfutils-0.176/tests/elfstrmerge.c: In function 'main': -| ../../elfutils-0.176/tests/elfstrmerge.c:370:60: error: 'ALLPERMS' undeclared (first use in this function); did you mean 'EPERM'? -| fdnew = open (fnew, O_WRONLY | O_CREAT, st.st_mode & ALLPERMS); -| ^~~~~~~~ -| EPERM -| ../../elfutils-0.176/tests/elfstrmerge.c:370:60: note: each undeclared identifier is reported only once for each function it appears in - -Upstream-Status: Inappropriate [workaround in musl] - -Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> - ---- - tests/elfstrmerge.c | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/tests/elfstrmerge.c b/tests/elfstrmerge.c -index ba0d68d..1d2447f 100644 ---- a/tests/elfstrmerge.c -+++ b/tests/elfstrmerge.c -@@ -33,6 +33,11 @@ - #include ELFUTILS_HEADER(dwelf) - #include "elf-knowledge.h" - -+/* for musl */ -+#ifndef ALLPERMS -+# define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO)/* 07777 */ -+#endif -+ - /* The original ELF file. */ - static int fd = -1; - static Elf *elf = NULL; diff --git a/meta/recipes-devtools/elfutils/files/0006-Fix-build-on-aarch64-musl.patch b/meta/recipes-devtools/elfutils/files/0006-Fix-build-on-aarch64-musl.patch index 6f7956c5ae..149e0e6a7b 100644 --- a/meta/recipes-devtools/elfutils/files/0006-Fix-build-on-aarch64-musl.patch +++ b/meta/recipes-devtools/elfutils/files/0006-Fix-build-on-aarch64-musl.patch @@ -1,4 +1,4 @@ -From 578f370c7e7a9f056aefa062b34590b0aa13bce5 Mon Sep 17 00:00:00 2001 +From 4409f128c81a9d76b9360b002a1d76043c77b53e Mon Sep 17 00:00:00 2001 From: Hongxu Jia <hongxu.jia@windriver.com> Date: Tue, 15 Aug 2017 17:27:30 +0800 Subject: [PATCH] Fix build on aarch64/musl @@ -16,7 +16,6 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> Rebase to 0.170 Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> - --- backends/aarch64_initreg.c | 4 ++-- backends/arm_initreg.c | 2 +- diff --git a/meta/recipes-devtools/elfutils/files/0015-config-eu.am-do-not-use-Werror.patch b/meta/recipes-devtools/elfutils/files/0015-config-eu.am-do-not-use-Werror.patch deleted file mode 100644 index c3ae357265..0000000000 --- a/meta/recipes-devtools/elfutils/files/0015-config-eu.am-do-not-use-Werror.patch +++ /dev/null @@ -1,36 +0,0 @@ -From dce2187dd8f592316357b200ebbe8dbed9ee65cb 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 - -Due to re-definition of error() on musl, gcc starts throwing -errors where none happen with glibc. Since upstream is not -likely to be interested in musl builds, lets just disable -Werror. - -Upstream-Status: Inappropriate [oe core specific] -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> ---- - config/eu.am | 2 -- - 1 file changed, 2 deletions(-) - -diff --git a/config/eu.am b/config/eu.am -index 6c3c444..3bc0dc9 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 \ - $(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 \ - $(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,) \ diff --git a/meta/recipes-devtools/elfutils/files/ptest.patch b/meta/recipes-devtools/elfutils/files/ptest.patch index 35b23f43b3..2152875d63 100644 --- a/meta/recipes-devtools/elfutils/files/ptest.patch +++ b/meta/recipes-devtools/elfutils/files/ptest.patch @@ -1,4 +1,7 @@ -Changes to allow ptest to run standalone on target: +From d49f6a135762ec1f1831d0e80b8df2a4269b0a66 Mon Sep 17 00:00:00 2001 +From: Richard Purdie <richard.purdie@linuxfoundation.org> +Date: Wed, 1 May 2019 16:37:48 +0100 +Subject: [PATCH] Changes to allow ptest to run standalone on target: a) Run the tests serially b) Use the standalone test mode which allows the tests to be run in their @@ -11,12 +14,17 @@ d) Add an oecheck make target which we can use to build the test binaries we nee Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Upstream-Status: Inappropriate [oe specific] +--- + configure.ac | 2 +- + tests/Makefile.am | 2 ++ + tests/test-subr.sh | 6 ------ + 3 files changed, 3 insertions(+), 7 deletions(-) -Index: elfutils-0.176/configure.ac -=================================================================== ---- elfutils-0.176.orig/configure.ac -+++ elfutils-0.176/configure.ac -@@ -45,7 +45,7 @@ AC_COPYRIGHT([Copyright (C) 1996-2018 Th +diff --git a/configure.ac b/configure.ac +index bbe8673..488712b 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -49,7 +49,7 @@ AC_COPYRIGHT([Copyright (C) 1996-2024 The elfutils developers.]) AC_PREREQ(2.63) dnl Minimum Autoconf version required. dnl We use GNU make extensions; automake 1.10 defaults to -Wportability. @@ -25,42 +33,20 @@ Index: elfutils-0.176/configure.ac AM_MAINTAINER_MODE AM_SILENT_RULES([yes]) -Index: elfutils-0.176/tests/Makefile.am -=================================================================== ---- elfutils-0.176.orig/tests/Makefile.am -+++ elfutils-0.176/tests/Makefile.am -@@ -445,10 +445,10 @@ installed_TESTS_ENVIRONMENT = libdir=$(D - installed_LOG_COMPILER = $(abs_srcdir)/test-wrapper.sh \ - installed $(tests_rpath) \ - '$(program_transform_name)' --if STANDALONE -+if !STANDALONE - TESTS_ENVIRONMENT = $(installed_TESTS_ENVIRONMENT) - LOG_COMPILER = $(installed_LOG_COMPILER) --else !STANDALONE -+else STANDALONE - TESTS_ENVIRONMENT = LC_ALL=C; LANG=C; VALGRIND_CMD=$(valgrind_cmd); \ - abs_srcdir=$(abs_srcdir); abs_builddir=$(abs_builddir); \ - abs_top_builddir=$(abs_top_builddir); \ -@@ -463,7 +463,7 @@ installcheck-local: - $(MAKE) $(AM_MAKEFLAGS) \ - TESTS_ENVIRONMENT="$(installed_TESTS_ENVIRONMENT)" \ - LOG_COMPILER="$(installed_LOG_COMPILER)" check-TESTS --endif !STANDALONE -+endif STANDALONE - - if STANDALONE - libdw = -ldw -@@ -612,3 +612,5 @@ check: check-am coverage +diff --git a/tests/Makefile.am b/tests/Makefile.am +index ee49d07..3bd8e58 100644 +--- a/tests/Makefile.am ++++ b/tests/Makefile.am +@@ -852,3 +852,5 @@ check: check-am coverage coverage: -$(srcdir)/coverage.sh endif +oecheck: + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) -Index: elfutils-0.176/tests/test-subr.sh -=================================================================== ---- elfutils-0.176.orig/tests/test-subr.sh -+++ elfutils-0.176/tests/test-subr.sh +diff --git a/tests/test-subr.sh b/tests/test-subr.sh +index 411e5f2..a638ff9 100644 +--- a/tests/test-subr.sh ++++ b/tests/test-subr.sh @@ -91,12 +91,6 @@ installed_testrun() program="$1" shift diff --git a/meta/recipes-devtools/elfutils/files/run-ptest b/meta/recipes-devtools/elfutils/files/run-ptest index 81b81f2f5d..d5776fdb53 100644 --- a/meta/recipes-devtools/elfutils/files/run-ptest +++ b/meta/recipes-devtools/elfutils/files/run-ptest @@ -3,4 +3,4 @@ #This script is used to run elfutils test suites cd tests -make -k runtest-TESTS abs_srcdir=$PWD abs_builddir=$PWD srcdir=$PWD top_srcdir=$PWD/../ abs_top_builddir=$PWD/../ elfutils_testrun=installed elfutils_tests_rpath=no program_transform_name=s,^,eu-, +make -k installcheck-local CC=gcc abs_srcdir=$PWD abs_builddir=$PWD srcdir=$PWD top_srcdir=$PWD/../ abs_top_builddir=$PWD/../ elfutils_testrun=installed elfutils_tests_rpath=no program_transform_name=s,^,eu-, |