blob: e391813639360535edfea9a5280fa6d97a635a97 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001SUMMARY = "Utilities and libraries for handling compiled object files"
2HOMEPAGE = "https://fedorahosted.org/elfutils"
3SECTION = "base"
4LICENSE = "(GPLv3 & Elfutils-Exception)"
5LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
6DEPENDS = "libtool bzip2 zlib virtual/libintl"
7
8SRC_URI = "https://fedorahosted.org/releases/e/l/elfutils/${PV}/${BP}.tar.bz2"
9
10SRC_URI[md5sum] = "77ce87f259987d2e54e4d87b86cbee41"
11SRC_URI[sha256sum] = "7c774f1eef329309f3b05e730bdac50013155d437518a2ec0e24871d312f2e23"
12
13SRC_URI += "\
14 file://mempcpy.patch \
15 file://dso-link-change.patch \
16 file://Fix_elf_cvt_gunhash.patch \
17 file://fixheadercheck.patch \
18 file://0001-elf_getarsym-Silence-Werror-maybe-uninitialized-fals.patch \
19 file://0001-remove-the-unneed-checking.patch \
20 file://0001-fix-a-stack-usage-warning.patch \
21"
22
23# pick the patch from debian
24# http://ftp.de.debian.org/debian/pool/main/e/elfutils/elfutils_0.159-4.debian.tar.xz
25SRC_URI += "\
26 file://redhat-portability.diff \
27 file://hppa_backend.diff \
28 file://arm_backend.diff \
29 file://mips_backend.diff \
30 file://m68k_backend.diff \
31 file://testsuite-ignore-elflint.diff \
32 file://scanf-format.patch \
33 file://mips_readelf_w.patch \
34 file://arm_func_value.patch \
35 file://arm_unwind_ret_mask.patch \
36 file://non_linux.patch \
37"
38
39# Only apply when building uclibc based target recipe
40SRC_URI_append_libc-uclibc = " file://uclibc-support-for-elfutils-0.161.patch"
41
42# The buildsystem wants to generate 2 .h files from source using a binary it just built,
43# which can not pass the cross compiling, so let's work around it by adding 2 .h files
44# along with the do_configure_prepend()
45
46inherit autotools gettext
47
48EXTRA_OECONF = "--program-prefix=eu- --without-lzma"
49EXTRA_OECONF_append_class-native = " --without-bzlib"
50EXTRA_OECONF_append_libc-uclibc = " --enable-uclibc"
51
52do_install_append() {
53 if [ "${TARGET_ARCH}" != "x86_64" ] && [ -z `echo "${TARGET_ARCH}"|grep 'i.86'` ];then
54 rm ${D}${bindir}/eu-objdump
55 fi
56}
57
58# we can not build complete elfutils when using uclibc
59# but some recipes e.g. gcc 4.5 depends on libelf so we
60# build only libelf for uclibc case
61
62EXTRA_OEMAKE_libc-uclibc = "-C libelf"
63EXTRA_OEMAKE_class-native = ""
64EXTRA_OEMAKE_class-nativesdk = ""
65
66BBCLASSEXTEND = "native nativesdk"
67
68# Package utilities separately
69PACKAGES =+ "${PN}-binutils libelf libasm libdw"
70FILES_${PN}-binutils = "\
71 ${bindir}/eu-addr2line \
72 ${bindir}/eu-ld \
73 ${bindir}/eu-nm \
74 ${bindir}/eu-readelf \
75 ${bindir}/eu-size \
76 ${bindir}/eu-strip"
77
78FILES_libelf = "${libdir}/libelf-${PV}.so ${libdir}/libelf.so.*"
79FILES_libasm = "${libdir}/libasm-${PV}.so ${libdir}/libasm.so.*"
80FILES_libdw = "${libdir}/libdw-${PV}.so ${libdir}/libdw.so.* ${libdir}/elfutils/lib*"
81# Some packages have the version preceeding the .so instead properly
82# versioned .so.<version>, so we need to reorder and repackage.
83#FILES_${PN} += "${libdir}/*-${PV}.so ${base_libdir}/*-${PV}.so"
84#FILES_SOLIBSDEV = "${libdir}/libasm.so ${libdir}/libdw.so ${libdir}/libelf.so"
85
86# The package contains symlinks that trip up insane
87INSANE_SKIP_${MLPREFIX}libdw = "dev-so"