Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 1 | SUMMARY = "Utilities and libraries for handling compiled object files" |
| 2 | HOMEPAGE = "https://sourceware.org/elfutils" |
| 3 | SECTION = "base" |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame^] | 4 | LICENSE = "GPLv2 & LGPLv3+ & GPLv3+" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 5 | LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" |
| 6 | DEPENDS = "libtool bzip2 zlib virtual/libintl" |
| 7 | DEPENDS_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 |
| 10 | SRC_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 Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame^] | 30 | 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 Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 35 | " |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame^] | 36 | SRC_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 Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 39 | |
| 40 | SRC_URI[md5sum] = "077e4f49320cad82bf17a997068b1db9" |
| 41 | SRC_URI[sha256sum] = "eb5747c371b0af0f71e86215a5ebb88728533c3a104a43d4231963f308cd1023" |
| 42 | |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame^] | 43 | inherit autotools gettext ptest |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 44 | |
| 45 | EXTRA_OECONF = "--program-prefix=eu- --without-lzma" |
| 46 | EXTRA_OECONF_append_class-native = " --without-bzlib" |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame^] | 47 | RDEPENDS_${PN}-ptest = "libasm libelf bash make coreutils ${PN}-binutils ${PN}" |
| 48 | |
| 49 | EXTRA_OECONF_append_class-target += "--disable-tests-rpath" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 50 | |
| 51 | do_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 Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame^] | 57 | do_compile_ptest() { |
| 58 | cd ${B}/tests |
| 59 | oe_runmake buildtest-TESTS oecheck |
| 60 | } |
| 61 | |
| 62 | do_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 Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 73 | EXTRA_OEMAKE_class-native = "" |
| 74 | EXTRA_OEMAKE_class-nativesdk = "" |
| 75 | |
| 76 | ALLOW_EMPTY_${PN}_libc-musl = "1" |
| 77 | |
| 78 | BBCLASSEXTEND = "native nativesdk" |
| 79 | |
| 80 | # Package utilities separately |
| 81 | PACKAGES =+ "${PN}-binutils libelf libasm libdw" |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame^] | 82 | |
| 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." |
| 88 | LICENSE_${PN}-binutils = "GPLv3+" |
| 89 | LICENSE_${PN} = "GPLv3+" |
| 90 | LICENSE_libelf = "GPLv2 | LGPLv3+" |
| 91 | LICENSE_libasm = "GPLv2 | LGPLv3+" |
| 92 | LICENSE_libdw = "GPLv2 | LGPLv3+" |
| 93 | |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 94 | FILES_${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 | |
| 102 | FILES_libelf = "${libdir}/libelf-${PV}.so ${libdir}/libelf.so.*" |
| 103 | FILES_libasm = "${libdir}/libasm-${PV}.so ${libdir}/libasm.so.*" |
| 104 | FILES_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 |
| 111 | INSANE_SKIP_${MLPREFIX}libdw = "dev-so" |