Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | inherit cross |
| 2 | PROVIDES = "virtual/${TARGET_PREFIX}binutils" |
| 3 | |
| 4 | PN = "binutils-cross-${TARGET_ARCH}" |
| 5 | BPN = "binutils" |
| 6 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 7 | # Ignore how TARGET_ARCH is computed. |
| 8 | TARGET_ARCH[vardepvalue] = "${TARGET_ARCH}" |
| 9 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 10 | INHIBIT_DEFAULT_DEPS = "1" |
| 11 | INHIBIT_AUTOTOOLS_DEPS = "1" |
| 12 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 13 | SRC_URI += "file://0002-binutils-cross-Do-not-generate-linker-script-directo.patch" |
| 14 | |
| 15 | # Specify lib-path else we use a load of search dirs which we don't use |
| 16 | # and mean the linker scripts have to be relocated. |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 17 | EXTRA_OECONF += "--with-sysroot=${STAGING_DIR_TARGET} \ |
| 18 | --disable-install-libbfd \ |
Patrick Williams | 92b42cb | 2022-09-03 06:53:57 -0500 | [diff] [blame] | 19 | --disable-gprofng \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 20 | --enable-poison-system-directories \ |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 21 | --with-lib-path==${target_base_libdir}:=${target_libdir} \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 22 | " |
| 23 | do_install () { |
| 24 | oe_runmake 'DESTDIR=${D}' install |
| 25 | |
| 26 | # We don't really need these, so we'll remove them... |
| 27 | rm -rf ${D}${STAGING_DIR_NATIVE}${libdir_native}/libiberty.a |
| 28 | rm -rf ${D}${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS} |
| 29 | rm -rf ${D}${STAGING_DIR_NATIVE}${prefix_native}/lib/ldscripts |
| 30 | rm -rf ${D}${STAGING_DIR_NATIVE}${prefix_native}/share/info |
| 31 | rm -rf ${D}${STAGING_DIR_NATIVE}${prefix_native}/share/locale |
| 32 | rm -rf ${D}${STAGING_DIR_NATIVE}${prefix_native}/share/man |
| 33 | rmdir ${D}${STAGING_DIR_NATIVE}${prefix_native}/share || : |
| 34 | rmdir ${D}${STAGING_DIR_NATIVE}${prefix_native}/${libdir}/gcc-lib || : |
| 35 | rmdir ${D}${STAGING_DIR_NATIVE}${prefix_native}/${libdir}64/gcc-lib || : |
| 36 | rmdir ${D}${STAGING_DIR_NATIVE}${prefix_native}/${libdir} || : |
| 37 | rmdir ${D}${STAGING_DIR_NATIVE}${prefix_native}/${libdir}64 || : |
| 38 | rmdir ${D}${STAGING_DIR_NATIVE}${prefix_native}/${prefix} || : |
| 39 | } |