blob: 89315915c478aabea33361ac1ec5de2e80db6d37 [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
Brad Bishop15ae2502019-06-18 21:44:24 -040023# gcc9.0 end up mis-compiling libbfd.so with O2 which then crashes on target
24# So remove -O2 and use -Os as workaround
25SELECTED_OPTIMIZATION_remove_mipsarch = "-O2"
26SELECTED_OPTIMIZATION_append_mipsarch = " -Os"
27
Brad Bishopd7bf8c12018-02-25 22:55:05 -050028do_install_class-native () {
29 autotools_do_install
30
31 # Install the libiberty header
32 install -d ${D}${includedir}
33 install -m 644 ${S}/include/ansidecl.h ${D}${includedir}
34 install -m 644 ${S}/include/libiberty.h ${D}${includedir}
35
36 # We only want libiberty, libbfd and libopcodes
37 rm -rf ${D}${bindir}
38 rm -rf ${D}${prefix}/${TARGET_SYS}
39 rm -rf ${D}${prefix}/lib/ldscripts
40 rm -rf ${D}${prefix}/share/info
41 rm -rf ${D}${prefix}/share/locale
42 rm -rf ${D}${prefix}/share/man
43 rmdir ${D}${prefix}/share || :
44 rmdir ${D}/${libdir}/gcc-lib || :
45 rmdir ${D}/${libdir}64/gcc-lib || :
46 rmdir ${D}/${libdir} || :
47 rmdir ${D}/${libdir}64 || :
48}
49
50# Split out libbfd-*.so so including perf doesn't include extra stuff
51PACKAGE_BEFORE_PN += "libbfd"
52FILES_libbfd = "${libdir}/libbfd-*.so"
53
54BBCLASSEXTEND = "native nativesdk"
Brad Bishop15ae2502019-06-18 21:44:24 -040055