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 \ |
| 19 | --enable-poison-system-directories \ |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 20 | --with-lib-path==${target_base_libdir}:=${target_libdir} \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 21 | " |
| 22 | do_install () { |
| 23 | oe_runmake 'DESTDIR=${D}' install |
| 24 | |
| 25 | # We don't really need these, so we'll remove them... |
| 26 | rm -rf ${D}${STAGING_DIR_NATIVE}${libdir_native}/libiberty.a |
| 27 | rm -rf ${D}${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS} |
| 28 | rm -rf ${D}${STAGING_DIR_NATIVE}${prefix_native}/lib/ldscripts |
| 29 | rm -rf ${D}${STAGING_DIR_NATIVE}${prefix_native}/share/info |
| 30 | rm -rf ${D}${STAGING_DIR_NATIVE}${prefix_native}/share/locale |
| 31 | rm -rf ${D}${STAGING_DIR_NATIVE}${prefix_native}/share/man |
| 32 | rmdir ${D}${STAGING_DIR_NATIVE}${prefix_native}/share || : |
| 33 | rmdir ${D}${STAGING_DIR_NATIVE}${prefix_native}/${libdir}/gcc-lib || : |
| 34 | rmdir ${D}${STAGING_DIR_NATIVE}${prefix_native}/${libdir}64/gcc-lib || : |
| 35 | rmdir ${D}${STAGING_DIR_NATIVE}${prefix_native}/${libdir} || : |
| 36 | rmdir ${D}${STAGING_DIR_NATIVE}${prefix_native}/${libdir}64 || : |
| 37 | rmdir ${D}${STAGING_DIR_NATIVE}${prefix_native}/${prefix} || : |
| 38 | } |