xref: /OK3568_Linux_fs/yocto/poky/meta/recipes-devtools/binutils/binutils-cross-canadian.inc (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyuninherit cross-canadian
2*4882a593Smuzhiyun
3*4882a593SmuzhiyunSUMMARY = "GNU binary utilities (cross-canadian for ${TARGET_ARCH} target)"
4*4882a593SmuzhiyunPN = "binutils-cross-canadian-${TRANSLATED_TARGET_ARCH}"
5*4882a593SmuzhiyunBPN = "binutils"
6*4882a593Smuzhiyun
7*4882a593SmuzhiyunDEPENDS = "flex-native bison-native virtual/${HOST_PREFIX}gcc-crosssdk virtual/nativesdk-libc nativesdk-zlib nativesdk-gettext nativesdk-flex"
8*4882a593SmuzhiyunEXTRA_OECONF += "--with-sysroot=${SDKPATH}/sysroots/${TUNE_PKGARCH}${TARGET_VENDOR}-${TARGET_OS} \
9*4882a593Smuzhiyun                --enable-poison-system-directories \
10*4882a593Smuzhiyun                "
11*4882a593Smuzhiyun
12*4882a593Smuzhiyun# We have to point binutils at a sysroot but we don't need to rebuild if this changes
13*4882a593Smuzhiyun# e.g. we switch between different machines with different tunes.
14*4882a593SmuzhiyunEXTRA_OECONF[vardepsexclude] = "TUNE_PKGARCH"
15*4882a593Smuzhiyun
16*4882a593Smuzhiyundo_install () {
17*4882a593Smuzhiyun	autotools_do_install
18*4882a593Smuzhiyun
19*4882a593Smuzhiyun	# We're not interested in the libs or headers, these would come from the
20*4882a593Smuzhiyun	# nativesdk or target version of the binutils recipe
21*4882a593Smuzhiyun	rm -rf ${D}${prefix}/${TARGET_SYS}
22*4882a593Smuzhiyun	rm -f ${D}${libdir}/libbfd*
23*4882a593Smuzhiyun	rm -f ${D}${libdir}/libiberty*
24*4882a593Smuzhiyun	rm -f ${D}${libdir}/libopcodes*
25*4882a593Smuzhiyun	rm -f ${D}${includedir}/*.h
26*4882a593Smuzhiyun
27*4882a593Smuzhiyun	cross_canadian_bindirlinks
28*4882a593Smuzhiyun}
29*4882a593Smuzhiyun
30*4882a593SmuzhiyunBBCLASSEXTEND = ""
31