summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/recipes-devtools/elfutils/elfutils_0.187.bb4
-rw-r--r--meta/recipes-devtools/elfutils/files/0001-tests-Add-libeu-to-tests-needing-error-API.patch147
2 files changed, 150 insertions, 1 deletions
diff --git a/meta/recipes-devtools/elfutils/elfutils_0.187.bb b/meta/recipes-devtools/elfutils/elfutils_0.187.bb
index 561112c580..40c51c8814 100644
--- a/meta/recipes-devtools/elfutils/elfutils_0.187.bb
+++ b/meta/recipes-devtools/elfutils/elfutils_0.187.bb
@@ -21,6 +21,7 @@ SRC_URI = "https://sourceware.org/elfutils/ftp/${PV}/${BP}.tar.bz2 \
21 file://run-ptest \ 21 file://run-ptest \
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-tests-Add-libeu-to-tests-needing-error-API.patch \
24 " 25 "
25SRC_URI:append:libc-musl = " \ 26SRC_URI:append:libc-musl = " \
26 file://0003-musl-utils.patch \ 27 file://0003-musl-utils.patch \
@@ -29,7 +30,6 @@ SRC_URI:append:libc-musl = " \
29SRC_URI[sha256sum] = "e70b0dfbe610f90c4d1fe0d71af142a4e25c3c4ef9ebab8d2d72b65159d454c8" 30SRC_URI[sha256sum] = "e70b0dfbe610f90c4d1fe0d71af142a4e25c3c4ef9ebab8d2d72b65159d454c8"
30 31
31inherit autotools gettext ptest pkgconfig 32inherit autotools gettext ptest pkgconfig
32PTEST_ENABLED:libc-musl = "0"
33 33
34EXTRA_OECONF = "--program-prefix=eu-" 34EXTRA_OECONF = "--program-prefix=eu-"
35 35
@@ -66,6 +66,7 @@ do_install_ptest() {
66 # copy the files which needed by the cases 66 # copy the files which needed by the cases
67 TEST_FILES="strip strip.o addr2line elfcmp objdump readelf size.o nm.o nm elflint elfcompress elfclassify stack unstrip" 67 TEST_FILES="strip strip.o addr2line elfcmp objdump readelf size.o nm.o nm elflint elfcompress elfclassify stack unstrip"
68 install -d -m 755 ${D}${PTEST_PATH}/src 68 install -d -m 755 ${D}${PTEST_PATH}/src
69 install -d -m 755 ${D}${PTEST_PATH}/lib
69 install -d -m 755 ${D}${PTEST_PATH}/libelf 70 install -d -m 755 ${D}${PTEST_PATH}/libelf
70 install -d -m 755 ${D}${PTEST_PATH}/libdw 71 install -d -m 755 ${D}${PTEST_PATH}/libdw
71 install -d -m 755 ${D}${PTEST_PATH}/libdwfl 72 install -d -m 755 ${D}${PTEST_PATH}/libdwfl
@@ -83,6 +84,7 @@ do_install_ptest() {
83 cp ${D}${libdir}/libasm-${PV}.so ${D}${PTEST_PATH}/libasm/libasm.so 84 cp ${D}${libdir}/libasm-${PV}.so ${D}${PTEST_PATH}/libasm/libasm.so
84 cp ${B}/libcpu/libcpu.a ${D}${PTEST_PATH}/libcpu/ 85 cp ${B}/libcpu/libcpu.a ${D}${PTEST_PATH}/libcpu/
85 cp ${B}/libebl/libebl.a ${D}${PTEST_PATH}/libebl/ 86 cp ${B}/libebl/libebl.a ${D}${PTEST_PATH}/libebl/
87 cp ${B}/lib/libeu.a ${D}${PTEST_PATH}/lib/
86 cp ${S}/libelf/*.h ${D}${PTEST_PATH}/libelf/ 88 cp ${S}/libelf/*.h ${D}${PTEST_PATH}/libelf/
87 cp ${S}/libdw/*.h ${D}${PTEST_PATH}/libdw/ 89 cp ${S}/libdw/*.h ${D}${PTEST_PATH}/libdw/
88 cp ${S}/libdwfl/*.h ${D}${PTEST_PATH}/libdwfl/ 90 cp ${S}/libdwfl/*.h ${D}${PTEST_PATH}/libdwfl/
diff --git a/meta/recipes-devtools/elfutils/files/0001-tests-Add-libeu-to-tests-needing-error-API.patch b/meta/recipes-devtools/elfutils/files/0001-tests-Add-libeu-to-tests-needing-error-API.patch
new file mode 100644
index 0000000000..7c1bc87cbf
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/files/0001-tests-Add-libeu-to-tests-needing-error-API.patch
@@ -0,0 +1,147 @@
1From c05c787070a390a2061bfcb845e1e35e8b1373b3 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Tue, 13 Sep 2022 09:33:00 -0700
4Subject: [PATCH] tests: Add libeu to tests needing error() API
5
6A local error() impelmentation is used when libc does not provide it,
7therefore link in libeu.a which contains this function in tests needing
8error() API
9
10Upstream-Status: Submitted [https://sourceware.org/pipermail/elfutils-devel/2022q3/005375.html]
11Signed-off-by: Khem Raj <raj.khem@gmail.com>
12---
13 tests/Makefile.am | 60 +++++++++++++++++++++++------------------------
14 1 file changed, 30 insertions(+), 30 deletions(-)
15
16diff --git a/tests/Makefile.am b/tests/Makefile.am
17index 3943e17..1acc49b 100644
18--- a/tests/Makefile.am
19+++ b/tests/Makefile.am
20@@ -638,17 +638,17 @@ libeu = ../lib/libeu.a
21 arextract_LDADD = $(libelf)
22 arsymtest_LDADD = $(libelf)
23 newfile_LDADD = $(libelf)
24-saridx_LDADD = $(libelf)
25+saridx_LDADD = $(libeu) $(libelf)
26 scnnames_LDADD = $(libelf)
27-sectiondump_LDADD = $(libelf)
28+sectiondump_LDADD = $(libeu) $(libelf)
29 showptable_LDADD = $(libelf)
30 hash_LDADD = $(libelf)
31 test_nlist_CFLAGS =-g -O0 $(EXTRA_NLIST_CFLAGS)
32 test_nlist_LDADD = $(libelf)
33 msg_tst_LDADD = $(libelf)
34 newscn_LDADD = $(libelf)
35-early_offscn_LDADD = $(libelf)
36-ecp_LDADD = $(libelf)
37+early_offscn_LDADD = $(libeu) $(libelf)
38+ecp_LDADD = $(libeu) $(libelf)
39 update1_LDADD = $(libelf)
40 update2_LDADD = $(libelf)
41 update3_LDADD = $(libdw) $(libelf)
42@@ -662,12 +662,12 @@ get_files_LDADD = $(libdw) $(libelf)
43 next_files_LDADD = $(libdw) $(libelf)
44 get_aranges_LDADD = $(libdw) $(libelf)
45 allfcts_LDADD = $(libdw) $(libelf)
46-line2addr_LDADD = $(libdw) $(argp_LDADD)
47-addrscopes_LDADD = $(libdw) $(argp_LDADD)
48-funcscopes_LDADD = $(libdw) $(argp_LDADD)
49-funcretval_LDADD = $(libdw) $(argp_LDADD)
50-allregs_LDADD = $(libdw) $(argp_LDADD)
51-find_prologues_LDADD = $(libdw) $(argp_LDADD)
52+line2addr_LDADD = $(libeu) $(libdw) $(argp_LDADD)
53+addrscopes_LDADD = $(libeu) $(libdw) $(argp_LDADD)
54+funcscopes_LDADD = $(libeu) $(libdw) $(argp_LDADD)
55+funcretval_LDADD = $(libeu) $(libdw) $(argp_LDADD)
56+allregs_LDADD = $(libeu) $(libdw) $(argp_LDADD)
57+find_prologues_LDADD = $(libeu) $(libdw) $(argp_LDADD)
58 #show_ciefde_LDADD = ../libdwarf/libdwarf.so $(libelf)
59 asm_tst1_LDADD = $(libasm) $(libebl) $(libelf) $(libdw)
60 asm_tst2_LDADD = $(libasm) $(libebl) $(libelf) $(libdw)
61@@ -678,19 +678,19 @@ asm_tst6_LDADD = $(libasm) $(libebl) $(libelf) $(libdw)
62 asm_tst7_LDADD = $(libasm) $(libebl) $(libelf) $(libdw)
63 asm_tst8_LDADD = $(libasm) $(libebl) $(libelf) $(libdw)
64 asm_tst9_LDADD = $(libasm) $(libebl) $(libelf) $(libdw)
65-dwflmodtest_LDADD = $(libdw) $(libebl) $(libelf) $(argp_LDADD)
66-rdwrmmap_LDADD = $(libelf)
67+dwflmodtest_LDADD = $(libeu) $(libdw) $(libebl) $(libelf) $(argp_LDADD)
68+rdwrmmap_LDADD = $(libeu) $(libelf)
69 dwfl_bug_addr_overflow_LDADD = $(libdw) $(libebl) $(libelf)
70 arls_LDADD = $(libelf)
71-dwfl_bug_fd_leak_LDADD = $(libdw) $(libebl) $(libelf)
72+dwfl_bug_fd_leak_LDADD = $(libeu) $(libdw) $(libebl) $(libelf)
73 dwfl_bug_report_LDADD = $(libdw) $(libebl) $(libelf)
74-dwfl_bug_getmodules_LDADD = $(libdw) $(libebl) $(libelf)
75-dwfl_addr_sect_LDADD = $(libdw) $(libebl) $(libelf) $(argp_LDADD)
76+dwfl_bug_getmodules_LDADD = $(libeu) $(libdw) $(libebl) $(libelf)
77+dwfl_addr_sect_LDADD = $(libeu) $(libdw) $(libebl) $(libelf) $(argp_LDADD)
78 dwarf_getmacros_LDADD = $(libdw)
79 dwarf_ranges_LDADD = $(libdw)
80 dwarf_getstring_LDADD = $(libdw)
81 addrcfi_LDADD = $(libdw) $(libebl) $(libelf) $(argp_LDADD)
82-dwarfcfi_LDADD = $(libdw) $(libelf)
83+dwarfcfi_LDADD = $(libeu) $(libdw) $(libelf)
84 test_flag_nobits_LDADD = $(libelf)
85 rerequest_tag_LDADD = $(libdw)
86 alldts_LDADD = $(libdw) $(libelf)
87@@ -699,35 +699,35 @@ typeiter2_LDADD = $(libdw) $(libelf)
88 low_high_pc_LDADD = $(libdw) $(libelf) $(argp_LDADD)
89 test_elf_cntl_gelf_getshdr_LDADD = $(libelf)
90 dwflsyms_LDADD = $(libdw) $(libelf) $(argp_LDADD)
91-dwfllines_LDADD = $(libdw) $(libelf) $(argp_LDADD)
92-dwfl_report_elf_align_LDADD = $(libdw)
93+dwfllines_LDADD = $(libeu) $(libdw) $(libelf) $(argp_LDADD)
94+dwfl_report_elf_align_LDADD = $(libeu) $(libdw)
95 dwfl_report_segment_contiguous_LDADD = $(libdw) $(libebl) $(libelf)
96-varlocs_LDADD = $(libdw) $(libelf) $(argp_LDADD)
97-backtrace_LDADD = $(libdw) $(libelf) $(argp_LDADD)
98+varlocs_LDADD = $(libeu) $(libdw) $(libelf) $(argp_LDADD)
99+backtrace_LDADD = $(libeu) $(libdw) $(libelf) $(argp_LDADD)
100 # backtrace-child-biarch also uses those *_CFLAGS and *_LDLAGS variables:
101 backtrace_child_CFLAGS = $(fpie_CFLAGS)
102 backtrace_child_LDFLAGS = -pie -pthread
103 backtrace_child_biarch_SOURCES = backtrace-child.c
104-backtrace_data_LDADD = $(libdw) $(libelf)
105+backtrace_data_LDADD = $(libeu) $(libdw) $(libelf)
106 backtrace_dwarf_CFLAGS = -Wno-unused-parameter
107-backtrace_dwarf_LDADD = $(libdw) $(libelf)
108-debuglink_LDADD = $(libdw) $(libelf)
109-debugaltlink_LDADD = $(libdw) $(libelf)
110-buildid_LDADD = $(libdw) $(libelf)
111+backtrace_dwarf_LDADD = $(libeu) $(libdw) $(libelf)
112+debuglink_LDADD = $(libeu) $(libdw) $(libelf)
113+debugaltlink_LDADD = $(libeu) $(libdw) $(libelf)
114+buildid_LDADD = $(libeu) $(libdw) $(libelf)
115 deleted_LDADD = ./deleted-lib.so
116 deleted_lib_so_LDFLAGS = -shared
117 deleted_lib_so_CFLAGS = $(fpic_CFLAGS) -fasynchronous-unwind-tables
118 aggregate_size_LDADD = $(libdw) $(libelf) $(argp_LDADD)
119 peel_type_LDADD = $(libdw) $(libelf) $(argp_LDADD)
120-vdsosyms_LDADD = $(libdw) $(libelf)
121-getsrc_die_LDADD = $(libdw) $(libelf)
122+vdsosyms_LDADD = $(libeu) $(libdw) $(libelf)
123+getsrc_die_LDADD = $(libeu) $(libdw) $(libelf)
124 strptr_LDADD = $(libelf)
125 newdata_LDADD = $(libelf)
126 elfstrtab_LDADD = $(libelf)
127-dwfl_proc_attach_LDADD = $(libdw)
128+dwfl_proc_attach_LDADD = $(libeu) $(libdw)
129 dwfl_proc_attach_LDFLAGS = -pthread -rdynamic $(AM_LDFLAGS)
130 elfshphehdr_LDADD =$(libelf)
131-elfstrmerge_LDADD = $(libdw) $(libelf)
132+elfstrmerge_LDADD = $(libeu) $(libdw) $(libelf)
133 dwelfgnucompressed_LDADD = $(libelf) $(libdw)
134 elfgetchdr_LDADD = $(libelf) $(libdw)
135 elfgetzdata_LDADD = $(libelf)
136@@ -743,7 +743,7 @@ get_units_split_LDADD = $(libdw)
137 attr_integrate_skel_LDADD = $(libdw)
138 all_dwarf_ranges_LDADD = $(libdw)
139 unit_info_LDADD = $(libdw)
140-next_cfi_LDADD = $(libelf) $(libdw)
141+next_cfi_LDADD = $(libeu) $(libelf) $(libdw)
142 elfcopy_LDADD = $(libelf)
143 addsections_LDADD = $(libelf)
144 debuginfod_build_id_find_LDADD = $(libelf) $(libdw)
145--
1462.37.3
147