summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/elfutils/elfutils_0.185.bb
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2021-06-04 11:14:50 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-06-06 23:16:51 +0100
commitc7b15f642b7a219dde771eee3a07bbe9b6e276d0 (patch)
tree722338ef4030b5d881144ee1dfc7baa285a079e5 /meta/recipes-devtools/elfutils/elfutils_0.185.bb
parentb76b3e37436344d2dfbab10886af2ecbcb813237 (diff)
downloadpoky-c7b15f642b7a219dde771eee3a07bbe9b6e276d0.tar.gz
elfutils: update 0.183 -> 0.185
0001-add-support-for-ipkg-to-debuginfod.cxx.patch merged upstream. 0001-debuginfod-debuginfod-client.c-correct-string-format.patch rebased. (From OE-Core rev: 466ba2d5c81f817334b2f9242daa8ffca271e224) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/elfutils/elfutils_0.185.bb')
-rw-r--r--meta/recipes-devtools/elfutils/elfutils_0.185.bb164
1 files changed, 164 insertions, 0 deletions
diff --git a/meta/recipes-devtools/elfutils/elfutils_0.185.bb b/meta/recipes-devtools/elfutils/elfutils_0.185.bb
new file mode 100644
index 0000000000..b1ffbc18bf
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/elfutils_0.185.bb
@@ -0,0 +1,164 @@
1SUMMARY = "Utilities and libraries for handling compiled object files"
2HOMEPAGE = "https://sourceware.org/elfutils"
3DESCRIPTION = "elfutils is a collection of utilities and libraries to read, create and modify ELF binary files, find and handle DWARF debug data, symbols, thread state and stacktraces for processes and core files on GNU/Linux."
4SECTION = "base"
5LICENSE = "GPLv2 & GPLv2+ & LGPLv3+ & GPLv3+"
6LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
7 file://debuginfod/debuginfod-client.c;endline=27;md5=f8e9d171c401c493ec45a0b2992ea2ed \
8 "
9DEPENDS = "zlib virtual/libintl"
10DEPENDS_append_libc-musl = " argp-standalone fts musl-obstack "
11# The Debian patches below are from:
12# http://ftp.de.debian.org/debian/pool/main/e/elfutils/elfutils_0.176-1.debian.tar.xz
13SRC_URI = "https://sourceware.org/elfutils/ftp/${PV}/${BP}.tar.bz2 \
14 file://0001-dso-link-change.patch \
15 file://0002-Fix-elf_cvt_gunhash-if-dest-and-src-are-same.patch \
16 file://0003-fixheadercheck.patch \
17 file://0006-Fix-build-on-aarch64-musl.patch \
18 file://0001-libasm-may-link-with-libbz2-if-found.patch \
19 file://0001-libelf-elf_end.c-check-data_list.data.d.d_buf-before.patch \
20 file://0001-skip-the-test-when-gcc-not-deployed.patch \
21 file://run-ptest \
22 file://ptest.patch \
23 file://0001-tests-Makefile.am-compile-test_nlist-with-standard-C.patch \
24 file://0001-debuginfod-debuginfod-client.c-correct-string-format.patch \
25 "
26SRC_URI_append_libc-musl = " \
27 file://0002-musl-libs.patch \
28 file://0003-musl-utils.patch \
29 file://0004-Fix-error-on-musl.patch \
30 file://0015-config-eu.am-do-not-use-Werror.patch \
31 "
32SRC_URI[sha256sum] = "dc8d3e74ab209465e7f568e1b3bb9a5a142f8656e2b57d10049a73da2ae6b5a6"
33
34inherit autotools gettext ptest pkgconfig
35
36EXTRA_OECONF = "--program-prefix=eu-"
37
38DEPENDS_BZIP2 = "bzip2-replacement-native"
39DEPENDS_BZIP2_class-target = "bzip2"
40
41PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'debuginfod', 'debuginfod libdebuginfod', '', d)}"
42PACKAGECONFIG[bzip2] = "--with-bzlib,--without-bzlib,${DEPENDS_BZIP2}"
43PACKAGECONFIG[xz] = "--with-lzma,--without-lzma,xz"
44PACKAGECONFIG[libdebuginfod] = "--enable-libdebuginfod,--disable-libdebuginfod,curl"
45PACKAGECONFIG[debuginfod] = "--enable-debuginfod,--disable-debuginfod,libarchive sqlite3 libmicrohttpd"
46
47RDEPENDS_${PN}-ptest += "libasm libelf bash make coreutils ${PN}-binutils iproute2-ss bsdtar"
48
49EXTRA_OECONF_append_class-target = " --disable-tests-rpath"
50
51RDEPENDS_${PN}-ptest_append_libc-glibc = " glibc-utils"
52
53do_compile_ptest() {
54 cd ${B}/tests
55 oe_runmake buildtest-TESTS oecheck
56}
57
58do_install_ptest() {
59 if [ ${PTEST_ENABLED} = "1" ]; then
60 # copy the files which needed by the cases
61 TEST_FILES="strip strip.o addr2line elfcmp objdump readelf size.o nm.o nm elflint elfcompress elfclassify stack unstrip"
62 install -d -m 755 ${D}${PTEST_PATH}/src
63 install -d -m 755 ${D}${PTEST_PATH}/libelf
64 install -d -m 755 ${D}${PTEST_PATH}/libdw
65 install -d -m 755 ${D}${PTEST_PATH}/libdwfl
66 install -d -m 755 ${D}${PTEST_PATH}/libdwelf
67 install -d -m 755 ${D}${PTEST_PATH}/libasm
68 install -d -m 755 ${D}${PTEST_PATH}/libcpu
69 install -d -m 755 ${D}${PTEST_PATH}/libebl
70 for test_file in ${TEST_FILES}; do
71 if [ -f ${B}/src/${test_file} ]; then
72 cp -r ${B}/src/${test_file} ${D}${PTEST_PATH}/src
73 fi
74 done
75 cp ${D}${libdir}/libelf-${PV}.so ${D}${PTEST_PATH}/libelf/libelf.so
76 cp ${D}${libdir}/libdw-${PV}.so ${D}${PTEST_PATH}/libdw/libdw.so
77 cp ${D}${libdir}/libasm-${PV}.so ${D}${PTEST_PATH}/libasm/libasm.so
78 cp ${B}/libcpu/libcpu.a ${D}${PTEST_PATH}/libcpu/
79 cp ${B}/libebl/libebl.a ${D}${PTEST_PATH}/libebl/
80 cp ${S}/libelf/*.h ${D}${PTEST_PATH}/libelf/
81 cp ${S}/libdw/*.h ${D}${PTEST_PATH}/libdw/
82 cp ${S}/libdwfl/*.h ${D}${PTEST_PATH}/libdwfl/
83 cp ${S}/libdwelf/*.h ${D}${PTEST_PATH}/libdwelf/
84 cp ${S}/libasm/*.h ${D}${PTEST_PATH}/libasm/
85 cp -r ${S}/tests/ ${D}${PTEST_PATH}
86 cp -r ${B}/tests/* ${D}${PTEST_PATH}/tests
87 cp -r ${B}/config.h ${D}${PTEST_PATH}
88 cp -r ${B}/backends ${D}${PTEST_PATH}
89 cp -r ${B}/debuginfod ${D}${PTEST_PATH}
90 sed -i '/^Makefile:/c Makefile:' ${D}${PTEST_PATH}/tests/Makefile
91 find ${D}${PTEST_PATH} -type f -name *.[hoc] | xargs -i rm {}
92 fi
93}
94
95EXTRA_OEMAKE_class-native = ""
96EXTRA_OEMAKE_class-nativesdk = ""
97
98BBCLASSEXTEND = "native nativesdk"
99
100# Package utilities separately
101PACKAGES =+ "${PN}-binutils libelf libasm libdw libdebuginfod"
102
103# shared libraries are licensed GPLv2 or GPLv3+, binaries GPLv3+
104# according to NEWS file:
105# "The license is now GPLv2/LGPLv3+ for the libraries and GPLv3+ for stand-alone
106# programs. There is now also a formal CONTRIBUTING document describing how to
107# submit patches."
108LICENSE_${PN}-binutils = "GPLv3+"
109LICENSE_${PN} = "GPLv3+"
110LICENSE_libelf = "GPLv2 | LGPLv3+"
111LICENSE_libasm = "GPLv2 | LGPLv3+"
112LICENSE_libdw = "GPLv2 | LGPLv3+"
113LICENSE_libdebuginfod = "GPLv2+ | LGPLv3+"
114
115FILES_${PN}-binutils = "\
116 ${bindir}/eu-addr2line \
117 ${bindir}/eu-ld \
118 ${bindir}/eu-nm \
119 ${bindir}/eu-readelf \
120 ${bindir}/eu-size \
121 ${bindir}/eu-strip"
122
123FILES_libelf = "${libdir}/libelf-${PV}.so ${libdir}/libelf.so.*"
124FILES_libasm = "${libdir}/libasm-${PV}.so ${libdir}/libasm.so.*"
125FILES_libdw = "${libdir}/libdw-${PV}.so ${libdir}/libdw.so.* ${libdir}/elfutils/lib*"
126FILES_libdebuginfod = "${libdir}/libdebuginfod-${PV}.so ${libdir}/libdebuginfod.so.*"
127# Some packages have the version preceeding the .so instead properly
128# versioned .so.<version>, so we need to reorder and repackage.
129#FILES_${PN} += "${libdir}/*-${PV}.so ${base_libdir}/*-${PV}.so"
130#FILES_SOLIBSDEV = "${libdir}/libasm.so ${libdir}/libdw.so ${libdir}/libelf.so"
131
132# The package contains symlinks that trip up insane
133INSANE_SKIP_${MLPREFIX}libdw = "dev-so"
134# The nlist binary in the tests uses explicitly minimal compiler flags
135INSANE_SKIP_${PN}-ptest += "ldflags"
136
137# avoid stripping some generated binaries otherwise some of the tests such as test-nlist,
138# run-strip-reloc.sh, run-strip-strmerge.sh and so on will fail
139INHIBIT_PACKAGE_STRIP_FILES = "\
140 ${PKGD}${PTEST_PATH}/tests/test-nlist \
141 ${PKGD}${PTEST_PATH}/tests/elfstrmerge \
142 ${PKGD}${PTEST_PATH}/tests/backtrace-child \
143 ${PKGD}${PTEST_PATH}/tests/backtrace-data \
144 ${PKGD}${PTEST_PATH}/tests/backtrace-dwarf \
145 ${PKGD}${PTEST_PATH}/tests/deleted \
146 ${PKGD}${PTEST_PATH}/tests/dwfllines \
147 ${PKGD}${PTEST_PATH}/src/strip \
148 ${PKGD}${PTEST_PATH}/src/addr2line \
149 ${PKGD}${PTEST_PATH}/src/elfcmp \
150 ${PKGD}${PTEST_PATH}/src/objdump \
151 ${PKGD}${PTEST_PATH}/src/readelf \
152 ${PKGD}${PTEST_PATH}/src/nm \
153 ${PKGD}${PTEST_PATH}/src/elflint \
154 ${PKGD}${PTEST_PATH}/src/elfclassify \
155 ${PKGD}${PTEST_PATH}/src/stack \
156 ${PKGD}${PTEST_PATH}/src/unstrip \
157 ${PKGD}${PTEST_PATH}/libelf/libelf.so \
158 ${PKGD}${PTEST_PATH}/libdw/libdw.so \
159 ${PKGD}${PTEST_PATH}/libasm/libasm.so \
160 ${PKGD}${PTEST_PATH}/backends/libebl_i386.so \
161 ${PKGD}${PTEST_PATH}/backends/libebl_x86_64.so \
162"
163
164PRIVATE_LIBS_${PN}-ptest = "libdw.so.1 libelf.so.1 libasm.so.1 libdebuginfod.so.1"