aboutsummaryrefslogtreecommitdiffstats
path: root/meta/classes/cross-canadian.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2013-10-17 12:22:35 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-10-30 17:33:00 +0000
commita1d6331238982b0c5d39b0a18794f6654b00d46a (patch)
tree78d1314b97c38391ce3c2b05549371e91825f297 /meta/classes/cross-canadian.bbclass
parent7aabc9408fb382f0ae39f9932b6d9ac391528b76 (diff)
downloadopenembedded-core-contrib-a1d6331238982b0c5d39b0a18794f6654b00d46a.tar.gz
cross-canadian: Handle powerpc linux verses linux-gnuspe
PowerPC toolchains can use the OS "linux" or "linux-gnuspe". This patch links them together so the one cross-canadian toolchain can support both. GCC_FOR_TARGET is set for the GCC recipe as otherwise configure can pick up an incorrect value. [YOCTO #5354] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Saul Wold <sgw@linux.intel.com>
Diffstat (limited to 'meta/classes/cross-canadian.bbclass')
-rw-r--r--meta/classes/cross-canadian.bbclass31
1 files changed, 31 insertions, 0 deletions
diff --git a/meta/classes/cross-canadian.bbclass b/meta/classes/cross-canadian.bbclass
index 7181c60d5f..c9742128e5 100644
--- a/meta/classes/cross-canadian.bbclass
+++ b/meta/classes/cross-canadian.bbclass
@@ -15,12 +15,30 @@ STAGING_BINDIR_TOOLCHAIN = "${STAGING_DIR_NATIVE}${bindir_native}/${SDK_ARCH}${S
# Update BASE_PACKAGE_ARCH and PACKAGE_ARCHS
#
PACKAGE_ARCH = "${SDK_ARCH}-${SDKPKGSUFFIX}"
+CANADIANEXTRAOS = ""
python () {
archs = d.getVar('PACKAGE_ARCHS', True).split()
sdkarchs = []
for arch in archs:
sdkarchs.append(arch + '-${SDKPKGSUFFIX}')
d.setVar('PACKAGE_ARCHS', " ".join(sdkarchs))
+
+ # PowerPC can build "linux" and "linux-gnuspe"
+ tarch = d.getVar("TARGET_ARCH", True)
+ if tarch == "powerpc":
+ tos = d.getVar("TARGET_OS", True)
+ if (tos != "linux" and tos != "linux-gnuspe"):
+ bb.fatal("Building cross-candian powerpc for an unknown TARGET_SYS (%s), please update cross-canadian.bbclass" % d.getVar("TARGET_SYS", True))
+ # Have to expand DEPENDS before we change the extensions
+ d.setVar("DEPENDS", d.getVar("DEPENDS", True))
+ d.setVar("STAGING_BINDIR_TOOLCHAIN", d.getVar("STAGING_BINDIR_TOOLCHAIN", True))
+ for prefix in ["AR", "AS", "DLLTOOL", "CC", "CXX", "GCC", "LD", "LIPO", "NM", "OBJDUMP", "RANLIB", "STRIP", "WINDRES"]:
+ n = prefix + "_FOR_TARGET"
+ d.setVar(n, d.getVar(n, True))
+
+ d.setVar("LIBCEXTENSION", "")
+ d.setVar("ABIEXTENSION", "")
+ d.setVar("CANADIANEXTRAOS", "linux-gnuspe")
}
MULTIMACH_TARGET_SYS = "${PACKAGE_ARCH}${HOST_VENDOR}-${HOST_OS}"
@@ -100,3 +118,16 @@ TARGET_ARCH[vardepsexclude] = "TUNE_ARCH"
# points to the wrong place so force it
SHLIBSDIRS = "${PKGDATA_DIR}/nativesdk-shlibs"
SHLIBSWORKDIR = "${PKGDATA_DIR}/nativesdk-shlibs"
+
+cross_canadian_bindirlinks () {
+ for i in ${CANADIANEXTRAOS}
+ do
+ d=${D}${bindir}/../${TARGET_ARCH}${TARGET_VENDOR}-$i
+ install -d $d
+ for j in `ls ${D}${bindir}`
+ do
+ p=${TARGET_ARCH}${TARGET_VENDOR}-$i-`echo $j | sed -e s,${TARGET_PREFIX},,`
+ ln -s ../${TARGET_SYS}/$j $d/$p
+ done
+ done
+}