blob: 835d4fa69b731ac14fc072208b93947219fbc40b [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 \
Patrick Williams92b42cb2022-09-03 06:53:57 -050019 --disable-gprofng \
Patrick Williamsc124f4f2015-09-15 14:41:29 -050020 --enable-poison-system-directories \
Brad Bishop6e60e8b2018-02-01 10:27:11 -050021 --with-lib-path==${target_base_libdir}:=${target_libdir} \
Patrick Williamsc124f4f2015-09-15 14:41:29 -050022 "
23do_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}