blob: 02ec891606d6fc971ea0a0e03ea5bff7a40e6e59 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001inherit cross
2PROVIDES = "virtual/${TARGET_PREFIX}binutils"
3
4PN = "binutils-cross-${TARGET_ARCH}"
5BPN = "binutils"
6
Brad Bishop6e60e8b2018-02-01 10:27:11 -05007# Ignore how TARGET_ARCH is computed.
8TARGET_ARCH[vardepvalue] = "${TARGET_ARCH}"
9
Patrick Williamsc124f4f2015-09-15 14:41:29 -050010INHIBIT_DEFAULT_DEPS = "1"
11INHIBIT_AUTOTOOLS_DEPS = "1"
12
Brad Bishop6e60e8b2018-02-01 10:27:11 -050013SRC_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 Williamsc124f4f2015-09-15 14:41:29 -050017EXTRA_OECONF += "--with-sysroot=${STAGING_DIR_TARGET} \
18 --disable-install-libbfd \
19 --enable-poison-system-directories \
Brad Bishop6e60e8b2018-02-01 10:27:11 -050020 --with-lib-path==${target_base_libdir}:=${target_libdir} \
Patrick Williamsc124f4f2015-09-15 14:41:29 -050021 "
22do_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}