summaryrefslogtreecommitdiffstats
path: root/meta/classes/cross-canadian.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes/cross-canadian.bbclass')
-rw-r--r--meta/classes/cross-canadian.bbclass56
1 files changed, 56 insertions, 0 deletions
diff --git a/meta/classes/cross-canadian.bbclass b/meta/classes/cross-canadian.bbclass
new file mode 100644
index 0000000000..334f12cdae
--- /dev/null
+++ b/meta/classes/cross-canadian.bbclass
@@ -0,0 +1,56 @@
1# SDK packages are built either explicitly by the user,
2# or indirectly via dependency. No need to be in 'world'.
3EXCLUDE_FROM_WORLD = "1"
4
5# Save MULTIMACH_ARCH
6OLD_MULTIMACH_ARCH := "${MULTIMACH_ARCH}"
7# Save PACKAGE_ARCH
8OLD_PACKAGE_ARCH := ${PACKAGE_ARCH}
9PACKAGE_ARCH = "${HOST_ARCH}-${OLD_PACKAGE_ARCH}-nativesdk"
10# Also save BASE_PACKAGE_ARCH since HOST_ARCH can influence it
11OLD_BASE_PACKAGE_ARCH := "${BASE_PACKAGE_ARCH}"
12BASE_PACKAGE_ARCH = "${OLD_BASE_PACKAGE_ARCH}"
13
14INHIBIT_DEFAULT_DEPS = "1"
15
16STAGING_DIR_HOST = "${STAGING_DIR}/${HOST_SYS}-nativesdk"
17STAGING_DIR_TARGET = "${STAGING_DIR}/${BASEPKG_TARGET_SYS}"
18
19PATH_append = ":${TMPDIR}/cross/${HOST_ARCH}/${bindir_cross}"
20PKGDATA_DIR = "${TMPDIR}/pkgdata/${MULTIMACH_HOST_SYS}"
21
22HOST_ARCH = "${SDK_ARCH}"
23HOST_VENDOR = "${SDK_VENDOR}"
24HOST_OS = "${SDK_OS}"
25HOST_PREFIX = "${SDK_PREFIX}"
26HOST_CC_ARCH = "${SDK_CC_ARCH}"
27
28CPPFLAGS = "${BUILDSDK_CPPFLAGS}"
29CFLAGS = "${BUILDSDK_CFLAGS}"
30CXXFLAGS = "${BUILDSDK_CFLAGS}"
31LDFLAGS = "${BUILDSDK_LDFLAGS}"
32
33# Change to place files in SDKPATH
34prefix = "${SDKPATH}"
35exec_prefix = "${SDKPATH}"
36base_prefix = "${SDKPATH}"
37
38FILES_${PN} = "${prefix}"
39FILES_${PN}-dbg += "${prefix}/.debug \
40 ${prefix}/bin/.debug \
41 "
42
43export PKG_CONFIG_DIR = "${STAGING_DIR_HOST}${layout_libdir}/pkgconfig"
44export PKG_CONFIG_SYSROOT_DIR = "${STAGING_DIR_HOST}"
45
46python () {
47 barch = bb.data.getVar('HOST_ARCH', d, True)
48 archs = bb.data.getVar('PACKAGE_ARCHS', d, True).split()
49 sdkarchs = []
50 for arch in archs:
51 sdkarchs.append(barch + '-' + arch + '-nativesdk')
52 bb.data.setVar('PACKAGE_ARCHS', " ".join(sdkarchs), d)
53}
54
55
56