summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/elfutils
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/elfutils')
-rw-r--r--meta/recipes-devtools/elfutils/elfutils_0.176.bb35
-rw-r--r--meta/recipes-devtools/elfutils/files/0001-skip-the-test-when-gcc-not-deployed.patch38
2 files changed, 68 insertions, 5 deletions
diff --git a/meta/recipes-devtools/elfutils/elfutils_0.176.bb b/meta/recipes-devtools/elfutils/elfutils_0.176.bb
index 157551e6af..1a5c70b088 100644
--- a/meta/recipes-devtools/elfutils/elfutils_0.176.bb
+++ b/meta/recipes-devtools/elfutils/elfutils_0.176.bb
@@ -61,6 +61,18 @@ do_compile_ptest() {
61 61
62do_install_ptest() { 62do_install_ptest() {
63 if [ ${PTEST_ENABLED} = "1" ]; then 63 if [ ${PTEST_ENABLED} = "1" ]; then
64 # copy the files which needed by the cases
65 TEST_FILES="strip strip.o addr2line elfcmp objdump readelf size.o nm.o nm elflint"
66 install -d -m 755 ${D}${PTEST_PATH}/src
67 install -d -m 755 ${D}${PTEST_PATH}/libelf
68 install -d -m 755 ${D}${PTEST_PATH}/libdw
69 for test_file in ${TEST_FILES}; do
70 if [ -f ${B}/src/${test_file} ]; then
71 cp -r ${B}/src/${test_file} ${D}${PTEST_PATH}/src
72 fi
73 done
74 cp ${D}${libdir}/libelf-${PV}.so ${D}${PTEST_PATH}/libelf/libelf.so
75 cp ${D}${libdir}/libdw-${PV}.so ${D}${PTEST_PATH}/libdw/libdw.so
64 cp -r ${S}/tests/ ${D}${PTEST_PATH} 76 cp -r ${S}/tests/ ${D}${PTEST_PATH}
65 cp -r ${B}/tests/* ${D}${PTEST_PATH}/tests 77 cp -r ${B}/tests/* ${D}${PTEST_PATH}/tests
66 cp -r ${B}/config.h ${D}${PTEST_PATH} 78 cp -r ${B}/config.h ${D}${PTEST_PATH}
@@ -109,3 +121,26 @@ FILES_libdw = "${libdir}/libdw-${PV}.so ${libdir}/libdw.so.* ${libdir}/elfutils
109 121
110# The package contains symlinks that trip up insane 122# The package contains symlinks that trip up insane
111INSANE_SKIP_${MLPREFIX}libdw = "dev-so" 123INSANE_SKIP_${MLPREFIX}libdw = "dev-so"
124
125# avoid stripping some generated binaries otherwise some of the tests such as test-nlist,
126# run-strip-reloc.sh, run-strip-strmerge.sh and so on will fail
127INHIBIT_PACKAGE_STRIP_FILES = "\
128 ${PKGD}${PTEST_PATH}/tests/test-nlist \
129 ${PKGD}${PTEST_PATH}/tests/elfstrmerge \
130 ${PKGD}${PTEST_PATH}/tests/backtrace-child \
131 ${PKGD}${PTEST_PATH}/tests/backtrace-data \
132 ${PKGD}${PTEST_PATH}/tests/deleted \
133 ${PKGD}${PTEST_PATH}/src/strip \
134 ${PKGD}${PTEST_PATH}/src/addr2line \
135 ${PKGD}${PTEST_PATH}/src/elfcmp \
136 ${PKGD}${PTEST_PATH}/src/objdump \
137 ${PKGD}${PTEST_PATH}/src/readelf \
138 ${PKGD}${PTEST_PATH}/src/nm \
139 ${PKGD}${PTEST_PATH}/src/elflint \
140 ${PKGD}${PTEST_PATH}/libelf/libelf.so \
141 ${PKGD}${PTEST_PATH}/libdw/libdw.so \
142 ${PKGD}${PTEST_PATH}/backends/libebl_i386.so \
143 ${PKGD}${PTEST_PATH}/backends/libebl_x86_64.so \
144"
145
146EXCLUDE_PACKAGES_FROM_SHLIBS = "${PN}-ptest"
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 67ca0e4c77..de8c05f11e 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,19 +1,47 @@
1From 61939d2e552e7645ecd671fa01cf1c7a72caa82a Mon Sep 17 00:00:00 2001 1From e82a055f85e398cb03a4eaf5faf351a3a1f19344 Mon Sep 17 00:00:00 2001
2From: Mingli Yu <Mingli.Yu@windriver.com> 2From: Mingli Yu <Mingli.Yu@windriver.com>
3Date: Fri, 12 Apr 2019 16:29:58 +0800 3Date: Tue, 21 May 2019 15:20:34 +0800
4Subject: [PATCH] skip the test when gcc not deployed 4Subject: [PATCH v2] skip the test when gcc not deployed
5 5
6Skip the tests which depend on gcc when 6Skip the tests which depend on gcc when
7gcc not deployed. 7gcc not deployed.
8 8
9Upstream-Status: Inappropriate [oe specific] 9Upstream-Status: Submitted[https://sourceware.org/ml/elfutils-devel/2019-q2/msg00091.html]
10 10
11Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com> 11Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
12--- 12---
13 tests/run-disasm-x86-64.sh | 2 ++
14 tests/run-disasm-x86.sh | 2 ++
13 tests/run-strip-g.sh | 2 ++ 15 tests/run-strip-g.sh | 2 ++
14 tests/run-strip-nothing.sh | 2 ++ 16 tests/run-strip-nothing.sh | 2 ++
15 2 files changed, 4 insertions(+) 17 4 files changed, 8 insertions(+)
16 18
19diff --git a/tests/run-disasm-x86-64.sh b/tests/run-disasm-x86-64.sh
20index a6be62b..c3ef238 100755
21--- a/tests/run-disasm-x86-64.sh
22+++ b/tests/run-disasm-x86-64.sh
23@@ -22,6 +22,8 @@ case "`uname -m`" in
24 x86_64)
25 tempfiles testfile45.o
26 testfiles testfile45.S testfile45.expect
27+ # skip the case if no gcc deployed
28+ which gcc || exit 77
29 gcc -m64 -c -o testfile45.o testfile45.S
30 testrun_compare ${abs_top_builddir}/src/objdump -d testfile45.o < testfile45.expect
31 ;;
32diff --git a/tests/run-disasm-x86.sh b/tests/run-disasm-x86.sh
33index 28a3df7..544fc28 100755
34--- a/tests/run-disasm-x86.sh
35+++ b/tests/run-disasm-x86.sh
36@@ -22,6 +22,8 @@ case "`uname -m`" in
37 x86_64 | i?86 )
38 tempfiles testfile44.o
39 testfiles testfile44.S testfile44.expect
40+ # skip the case if no gcc deployed
41+ which gcc || exit 77
42 gcc -m32 -c -o testfile44.o testfile44.S
43 testrun_compare ${abs_top_builddir}/src/objdump -d testfile44.o < testfile44.expect
44 ;;
17diff --git a/tests/run-strip-g.sh b/tests/run-strip-g.sh 45diff --git a/tests/run-strip-g.sh b/tests/run-strip-g.sh
18index 1303819..a943dec 100755 46index 1303819..a943dec 100755
19--- a/tests/run-strip-g.sh 47--- a/tests/run-strip-g.sh