Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 1 | require binutils.inc |
| 2 | require binutils-${PV}.inc |
| 3 | |
Andrew Geissler | d159c7f | 2021-09-02 21:05:58 -0500 | [diff] [blame] | 4 | DEPENDS += "zlib" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 5 | |
| 6 | EXTRA_OECONF += "--with-sysroot=/ \ |
| 7 | --enable-install-libbfd \ |
| 8 | --enable-install-libiberty \ |
| 9 | --enable-shared \ |
| 10 | --with-system-zlib \ |
| 11 | " |
| 12 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 13 | EXTRA_OEMAKE:append:libc-musl = "\ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 14 | gt_cv_func_gnugettext1_libc=yes \ |
| 15 | gt_cv_func_gnugettext2_libc=yes \ |
| 16 | " |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 17 | EXTRA_OECONF:class-native = "--enable-targets=all \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 18 | --enable-64-bit-bfd \ |
| 19 | --enable-install-libiberty \ |
| 20 | --enable-install-libbfd \ |
| 21 | --disable-gdb \ |
| 22 | --disable-gdbserver \ |
| 23 | --disable-libdecnumber \ |
| 24 | --disable-readline \ |
| 25 | --disable-sim \ |
| 26 | --disable-werror" |
| 27 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 28 | PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'debuginfod', d)}" |
Andrew Geissler | 90fd73c | 2021-03-05 15:25:55 -0600 | [diff] [blame] | 29 | PACKAGECONFIG[debuginfod] = "--with-debuginfod, --without-debuginfod, elfutils" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 30 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 31 | do_install:class-native () { |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 32 | autotools_do_install |
| 33 | |
| 34 | # Install the libiberty header |
| 35 | install -d ${D}${includedir} |
| 36 | install -m 644 ${S}/include/ansidecl.h ${D}${includedir} |
| 37 | install -m 644 ${S}/include/libiberty.h ${D}${includedir} |
| 38 | |
| 39 | # We only want libiberty, libbfd and libopcodes |
| 40 | rm -rf ${D}${bindir} |
| 41 | rm -rf ${D}${prefix}/${TARGET_SYS} |
| 42 | rm -rf ${D}${prefix}/lib/ldscripts |
| 43 | rm -rf ${D}${prefix}/share/info |
| 44 | rm -rf ${D}${prefix}/share/locale |
| 45 | rm -rf ${D}${prefix}/share/man |
| 46 | rmdir ${D}${prefix}/share || : |
| 47 | rmdir ${D}/${libdir}/gcc-lib || : |
| 48 | rmdir ${D}/${libdir}64/gcc-lib || : |
| 49 | rmdir ${D}/${libdir} || : |
| 50 | rmdir ${D}/${libdir}64 || : |
| 51 | } |
| 52 | |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 53 | # libctf races with libbfd |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 54 | PARALLEL_MAKEINST:class-target = "" |
| 55 | PARALLEL_MAKEINST:class-nativesdk = "" |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 56 | |
| 57 | # Split out libbfd-*.so and libopcodes-*.so so including perf doesn't include |
| 58 | # extra stuff |
| 59 | PACKAGE_BEFORE_PN += "libbfd libopcodes" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 60 | FILES:libbfd = "${libdir}/libbfd-*.so.* ${libdir}/libbfd-*.so" |
| 61 | FILES:libopcodes = "${libdir}/libopcodes-*.so.* ${libdir}/libopcodes-*.so" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 62 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 63 | SRC_URI:append:class-nativesdk = " file://0003-binutils-nativesdk-Search-for-alternative-ld.so.conf.patch " |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 64 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 65 | USE_ALTERNATIVES_FOR:class-nativesdk = "" |
| 66 | FILES:${PN}:append:class-nativesdk = " ${bindir}" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 67 | |
| 68 | BBCLASSEXTEND = "native nativesdk" |
| 69 | |