Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 1 | require binutils.inc |
| 2 | require binutils-${PV}.inc |
| 3 | |
| 4 | DEPENDS += "flex bison zlib" |
| 5 | |
| 6 | EXTRA_OECONF += "--with-sysroot=/ \ |
| 7 | --enable-install-libbfd \ |
| 8 | --enable-install-libiberty \ |
| 9 | --enable-shared \ |
| 10 | --with-system-zlib \ |
| 11 | " |
| 12 | |
| 13 | EXTRA_OEMAKE_append_libc-musl = "\ |
| 14 | gt_cv_func_gnugettext1_libc=yes \ |
| 15 | gt_cv_func_gnugettext2_libc=yes \ |
| 16 | " |
| 17 | EXTRA_OECONF_class-native = "--enable-targets=all \ |
| 18 | --enable-64-bit-bfd \ |
| 19 | --enable-install-libiberty \ |
| 20 | --enable-install-libbfd \ |
| 21 | --disable-werror" |
| 22 | |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame] | 23 | # gcc9.0 end up mis-compiling libbfd.so with O2 which then crashes on target |
| 24 | # So remove -O2 and use -Os as workaround |
| 25 | SELECTED_OPTIMIZATION_remove_mipsarch = "-O2" |
| 26 | SELECTED_OPTIMIZATION_append_mipsarch = " -Os" |
| 27 | |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 28 | do_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 |
| 51 | PACKAGE_BEFORE_PN += "libbfd" |
| 52 | FILES_libbfd = "${libdir}/libbfd-*.so" |
| 53 | |
| 54 | BBCLASSEXTEND = "native nativesdk" |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame] | 55 | |