summaryrefslogtreecommitdiff
path: root/meta/classes
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2011-07-11 14:44:04 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-07-25 14:19:54 +0100
commitd5521be2dcbaf213c140b0d12a4176380874426b (patch)
tree2b1fa72679cc84101a9ae230599902ffc4a93730 /meta/classes
parent7ebc7a5cb30e13217dc297994a6d9656b52bacba (diff)
downloadopenembedded-core-d5521be2dcbaf213c140b0d12a4176380874426b.tar.gz
openembedded-core-d5521be2dcbaf213c140b0d12a4176380874426b.tar.bz2
openembedded-core-d5521be2dcbaf213c140b0d12a4176380874426b.zip
bitbake.conf/classes: Variable cleanup
This patch removes the variables BASE_PACKAGE_ARCH, BASEPKG_HOST_SYS, BASEPKG_TARGET_SYS and also removes the immediate assignments in several core classes as these are no longer required. This should make it clearer what some of the core variables do and simplfy some overly complex and confusing class code. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/allarch.bbclass1
-rw-r--r--meta/classes/cross-canadian.bbclass13
-rw-r--r--meta/classes/cross.bbclass14
-rw-r--r--meta/classes/crosssdk.bbclass4
-rw-r--r--meta/classes/native.bbclass4
-rw-r--r--meta/classes/nativesdk.bbclass11
-rw-r--r--meta/classes/sstate.bbclass6
7 files changed, 17 insertions, 36 deletions
diff --git a/meta/classes/allarch.bbclass b/meta/classes/allarch.bbclass
index e3ac3922ed..26fca70635 100644
--- a/meta/classes/allarch.bbclass
+++ b/meta/classes/allarch.bbclass
@@ -2,7 +2,6 @@
# This class is used for architecture independent recipes/data files (usally scripts)
#
-BASE_PACKAGE_ARCH = "all"
PACKAGE_ARCH = "all"
# No need for virtual/libc or a cross compiler
diff --git a/meta/classes/cross-canadian.bbclass b/meta/classes/cross-canadian.bbclass
index edd51da87b..c878d7f5a5 100644
--- a/meta/classes/cross-canadian.bbclass
+++ b/meta/classes/cross-canadian.bbclass
@@ -9,15 +9,12 @@
# or indirectly via dependency. No need to be in 'world'.
EXCLUDE_FROM_WORLD = "1"
-STAGING_BINDIR_TOOLCHAIN = "${STAGING_DIR_NATIVE}${bindir_native}/${SDK_ARCH}${SDK_VENDOR}-${SDK_OS}:${STAGING_DIR_NATIVE}${bindir_native}/${OLD_BASE_PACKAGE_ARCH}${TARGET_VENDOR}-${TARGET_OS}"
+STAGING_BINDIR_TOOLCHAIN = "${STAGING_DIR_NATIVE}${bindir_native}/${SDK_ARCH}${SDK_VENDOR}-${SDK_OS}:${STAGING_DIR_NATIVE}${bindir_native}/${TUNE_PKGARCH}${TARGET_VENDOR}-${TARGET_OS}"
#
# Update BASE_PACKAGE_ARCH and PACKAGE_ARCHS
#
-OLD_PACKAGE_ARCH := "${PACKAGE_ARCH}"
-OLD_MULTIMACH_TARGET_SYS := "${MULTIMACH_TARGET_SYS}"
-OLD_BASE_PACKAGE_ARCH := ${BASE_PACKAGE_ARCH}
-BASE_PACKAGE_ARCH = "${SDK_ARCH}-nativesdk"
+PACKAGE_ARCH = "${SDK_ARCH}-nativesdk"
python () {
archs = bb.data.getVar('PACKAGE_ARCHS', d, True).split()
sdkarchs = []
@@ -66,12 +63,12 @@ target_exec_prefix := "${exec_prefix}"
base_prefix = "${SDKPATHNATIVE}"
prefix = "${SDKPATHNATIVE}${prefix_nativesdk}"
exec_prefix = "${SDKPATHNATIVE}${prefix_nativesdk}"
-bindir = "${exec_prefix}/bin/${OLD_PACKAGE_ARCH}${TARGET_VENDOR}-${TARGET_OS}"
+bindir = "${exec_prefix}/bin/${TUNE_PKGARCH}${TARGET_VENDOR}-${TARGET_OS}"
sbindir = "${bindir}"
base_bindir = "${bindir}"
base_sbindir = "${bindir}"
-libdir = "${exec_prefix}/lib/${OLD_PACKAGE_ARCH}${TARGET_VENDOR}-${TARGET_OS}"
-libexecdir = "${exec_prefix}/libexec/${OLD_PACKAGE_ARCH}${TARGET_VENDOR}-${TARGET_OS}"
+libdir = "${exec_prefix}/lib/${TUNE_PKGARCH}${TARGET_VENDOR}-${TARGET_OS}"
+libexecdir = "${exec_prefix}/libexec/${TUNE_PKGARCH}${TARGET_VENDOR}-${TARGET_OS}"
FILES_${PN} = "${prefix}"
FILES_${PN}-dbg += "${prefix}/.debug \
diff --git a/meta/classes/cross.bbclass b/meta/classes/cross.bbclass
index 81358ec8dd..050d63e412 100644
--- a/meta/classes/cross.bbclass
+++ b/meta/classes/cross.bbclass
@@ -4,14 +4,6 @@ inherit relocatable
# no need for them to be a direct target of 'world'
EXCLUDE_FROM_WORLD = "1"
-# Save PACKAGE_ARCH before changing HOST_ARCH
-OLD_PACKAGE_ARCH := "${PACKAGE_ARCH}"
-PACKAGE_ARCH = "${OLD_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}"
-BASEPKG_HOST_SYS = "${HOST_ARCH}${HOST_VENDOR}-${HOST_OS}"
-
PACKAGES = ""
HOST_ARCH = "${BUILD_ARCH}"
@@ -20,10 +12,10 @@ HOST_OS = "${BUILD_OS}"
HOST_PREFIX = "${BUILD_PREFIX}"
HOST_CC_ARCH = "${BUILD_CC_ARCH}"
-STAGING_DIR_HOST = "${STAGING_DIR}/${BASEPKG_HOST_SYS}"
+STAGING_DIR_HOST = "${STAGING_DIR}/${HOST_ARCH}${HOST_VENDOR}-${HOST_OS}"
-export PKG_CONFIG_DIR = "${STAGING_DIR}/${BASE_PACKAGE_ARCH}${TARGET_VENDOR}-${TARGET_OS}${libdir}/pkgconfig"
-export PKG_CONFIG_SYSROOT_DIR = "${STAGING_DIR}/${BASE_PACKAGE_ARCH}${TARGET_VENDOR}-${TARGET_OS}"
+export PKG_CONFIG_DIR = "${STAGING_DIR}/${TUNE_PKGARCH}${TARGET_VENDOR}-${TARGET_OS}${libdir}/pkgconfig"
+export PKG_CONFIG_SYSROOT_DIR = "${STAGING_DIR}/${TUNE_PKGARCH}${TARGET_VENDOR}-${TARGET_OS}"
CPPFLAGS = "${BUILD_CPPFLAGS}"
CFLAGS = "${BUILD_CFLAGS}"
diff --git a/meta/classes/crosssdk.bbclass b/meta/classes/crosssdk.bbclass
index 3952ebdca4..a2e5a222fc 100644
--- a/meta/classes/crosssdk.bbclass
+++ b/meta/classes/crosssdk.bbclass
@@ -1,8 +1,8 @@
inherit cross
-BASE_PACKAGE_ARCH = "${SDK_ARCH}"
-PACKAGE_ARCH = "${BASE_PACKAGE_ARCH}"
+PACKAGE_ARCH = "${SDK_ARCH}"
STAGING_DIR_TARGET = "${STAGING_DIR}/${SDK_ARCH}-nativesdk${SDK_VENDOR}-${SDK_OS}"
+STAGING_BINDIR_TOOLCHAIN = "${STAGING_DIR_NATIVE}${bindir_native}/${TARGET_ARCH}${TARGET_VENDOR}-${TARGET_OS}"
TARGET_ARCH = "${SDK_ARCH}"
TARGET_VENDOR = "${SDK_VENDOR}"
diff --git a/meta/classes/native.bbclass b/meta/classes/native.bbclass
index 1e8de95207..00f7b9f02d 100644
--- a/meta/classes/native.bbclass
+++ b/meta/classes/native.bbclass
@@ -15,10 +15,6 @@ PACKAGE_ARCH = "${BUILD_ARCH}"
OECMAKE_RPATH = "${libdir}"
OECMAKE_RPATH_virtclass-native = "${libdir}"
-BASE_PACKAGE_ARCH = "${BUILD_ARCH}"
-BASEPKG_HOST_SYS = "${BUILD_ARCH}${BUILD_VENDOR}-${BUILD_OS}"
-BASEPKG_TARGET_SYS = "${BUILD_ARCH}${BUILD_VENDOR}-${BUILD_OS}"
-
# When this class has packaging enabled, setting
# RPROVIDES becomes unnecessary.
RPROVIDES = "${PN}"
diff --git a/meta/classes/nativesdk.bbclass b/meta/classes/nativesdk.bbclass
index 3fe4bf9a07..de7a88317c 100644
--- a/meta/classes/nativesdk.bbclass
+++ b/meta/classes/nativesdk.bbclass
@@ -5,10 +5,9 @@ EXCLUDE_FROM_WORLD = "1"
STAGING_BINDIR_TOOLCHAIN = "${STAGING_DIR_NATIVE}${bindir_native}/${SDK_ARCH}${SDK_VENDOR}-${SDK_OS}"
#
-# Update BASE_PACKAGE_ARCH and PACKAGE_ARCHS
+# Update PACKAGE_ARCH and PACKAGE_ARCHS
#
-OLD_PACKAGE_ARCH := ${BASE_PACKAGE_ARCH}
-BASE_PACKAGE_ARCH = "${SDK_ARCH}-nativesdk"
+PACKAGE_ARCH = "${SDK_ARCH}-nativesdk"
python () {
archs = bb.data.getVar('PACKAGE_ARCHS', d, True).split()
sdkarchs = []
@@ -17,10 +16,8 @@ python () {
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"
-STAGING_DIR_HOST = "${STAGING_DIR}/${BASEPKG_HOST_SYS}"
-STAGING_DIR_TARGET = "${STAGING_DIR}/${BASEPKG_TARGET_SYS}"
+STAGING_DIR_HOST = "${STAGING_DIR}/${MULTIMACH_HOST_SYS}"
+STAGING_DIR_TARGET = "${STAGING_DIR}/${MULTIMACH_TARGET_SYS}"
HOST_ARCH = "${SDK_ARCH}"
HOST_VENDOR = "${SDK_VENDOR}"
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
index 62c7c4327e..c057cc7441 100644
--- a/meta/classes/sstate.bbclass
+++ b/meta/classes/sstate.bbclass
@@ -22,14 +22,14 @@ python () {
if bb.data.inherits_class('native', d):
bb.data.setVar('SSTATE_PKGARCH', bb.data.getVar('BUILD_ARCH', d), d)
elif bb.data.inherits_class('cross', d):
- bb.data.setVar('SSTATE_PKGARCH', bb.data.expand("${BUILD_ARCH}_${BASE_PACKAGE_ARCH}", d), d)
+ bb.data.setVar('SSTATE_PKGARCH', bb.data.expand("${BUILD_ARCH}_${TUNE_PKGARCH}", d), d)
bb.data.setVar('SSTATE_MANMACH', bb.data.expand("${BUILD_ARCH}_${MACHINE}", d), d)
elif bb.data.inherits_class('crosssdk', d):
- bb.data.setVar('SSTATE_PKGARCH', bb.data.expand("${BUILD_ARCH}_${BASE_PACKAGE_ARCH}", d), d)
+ bb.data.setVar('SSTATE_PKGARCH', bb.data.expand("${BUILD_ARCH}_${PACKAGE_ARCH}", d), d)
elif bb.data.inherits_class('nativesdk', d):
bb.data.setVar('SSTATE_PKGARCH', bb.data.expand("${SDK_ARCH}", d), d)
elif bb.data.inherits_class('cross-canadian', d):
- bb.data.setVar('SSTATE_PKGARCH', bb.data.expand("${SDK_ARCH}_${BASE_PACKAGE_ARCH}", d), d)
+ bb.data.setVar('SSTATE_PKGARCH', bb.data.expand("${SDK_ARCH}_${PACKAGE_ARCH}", d), d)
else:
bb.data.setVar('SSTATE_MANMACH', bb.data.expand("${MACHINE}", d), d)