diff options
Diffstat (limited to 'poky/meta/recipes-devtools/elfutils')
-rw-r--r-- | poky/meta/recipes-devtools/elfutils/elfutils_0.176.bb | 37 | ||||
-rw-r--r-- | poky/meta/recipes-devtools/elfutils/files/0001-skip-the-test-when-gcc-not-deployed.patch | 38 |
2 files changed, 69 insertions, 6 deletions
diff --git a/poky/meta/recipes-devtools/elfutils/elfutils_0.176.bb b/poky/meta/recipes-devtools/elfutils/elfutils_0.176.bb index 157551e6a..5b8049f53 100644 --- a/poky/meta/recipes-devtools/elfutils/elfutils_0.176.bb +++ b/poky/meta/recipes-devtools/elfutils/elfutils_0.176.bb @@ -44,7 +44,7 @@ inherit autotools gettext ptest EXTRA_OECONF = "--program-prefix=eu- --without-lzma" EXTRA_OECONF_append_class-native = " --without-bzlib" -RDEPENDS_${PN}-ptest = "libasm libelf bash make coreutils ${PN}-binutils ${PN}" +RDEPENDS_${PN}-ptest += "libasm libelf bash make coreutils ${PN}-binutils" EXTRA_OECONF_append_class-target += "--disable-tests-rpath" @@ -61,6 +61,18 @@ do_compile_ptest() { do_install_ptest() { if [ ${PTEST_ENABLED} = "1" ]; then + # copy the files which needed by the cases + TEST_FILES="strip strip.o addr2line elfcmp objdump readelf size.o nm.o nm elflint" + install -d -m 755 ${D}${PTEST_PATH}/src + install -d -m 755 ${D}${PTEST_PATH}/libelf + install -d -m 755 ${D}${PTEST_PATH}/libdw + for test_file in ${TEST_FILES}; do + if [ -f ${B}/src/${test_file} ]; then + cp -r ${B}/src/${test_file} ${D}${PTEST_PATH}/src + fi + done + cp ${D}${libdir}/libelf-${PV}.so ${D}${PTEST_PATH}/libelf/libelf.so + cp ${D}${libdir}/libdw-${PV}.so ${D}${PTEST_PATH}/libdw/libdw.so cp -r ${S}/tests/ ${D}${PTEST_PATH} cp -r ${B}/tests/* ${D}${PTEST_PATH}/tests cp -r ${B}/config.h ${D}${PTEST_PATH} @@ -109,3 +121,26 @@ FILES_libdw = "${libdir}/libdw-${PV}.so ${libdir}/libdw.so.* ${libdir}/elfutils # The package contains symlinks that trip up insane INSANE_SKIP_${MLPREFIX}libdw = "dev-so" + +# avoid stripping some generated binaries otherwise some of the tests such as test-nlist, +# run-strip-reloc.sh, run-strip-strmerge.sh and so on will fail +INHIBIT_PACKAGE_STRIP_FILES = "\ + ${PKGD}${PTEST_PATH}/tests/test-nlist \ + ${PKGD}${PTEST_PATH}/tests/elfstrmerge \ + ${PKGD}${PTEST_PATH}/tests/backtrace-child \ + ${PKGD}${PTEST_PATH}/tests/backtrace-data \ + ${PKGD}${PTEST_PATH}/tests/deleted \ + ${PKGD}${PTEST_PATH}/src/strip \ + ${PKGD}${PTEST_PATH}/src/addr2line \ + ${PKGD}${PTEST_PATH}/src/elfcmp \ + ${PKGD}${PTEST_PATH}/src/objdump \ + ${PKGD}${PTEST_PATH}/src/readelf \ + ${PKGD}${PTEST_PATH}/src/nm \ + ${PKGD}${PTEST_PATH}/src/elflint \ + ${PKGD}${PTEST_PATH}/libelf/libelf.so \ + ${PKGD}${PTEST_PATH}/libdw/libdw.so \ + ${PKGD}${PTEST_PATH}/backends/libebl_i386.so \ + ${PKGD}${PTEST_PATH}/backends/libebl_x86_64.so \ +" + +EXCLUDE_PACKAGES_FROM_SHLIBS = "${PN}-ptest" diff --git a/poky/meta/recipes-devtools/elfutils/files/0001-skip-the-test-when-gcc-not-deployed.patch b/poky/meta/recipes-devtools/elfutils/files/0001-skip-the-test-when-gcc-not-deployed.patch index 67ca0e4c7..de8c05f11 100644 --- a/poky/meta/recipes-devtools/elfutils/files/0001-skip-the-test-when-gcc-not-deployed.patch +++ b/poky/meta/recipes-devtools/elfutils/files/0001-skip-the-test-when-gcc-not-deployed.patch @@ -1,19 +1,47 @@ -From 61939d2e552e7645ecd671fa01cf1c7a72caa82a Mon Sep 17 00:00:00 2001 +From e82a055f85e398cb03a4eaf5faf351a3a1f19344 Mon Sep 17 00:00:00 2001 From: Mingli Yu <Mingli.Yu@windriver.com> -Date: Fri, 12 Apr 2019 16:29:58 +0800 -Subject: [PATCH] skip the test when gcc not deployed +Date: Tue, 21 May 2019 15:20:34 +0800 +Subject: [PATCH v2] skip the test when gcc not deployed Skip the tests which depend on gcc when gcc not deployed. -Upstream-Status: Inappropriate [oe specific] +Upstream-Status: Submitted[https://sourceware.org/ml/elfutils-devel/2019-q2/msg00091.html] Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com> --- + tests/run-disasm-x86-64.sh | 2 ++ + tests/run-disasm-x86.sh | 2 ++ tests/run-strip-g.sh | 2 ++ tests/run-strip-nothing.sh | 2 ++ - 2 files changed, 4 insertions(+) + 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 +--- a/tests/run-disasm-x86-64.sh ++++ b/tests/run-disasm-x86-64.sh +@@ -22,6 +22,8 @@ case "`uname -m`" in + x86_64) + tempfiles testfile45.o + testfiles testfile45.S testfile45.expect ++ # skip the case if no gcc deployed ++ which gcc || exit 77 + gcc -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 +--- a/tests/run-disasm-x86.sh ++++ b/tests/run-disasm-x86.sh +@@ -22,6 +22,8 @@ case "`uname -m`" in + x86_64 | i?86 ) + tempfiles testfile44.o + testfiles testfile44.S testfile44.expect ++ # skip the case if no gcc deployed ++ which gcc || exit 77 + gcc -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 --- a/tests/run-strip-g.sh |