diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-10-17 12:22:35 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-10-30 17:33:12 +0000 |
commit | bd1cf71974699e4dd5fac88ffdf54cf7f53f67e3 (patch) | |
tree | fa74690dad73a74d068d12a9d77a65ac48038a14 /meta/classes/cross-canadian.bbclass | |
parent | 3e629b2061b375e6bfa7feb84dded37347251009 (diff) | |
download | poky-bd1cf71974699e4dd5fac88ffdf54cf7f53f67e3.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]
(From OE-Core rev: a1d6331238982b0c5d39b0a18794f6654b00d46a)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/cross-canadian.bbclass')
-rw-r--r-- | meta/classes/cross-canadian.bbclass | 31 |
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 | |||
15 | # Update BASE_PACKAGE_ARCH and PACKAGE_ARCHS | 15 | # Update BASE_PACKAGE_ARCH and PACKAGE_ARCHS |
16 | # | 16 | # |
17 | PACKAGE_ARCH = "${SDK_ARCH}-${SDKPKGSUFFIX}" | 17 | PACKAGE_ARCH = "${SDK_ARCH}-${SDKPKGSUFFIX}" |
18 | CANADIANEXTRAOS = "" | ||
18 | python () { | 19 | python () { |
19 | archs = d.getVar('PACKAGE_ARCHS', True).split() | 20 | archs = d.getVar('PACKAGE_ARCHS', True).split() |
20 | sdkarchs = [] | 21 | sdkarchs = [] |
21 | for arch in archs: | 22 | for arch in archs: |
22 | sdkarchs.append(arch + '-${SDKPKGSUFFIX}') | 23 | sdkarchs.append(arch + '-${SDKPKGSUFFIX}') |
23 | d.setVar('PACKAGE_ARCHS', " ".join(sdkarchs)) | 24 | d.setVar('PACKAGE_ARCHS', " ".join(sdkarchs)) |
25 | |||
26 | # PowerPC can build "linux" and "linux-gnuspe" | ||
27 | tarch = d.getVar("TARGET_ARCH", True) | ||
28 | if tarch == "powerpc": | ||
29 | tos = d.getVar("TARGET_OS", True) | ||
30 | if (tos != "linux" and tos != "linux-gnuspe"): | ||
31 | bb.fatal("Building cross-candian powerpc for an unknown TARGET_SYS (%s), please update cross-canadian.bbclass" % d.getVar("TARGET_SYS", True)) | ||
32 | # Have to expand DEPENDS before we change the extensions | ||
33 | d.setVar("DEPENDS", d.getVar("DEPENDS", True)) | ||
34 | d.setVar("STAGING_BINDIR_TOOLCHAIN", d.getVar("STAGING_BINDIR_TOOLCHAIN", True)) | ||
35 | for prefix in ["AR", "AS", "DLLTOOL", "CC", "CXX", "GCC", "LD", "LIPO", "NM", "OBJDUMP", "RANLIB", "STRIP", "WINDRES"]: | ||
36 | n = prefix + "_FOR_TARGET" | ||
37 | d.setVar(n, d.getVar(n, True)) | ||
38 | |||
39 | d.setVar("LIBCEXTENSION", "") | ||
40 | d.setVar("ABIEXTENSION", "") | ||
41 | d.setVar("CANADIANEXTRAOS", "linux-gnuspe") | ||
24 | } | 42 | } |
25 | MULTIMACH_TARGET_SYS = "${PACKAGE_ARCH}${HOST_VENDOR}-${HOST_OS}" | 43 | MULTIMACH_TARGET_SYS = "${PACKAGE_ARCH}${HOST_VENDOR}-${HOST_OS}" |
26 | 44 | ||
@@ -100,3 +118,16 @@ TARGET_ARCH[vardepsexclude] = "TUNE_ARCH" | |||
100 | # points to the wrong place so force it | 118 | # points to the wrong place so force it |
101 | SHLIBSDIRS = "${PKGDATA_DIR}/nativesdk-shlibs" | 119 | SHLIBSDIRS = "${PKGDATA_DIR}/nativesdk-shlibs" |
102 | SHLIBSWORKDIR = "${PKGDATA_DIR}/nativesdk-shlibs" | 120 | SHLIBSWORKDIR = "${PKGDATA_DIR}/nativesdk-shlibs" |
121 | |||
122 | cross_canadian_bindirlinks () { | ||
123 | for i in ${CANADIANEXTRAOS} | ||
124 | do | ||
125 | d=${D}${bindir}/../${TARGET_ARCH}${TARGET_VENDOR}-$i | ||
126 | install -d $d | ||
127 | for j in `ls ${D}${bindir}` | ||
128 | do | ||
129 | p=${TARGET_ARCH}${TARGET_VENDOR}-$i-`echo $j | sed -e s,${TARGET_PREFIX},,` | ||
130 | ln -s ../${TARGET_SYS}/$j $d/$p | ||
131 | done | ||
132 | done | ||
133 | } | ||