summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
Diffstat (limited to 'classes')
-rw-r--r--classes/canadian-cross.bbclass5
-rw-r--r--classes/canadian-native.bbclass4
-rw-r--r--classes/canadian-sdk.bbclass4
-rw-r--r--classes/canadian.bbclass5
-rw-r--r--classes/cross-canadian.bbclass46
-rw-r--r--classes/crosssdk.bbclass15
-rw-r--r--classes/nativesdk.bbclass78
-rw-r--r--classes/sdk.bbclass5
8 files changed, 161 insertions, 1 deletions
diff --git a/classes/canadian-cross.bbclass b/classes/canadian-cross.bbclass
index a254d40b6d..514aaeb414 100644
--- a/classes/canadian-cross.bbclass
+++ b/classes/canadian-cross.bbclass
@@ -1,3 +1,8 @@
+#
+# Note this class is deprecated and replaced by cross-canadian.bbclass
+#
+
+
# Canadian cross packages are built indirectly via dependency,
# no need for them to be a direct target of 'world'
EXCLUDE_FROM_WORLD = "1"
diff --git a/classes/canadian-native.bbclass b/classes/canadian-native.bbclass
index 655eecec76..3cd003cb4b 100644
--- a/classes/canadian-native.bbclass
+++ b/classes/canadian-native.bbclass
@@ -1,4 +1,6 @@
-inherit base
+#
+# Note this class is deprecated and replaced by nativesdk.bbclass
+#
# Canadian native packages are built indirectly via dependency,
# no need for them to be a direct target of 'world'
diff --git a/classes/canadian-sdk.bbclass b/classes/canadian-sdk.bbclass
index a6c5552310..94db57796e 100644
--- a/classes/canadian-sdk.bbclass
+++ b/classes/canadian-sdk.bbclass
@@ -1,3 +1,7 @@
+#
+# Note this class is deprecated and replaced by crosssdk.bbclass
+#
+
# Canadian SDK packages are built either explicitly by the user,
# or indirectly via dependency. No need to be in 'world'.
EXCLUDE_FROM_WORLD = "1"
diff --git a/classes/canadian.bbclass b/classes/canadian.bbclass
index f359a8df7f..8edce1412c 100644
--- a/classes/canadian.bbclass
+++ b/classes/canadian.bbclass
@@ -1,3 +1,8 @@
+#
+# Note this class is deprecated
+#
+
+
# For Canadian SDKs we need to know what these values start out as, and use
# them as well as the updated ones.
OLD_PACKAGE_ARCH := "${PACKAGE_ARCH}"
diff --git a/classes/cross-canadian.bbclass b/classes/cross-canadian.bbclass
new file mode 100644
index 0000000000..bd738ecd4d
--- /dev/null
+++ b/classes/cross-canadian.bbclass
@@ -0,0 +1,46 @@
+# SDK packages are built either explicitly by the user,
+# or indirectly via dependency. No need to be in 'world'.
+EXCLUDE_FROM_WORLD = "1"
+
+# Save MULTIMACH_ARCH
+OLD_MULTIMACH_ARCH := "${MULTIMACH_ARCH}"
+# Save PACKAGE_ARCH
+OLD_PACKAGE_ARCH := ${PACKAGE_ARCH}
+PACKAGE_ARCH = "${SDK_ARCH}-${TARGET_ARCH}-canadian"
+PACKAGE_ARCHS = "${PACKAGE_ARCH}"
+# Also save BASE_PACKAGE_ARCH since HOST_ARCH can influence it
+OLD_BASE_PACKAGE_ARCH := "${BASE_PACKAGE_ARCH}"
+BASE_PACKAGE_ARCH = "${OLD_BASE_PACKAGE_ARCH}"
+
+INHIBIT_DEFAULT_DEPS = "1"
+
+STAGING_DIR_HOST = "${STAGING_DIR}/${HOST_SYS}-nativesdk"
+STAGING_DIR_TARGET = "${STAGING_DIR}/${BASEPKG_TARGET_SYS}"
+
+PATH_append = ":${TMPDIR}/cross/${HOST_ARCH}/${bindir_cross}"
+PKGDATA_DIR = "${TMPDIR}/pkgdata/${HOST_ARCH}-nativesdk${HOST_VENDOR}-${HOST_OS}"
+
+HOST_ARCH = "${SDK_ARCH}"
+HOST_VENDOR = "${SDK_VENDOR}"
+HOST_OS = "${SDK_OS}"
+HOST_PREFIX = "${SDK_PREFIX}"
+HOST_CC_ARCH = "${SDK_CC_ARCH}"
+
+CPPFLAGS = "${BUILDSDK_CPPFLAGS}"
+CFLAGS = "${BUILDSDK_CFLAGS}"
+CXXFLAGS = "${BUILDSDK_CFLAGS}"
+LDFLAGS = "${BUILDSDK_LDFLAGS}"
+
+# Change to place files in SDKPATH
+prefix = "${SDKPATH}"
+exec_prefix = "${SDKPATH}"
+base_prefix = "${SDKPATH}"
+
+FILES_${PN} = "${prefix}"
+FILES_${PN}-dbg += "${prefix}/.debug \
+ ${prefix}/bin/.debug \
+ "
+
+export PKG_CONFIG_DIR = "${STAGING_DIR_HOST}${layout_libdir}/pkgconfig"
+export PKG_CONFIG_SYSROOT_DIR = "${STAGING_DIR_HOST}"
+
diff --git a/classes/crosssdk.bbclass b/classes/crosssdk.bbclass
new file mode 100644
index 0000000000..0b1af8fc2f
--- /dev/null
+++ b/classes/crosssdk.bbclass
@@ -0,0 +1,15 @@
+inherit cross
+
+PACKAGES = ""
+
+BASE_PACKAGE_ARCH = "${SDK_ARCH}"
+PACKAGE_ARCH = "${BASE_PACKAGE_ARCH}"
+STAGING_DIR_TARGET = "${STAGING_DIR}/${SDK_ARCH}-nativesdk${SDK_VENDOR}-${SDK_OS}"
+
+TARGET_ARCH = "${SDK_ARCH}"
+TARGET_VENDOR = "${SDK_VENDOR}"
+TARGET_OS = "${SDK_OS}"
+TARGET_PREFIX = "${SDK_PREFIX}"
+TARGET_CC_ARCH = "${SDK_CC_ARCH}"
+
+
diff --git a/classes/nativesdk.bbclass b/classes/nativesdk.bbclass
new file mode 100644
index 0000000000..080adc5d77
--- /dev/null
+++ b/classes/nativesdk.bbclass
@@ -0,0 +1,78 @@
+# SDK packages are built either explicitly by the user,
+# or indirectly via dependency. No need to be in 'world'.
+EXCLUDE_FROM_WORLD = "1"
+
+#
+# Update BASE_PACKAGE_ARCH and PACKAGE_ARCHS
+#
+OLD_PACKAGE_ARCH := ${BASE_PACKAGE_ARCH}
+BASE_PACKAGE_ARCH = "${SDK_ARCH}-nativesdk"
+python () {
+ archs = bb.data.getVar('PACKAGE_ARCHS', d, True).split()
+ sdkarchs = []
+ for arch in archs:
+ sdkarchs.append(arch + '-nativesdk')
+ bb.data.setVar('PACKAGE_ARCHS', " ".join(sdkarchs), d)
+}
+
+#STAGING_DIR_HOST = "${STAGING_DIR}/${HOST_SYS}-nativesdk"
+#STAGING_DIR_TARGET = "${STAGING_DIR}/${BASEPKG_TARGET_SYS}-nativesdk"
+
+CROSS_DIR = "${TMPDIR}/cross/${HOST_ARCH}"
+
+HOST_ARCH = "${SDK_ARCH}"
+HOST_VENDOR = "${SDK_VENDOR}"
+HOST_OS = "${SDK_OS}"
+HOST_PREFIX = "${SDK_PREFIX}"
+HOST_CC_ARCH = "${SDK_CC_ARCH}"
+#HOST_SYS = "${HOST_ARCH}${TARGET_VENDOR}-${HOST_OS}"
+
+TARGET_ARCH = "${SDK_ARCH}"
+TARGET_VENDOR = "${SDK_VENDOR}"
+TARGET_OS = "${SDK_OS}"
+TARGET_PREFIX = "${SDK_PREFIX}"
+TARGET_CC_ARCH = "${SDK_CC_ARCH}"
+
+CPPFLAGS = "${BUILDSDK_CPPFLAGS}"
+CFLAGS = "${BUILDSDK_CFLAGS}"
+CXXFLAGS = "${BUILDSDK_CFLAGS}"
+LDFLAGS = "${BUILDSDK_LDFLAGS}"
+
+# Change to place files in SDKPATH
+prefix = "${SDKPATH}"
+exec_prefix = "${SDKPATH}"
+base_prefix = "${SDKPATH}"
+
+FILES_${PN} += "${prefix}"
+FILES_${PN}-dbg += "${prefix}/.debug \
+ ${prefix}/bin/.debug \
+ "
+
+export PKG_CONFIG_DIR = "${STAGING_DIR_HOST}${libdir}/pkgconfig"
+export PKG_CONFIG_SYSROOT_DIR = "${STAGING_DIR_HOST}"
+
+python __anonymous () {
+ pn = bb.data.getVar("PN", d, True)
+ depends = bb.data.getVar("DEPENDS", d, True)
+ deps = bb.utils.explode_deps(depends)
+ newdeps = []
+ for dep in deps:
+ if dep.endswith("-native") or dep.endswith("-cross"):
+ newdeps.append(dep)
+ elif dep.endswith("-gcc-intermediate") or dep.endswith("-gcc-initial") or dep.endswith("-gcc"):
+ newdeps.append(dep + "-crosssdk")
+ elif not dep.endswith("-nativesdk"):
+ newdeps.append(dep + "-nativesdk")
+ else:
+ newdeps.append(dep)
+ bb.data.setVar("DEPENDS", " ".join(newdeps), d)
+ provides = bb.data.getVar("PROVIDES", d, True)
+ for prov in provides.split():
+ if prov.find(pn) != -1:
+ continue
+ if not prov.endswith("-nativesdk"):
+ provides = provides.replace(prov, prov + "-nativesdk")
+ bb.data.setVar("PROVIDES", provides, d)
+}
+
+
diff --git a/classes/sdk.bbclass b/classes/sdk.bbclass
index eb34bd04b5..198d147cb3 100644
--- a/classes/sdk.bbclass
+++ b/classes/sdk.bbclass
@@ -1,3 +1,8 @@
+#
+# Note this class is deprecated and replaced by nativesdk.bbclass
+#
+
+
# SDK packages are built either explicitly by the user,
# or indirectly via dependency. No need to be in 'world'.
EXCLUDE_FROM_WORLD = "1"