blob: 157551e6af9598de3baf8ceefa7790805bb74903 [file] [log] [blame]
Brad Bishop19323692019-04-05 15:28:33 -04001SUMMARY = "Utilities and libraries for handling compiled object files"
2HOMEPAGE = "https://sourceware.org/elfutils"
3SECTION = "base"
Brad Bishopc342db32019-05-15 21:57:59 -04004LICENSE = "GPLv2 & LGPLv3+ & GPLv3+"
Brad Bishop19323692019-04-05 15:28:33 -04005LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
6DEPENDS = "libtool bzip2 zlib virtual/libintl"
7DEPENDS_append_libc-musl = " argp-standalone fts "
8# The Debian patches below are from:
9# http://ftp.de.debian.org/debian/pool/main/e/elfutils/elfutils_0.175-1.debian.tar.xz
10SRC_URI = "https://sourceware.org/elfutils/ftp/${PV}/${BP}.tar.bz2 \
11 file://0001-dso-link-change.patch \
12 file://0002-Fix-elf_cvt_gunhash-if-dest-and-src-are-same.patch \
13 file://0003-fixheadercheck.patch \
14 file://0004-Disable-the-test-to-convert-euc-jp.patch \
15 file://0006-Fix-build-on-aarch64-musl.patch \
16 file://0007-Fix-control-path-where-we-have-str-as-uninitialized-.patch \
17 file://0001-libasm-may-link-with-libbz2-if-found.patch \
18 file://0001-libelf-elf_end.c-check-data_list.data.d.d_buf-before.patch \
19 file://debian/hppa_backend.diff \
20 file://debian/arm_backend.diff \
21 file://debian/mips_backend.diff \
22 file://debian/mips_readelf_w.patch \
23 file://debian/kfreebsd_path.patch \
24 file://debian/0001-Ignore-differences-between-mips-machine-identifiers.patch \
25 file://debian/0002-Add-support-for-mips64-abis-in-mips_retval.c.patch \
26 file://debian/0003-Add-mips-n64-relocation-format-hack.patch \
27 file://debian/hurd_path.patch \
28 file://debian/ignore_strmerge.diff \
29 file://debian/disable_werror.patch \
Brad Bishopc342db32019-05-15 21:57:59 -040030 file://debian/testsuite-ignore-elflint.diff \
31 file://0001-skip-the-test-when-gcc-not-deployed.patch \
32 file://run-ptest \
33 file://ptest.patch \
34 file://musl.patch \
Brad Bishop19323692019-04-05 15:28:33 -040035 "
Brad Bishopc342db32019-05-15 21:57:59 -040036SRC_URI_append_libc-musl = " file://0008-build-Provide-alternatives-for-glibc-assumptions-hel.patch \
37 file://0001-fix-err-variable-and-function-conflicts.patch \
38"
Brad Bishop19323692019-04-05 15:28:33 -040039
40SRC_URI[md5sum] = "077e4f49320cad82bf17a997068b1db9"
41SRC_URI[sha256sum] = "eb5747c371b0af0f71e86215a5ebb88728533c3a104a43d4231963f308cd1023"
42
Brad Bishopc342db32019-05-15 21:57:59 -040043inherit autotools gettext ptest
Brad Bishop19323692019-04-05 15:28:33 -040044
45EXTRA_OECONF = "--program-prefix=eu- --without-lzma"
46EXTRA_OECONF_append_class-native = " --without-bzlib"
Brad Bishopc342db32019-05-15 21:57:59 -040047RDEPENDS_${PN}-ptest = "libasm libelf bash make coreutils ${PN}-binutils ${PN}"
48
49EXTRA_OECONF_append_class-target += "--disable-tests-rpath"
Brad Bishop19323692019-04-05 15:28:33 -040050
51do_install_append() {
52 if [ "${TARGET_ARCH}" != "x86_64" ] && [ -z `echo "${TARGET_ARCH}"|grep 'i.86'` ];then
53 rm -f ${D}${bindir}/eu-objdump
54 fi
55}
56
Brad Bishopc342db32019-05-15 21:57:59 -040057do_compile_ptest() {
58 cd ${B}/tests
59 oe_runmake buildtest-TESTS oecheck
60}
61
62do_install_ptest() {
63 if [ ${PTEST_ENABLED} = "1" ]; then
64 cp -r ${S}/tests/ ${D}${PTEST_PATH}
65 cp -r ${B}/tests/* ${D}${PTEST_PATH}/tests
66 cp -r ${B}/config.h ${D}${PTEST_PATH}
67 cp -r ${B}/backends ${D}${PTEST_PATH}
68 sed -i '/^Makefile:/c Makefile:' ${D}${PTEST_PATH}/tests/Makefile
69 find ${D}${PTEST_PATH} -type f -name *.[hoc] | xargs -i rm {}
70 fi
71}
72
Brad Bishop19323692019-04-05 15:28:33 -040073EXTRA_OEMAKE_class-native = ""
74EXTRA_OEMAKE_class-nativesdk = ""
75
76ALLOW_EMPTY_${PN}_libc-musl = "1"
77
78BBCLASSEXTEND = "native nativesdk"
79
80# Package utilities separately
81PACKAGES =+ "${PN}-binutils libelf libasm libdw"
Brad Bishopc342db32019-05-15 21:57:59 -040082
83# shared libraries are licensed GPLv2 or GPLv3+, binaries GPLv3+
84# according to NEWS file:
85# "The license is now GPLv2/LGPLv3+ for the libraries and GPLv3+ for stand-alone
86# programs. There is now also a formal CONTRIBUTING document describing how to
87# submit patches."
88LICENSE_${PN}-binutils = "GPLv3+"
89LICENSE_${PN} = "GPLv3+"
90LICENSE_libelf = "GPLv2 | LGPLv3+"
91LICENSE_libasm = "GPLv2 | LGPLv3+"
92LICENSE_libdw = "GPLv2 | LGPLv3+"
93
Brad Bishop19323692019-04-05 15:28:33 -040094FILES_${PN}-binutils = "\
95 ${bindir}/eu-addr2line \
96 ${bindir}/eu-ld \
97 ${bindir}/eu-nm \
98 ${bindir}/eu-readelf \
99 ${bindir}/eu-size \
100 ${bindir}/eu-strip"
101
102FILES_libelf = "${libdir}/libelf-${PV}.so ${libdir}/libelf.so.*"
103FILES_libasm = "${libdir}/libasm-${PV}.so ${libdir}/libasm.so.*"
104FILES_libdw = "${libdir}/libdw-${PV}.so ${libdir}/libdw.so.* ${libdir}/elfutils/lib*"
105# Some packages have the version preceeding the .so instead properly
106# versioned .so.<version>, so we need to reorder and repackage.
107#FILES_${PN} += "${libdir}/*-${PV}.so ${base_libdir}/*-${PV}.so"
108#FILES_SOLIBSDEV = "${libdir}/libasm.so ${libdir}/libdw.so ${libdir}/libelf.so"
109
110# The package contains symlinks that trip up insane
111INSANE_SKIP_${MLPREFIX}libdw = "dev-so"