blob: 51a9748906ab7de519aaed5228f572b95d182262 [file] [log] [blame]
Brad Bishopd7bf8c12018-02-25 22:55:05 -05001require binutils.inc
2require binutils-${PV}.inc
3
4DEPENDS += "flex bison zlib"
5
6EXTRA_OECONF += "--with-sysroot=/ \
7 --enable-install-libbfd \
8 --enable-install-libiberty \
9 --enable-shared \
10 --with-system-zlib \
11 "
12
13EXTRA_OEMAKE_append_libc-musl = "\
14 gt_cv_func_gnugettext1_libc=yes \
15 gt_cv_func_gnugettext2_libc=yes \
16 "
17EXTRA_OECONF_class-native = "--enable-targets=all \
18 --enable-64-bit-bfd \
19 --enable-install-libiberty \
20 --enable-install-libbfd \
21 --disable-werror"
22
23do_install_class-native () {
24 autotools_do_install
25
26 # Install the libiberty header
27 install -d ${D}${includedir}
28 install -m 644 ${S}/include/ansidecl.h ${D}${includedir}
29 install -m 644 ${S}/include/libiberty.h ${D}${includedir}
30
31 # We only want libiberty, libbfd and libopcodes
32 rm -rf ${D}${bindir}
33 rm -rf ${D}${prefix}/${TARGET_SYS}
34 rm -rf ${D}${prefix}/lib/ldscripts
35 rm -rf ${D}${prefix}/share/info
36 rm -rf ${D}${prefix}/share/locale
37 rm -rf ${D}${prefix}/share/man
38 rmdir ${D}${prefix}/share || :
39 rmdir ${D}/${libdir}/gcc-lib || :
40 rmdir ${D}/${libdir}64/gcc-lib || :
41 rmdir ${D}/${libdir} || :
42 rmdir ${D}/${libdir}64 || :
43}
44
45# Split out libbfd-*.so so including perf doesn't include extra stuff
46PACKAGE_BEFORE_PN += "libbfd"
47FILES_libbfd = "${libdir}/libbfd-*.so"
48
49BBCLASSEXTEND = "native nativesdk"