summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/elfutils/elfutils_0.186.bb
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2021-11-24 09:08:10 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-11-25 21:55:10 +0000
commit5185608b6012f8fcf5945a7b3e11b1a22376c0a3 (patch)
tree552a48622d18b438807974e706b8135adf58d36b /meta/recipes-devtools/elfutils/elfutils_0.186.bb
parent8259247df2138957fac720222aaa0396fa5eea69 (diff)
downloadpoky-5185608b6012f8fcf5945a7b3e11b1a22376c0a3.tar.gz
elfutils: update 0.185 -> 0.186
Drop glibc-2.34-fix.patch merged upstream. Rework support for error() on non-glibc targets: upstream now provides its own implementation, so we can drop the patch that adds ours; said implementation isn't build-tested with tests, so ptest has to be disabled on musl. This, in turns, allows dropping 0004-Fix-error-on-musl.patch. License-Update: copyright years (From OE-Core rev: 9c51ae20c0e4c0d3e7161fc6b51fca078dbf014a) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/elfutils/elfutils_0.186.bb')
-rw-r--r--meta/recipes-devtools/elfutils/elfutils_0.186.bb166
1 files changed, 166 insertions, 0 deletions
diff --git a/meta/recipes-devtools/elfutils/elfutils_0.186.bb b/meta/recipes-devtools/elfutils/elfutils_0.186.bb
new file mode 100644
index 0000000000..b3588a2196
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/elfutils_0.186.bb
@@ -0,0 +1,166 @@
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=d2adfd8f5347d4c96e3c280393ce66da \
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 file://0001-debuginfod-fix-compilation-on-platforms-without-erro.patch \
26 "
27SRC_URI:append:libc-musl = " \
28 file://0003-musl-utils.patch \
29 file://0015-config-eu.am-do-not-use-Werror.patch \
30 "
31SRC_URI[sha256sum] = "7f6fb9149b1673d38d9178a0d3e0fb8a1ec4f53a9f4c2ff89469609879641177"
32
33inherit autotools gettext ptest pkgconfig
34PTEST_ENABLED:libc-musl = "0"
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[zstd] = "--with-zstd,--without-zstd,zstd"
45PACKAGECONFIG[libdebuginfod] = "--enable-libdebuginfod,--disable-libdebuginfod,curl"
46PACKAGECONFIG[debuginfod] = "--enable-debuginfod,--disable-debuginfod,libarchive sqlite3 libmicrohttpd"
47
48RDEPENDS:${PN}-ptest += "libasm libelf bash make coreutils ${PN}-binutils iproute2-ss bsdtar gcc-symlinks binutils-symlinks libgcc-dev"
49
50EXTRA_OECONF:append:class-target = " --disable-tests-rpath"
51
52RDEPENDS:${PN}-ptest:append:libc-glibc = " glibc-utils glibc-dbg glibc-dev"
53INSANE_SKIP:${PN}-ptest = "debug-deps dev-deps"
54
55do_compile_ptest() {
56 cd ${B}/tests
57 oe_runmake buildtest-TESTS oecheck
58}
59
60do_install_ptest() {
61 if [ ${PTEST_ENABLED} = "1" ]; then
62 # copy the files which needed by the cases
63 TEST_FILES="strip strip.o addr2line elfcmp objdump readelf size.o nm.o nm elflint elfcompress elfclassify stack unstrip"
64 install -d -m 755 ${D}${PTEST_PATH}/src
65 install -d -m 755 ${D}${PTEST_PATH}/libelf
66 install -d -m 755 ${D}${PTEST_PATH}/libdw
67 install -d -m 755 ${D}${PTEST_PATH}/libdwfl
68 install -d -m 755 ${D}${PTEST_PATH}/libdwelf
69 install -d -m 755 ${D}${PTEST_PATH}/libasm
70 install -d -m 755 ${D}${PTEST_PATH}/libcpu
71 install -d -m 755 ${D}${PTEST_PATH}/libebl
72 for test_file in ${TEST_FILES}; do
73 if [ -f ${B}/src/${test_file} ]; then
74 cp -r ${B}/src/${test_file} ${D}${PTEST_PATH}/src
75 fi
76 done
77 cp ${D}${libdir}/libelf-${PV}.so ${D}${PTEST_PATH}/libelf/libelf.so
78 cp ${D}${libdir}/libdw-${PV}.so ${D}${PTEST_PATH}/libdw/libdw.so
79 cp ${D}${libdir}/libasm-${PV}.so ${D}${PTEST_PATH}/libasm/libasm.so
80 cp ${B}/libcpu/libcpu.a ${D}${PTEST_PATH}/libcpu/
81 cp ${B}/libebl/libebl.a ${D}${PTEST_PATH}/libebl/
82 cp ${S}/libelf/*.h ${D}${PTEST_PATH}/libelf/
83 cp ${S}/libdw/*.h ${D}${PTEST_PATH}/libdw/
84 cp ${S}/libdwfl/*.h ${D}${PTEST_PATH}/libdwfl/
85 cp ${S}/libdwelf/*.h ${D}${PTEST_PATH}/libdwelf/
86 cp ${S}/libasm/*.h ${D}${PTEST_PATH}/libasm/
87 cp -r ${S}/tests/ ${D}${PTEST_PATH}
88 cp -r ${B}/tests/* ${D}${PTEST_PATH}/tests
89 cp -r ${B}/config.h ${D}${PTEST_PATH}
90 cp -r ${B}/backends ${D}${PTEST_PATH}
91 cp -r ${B}/debuginfod ${D}${PTEST_PATH}
92 sed -i '/^Makefile:/c Makefile:' ${D}${PTEST_PATH}/tests/Makefile
93 find ${D}${PTEST_PATH} -type f -name *.[hoc] | xargs -i rm {}
94 fi
95}
96
97EXTRA_OEMAKE:class-native = ""
98EXTRA_OEMAKE:class-nativesdk = ""
99
100BBCLASSEXTEND = "native nativesdk"
101
102# Package utilities separately
103PACKAGES =+ "${PN}-binutils libelf libasm libdw libdebuginfod"
104
105# shared libraries are licensed GPLv2 or GPLv3+, binaries GPLv3+
106# according to NEWS file:
107# "The license is now GPLv2/LGPLv3+ for the libraries and GPLv3+ for stand-alone
108# programs. There is now also a formal CONTRIBUTING document describing how to
109# submit patches."
110LICENSE:${PN}-binutils = "GPLv3+"
111LICENSE:${PN} = "GPLv3+"
112LICENSE:libelf = "GPLv2 | LGPLv3+"
113LICENSE:libasm = "GPLv2 | LGPLv3+"
114LICENSE:libdw = "GPLv2 | LGPLv3+"
115LICENSE:libdebuginfod = "GPLv2+ | LGPLv3+"
116
117FILES:${PN}-binutils = "\
118 ${bindir}/eu-addr2line \
119 ${bindir}/eu-ld \
120 ${bindir}/eu-nm \
121 ${bindir}/eu-readelf \
122 ${bindir}/eu-size \
123 ${bindir}/eu-strip"
124
125FILES:libelf = "${libdir}/libelf-${PV}.so ${libdir}/libelf.so.*"
126FILES:libasm = "${libdir}/libasm-${PV}.so ${libdir}/libasm.so.*"
127FILES:libdw = "${libdir}/libdw-${PV}.so ${libdir}/libdw.so.* ${libdir}/elfutils/lib*"
128FILES:libdebuginfod = "${libdir}/libdebuginfod-${PV}.so ${libdir}/libdebuginfod.so.*"
129# Some packages have the version preceeding the .so instead properly
130# versioned .so.<version>, so we need to reorder and repackage.
131#FILES:${PN} += "${libdir}/*-${PV}.so ${base_libdir}/*-${PV}.so"
132#FILES_SOLIBSDEV = "${libdir}/libasm.so ${libdir}/libdw.so ${libdir}/libelf.so"
133
134# The package contains symlinks that trip up insane
135INSANE_SKIP:${MLPREFIX}libdw = "dev-so"
136# The nlist binary in the tests uses explicitly minimal compiler flags
137INSANE_SKIP:${PN}-ptest += "ldflags"
138
139# avoid stripping some generated binaries otherwise some of the tests such as test-nlist,
140# run-strip-reloc.sh, run-strip-strmerge.sh and so on will fail
141INHIBIT_PACKAGE_STRIP_FILES = "\
142 ${PKGD}${PTEST_PATH}/tests/test-nlist \
143 ${PKGD}${PTEST_PATH}/tests/elfstrmerge \
144 ${PKGD}${PTEST_PATH}/tests/backtrace-child \
145 ${PKGD}${PTEST_PATH}/tests/backtrace-data \
146 ${PKGD}${PTEST_PATH}/tests/backtrace-dwarf \
147 ${PKGD}${PTEST_PATH}/tests/deleted \
148 ${PKGD}${PTEST_PATH}/tests/dwfllines \
149 ${PKGD}${PTEST_PATH}/src/strip \
150 ${PKGD}${PTEST_PATH}/src/addr2line \
151 ${PKGD}${PTEST_PATH}/src/elfcmp \
152 ${PKGD}${PTEST_PATH}/src/objdump \
153 ${PKGD}${PTEST_PATH}/src/readelf \
154 ${PKGD}${PTEST_PATH}/src/nm \
155 ${PKGD}${PTEST_PATH}/src/elflint \
156 ${PKGD}${PTEST_PATH}/src/elfclassify \
157 ${PKGD}${PTEST_PATH}/src/stack \
158 ${PKGD}${PTEST_PATH}/src/unstrip \
159 ${PKGD}${PTEST_PATH}/libelf/libelf.so \
160 ${PKGD}${PTEST_PATH}/libdw/libdw.so \
161 ${PKGD}${PTEST_PATH}/libasm/libasm.so \
162 ${PKGD}${PTEST_PATH}/backends/libebl_i386.so \
163 ${PKGD}${PTEST_PATH}/backends/libebl_x86_64.so \
164"
165
166PRIVATE_LIBS:${PN}-ptest = "libdw.so.1 libelf.so.1 libasm.so.1 libdebuginfod.so.1"