diff options
Diffstat (limited to 'meta/classes')
-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 | } | ||