diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-07-11 14:44:04 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-07-25 14:19:54 +0100 |
commit | d5521be2dcbaf213c140b0d12a4176380874426b (patch) | |
tree | 2b1fa72679cc84101a9ae230599902ffc4a93730 | |
parent | 7ebc7a5cb30e13217dc297994a6d9656b52bacba (diff) | |
download | openembedded-core-contrib-d5521be2dcbaf213c140b0d12a4176380874426b.tar.gz |
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>
-rw-r--r-- | meta/classes/allarch.bbclass | 1 | ||||
-rw-r--r-- | meta/classes/cross-canadian.bbclass | 13 | ||||
-rw-r--r-- | meta/classes/cross.bbclass | 14 | ||||
-rw-r--r-- | meta/classes/crosssdk.bbclass | 4 | ||||
-rw-r--r-- | meta/classes/native.bbclass | 4 | ||||
-rw-r--r-- | meta/classes/nativesdk.bbclass | 11 | ||||
-rw-r--r-- | meta/classes/sstate.bbclass | 6 | ||||
-rw-r--r-- | meta/conf/bitbake.conf | 7 | ||||
-rw-r--r-- | meta/recipes-graphics/xorg-font/font-util_1.2.0.bb | 2 |
9 files changed, 19 insertions, 43 deletions
diff --git a/meta/classes/allarch.bbclass b/meta/classes/allarch.bbclass index e3ac3922ed6..26fca706352 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 edd51da87b8..c878d7f5a59 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 81358ec8dde..050d63e4122 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 3952ebdca4d..a2e5a222fcd 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 1e8de95207b..00f7b9f02d0 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 3fe4bf9a07e..de7a88317c2 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 62c7c4327ec..c057cc7441b 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) diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf index 2954faa5d0b..9d1c7690bc9 100644 --- a/meta/conf/bitbake.conf +++ b/meta/conf/bitbake.conf @@ -98,8 +98,7 @@ SDK_SYS = "${SDK_ARCH}${SDK_VENDOR}${@['-' + bb.data.getVar('SDK_OS', d, 1), ''] SDK_PREFIX = "${SDK_SYS}-" SDK_CC_ARCH = "${BUILD_CC_ARCH}" -BASE_PACKAGE_ARCH = "${TUNE_PKGARCH}" -PACKAGE_ARCH = "${BASE_PACKAGE_ARCH}" +PACKAGE_ARCH = "${TUNE_PKGARCH}" MACHINE_ARCH = "${@[bb.data.getVar('TUNE_PKGARCH', d, 1), bb.data.getVar('MACHINE', d, 1)][bool(bb.data.getVar('MACHINE', d, 1))].replace('-', '_')}" PACKAGE_EXTRA_ARCHS ??= "${TARGET_ARCH}" PACKAGE_ARCHS = "all any noarch ${PACKAGE_EXTRA_ARCHS} ${MACHINE_ARCH}" @@ -109,8 +108,6 @@ PACKAGE_ARCHS[vardepsexclude] = "MACHINE_ARCH" MULTIMACH_TARGET_SYS = "${PACKAGE_ARCH}${TARGET_VENDOR}-${TARGET_OS}" MULTIMACH_HOST_SYS = "${PACKAGE_ARCH}${HOST_VENDOR}-${HOST_OS}" -BASEPKG_HOST_SYS = "${BASE_PACKAGE_ARCH}${HOST_VENDOR}-${HOST_OS}" -BASEPKG_TARGET_SYS = "${BASE_PACKAGE_ARCH}${TARGET_VENDOR}-${TARGET_OS}" # select proper CPU to get binary locales generated QEMU_OPTIONS = "" @@ -317,7 +314,7 @@ STAGING_DIR = "${TMPDIR}/sysroots" STAGING_DIR_NATIVE = "${STAGING_DIR}/${BUILD_SYS}" STAGING_BINDIR_NATIVE = "${STAGING_DIR_NATIVE}${bindir_native}" STAGING_BINDIR_CROSS = "${STAGING_BINDIR}/crossscripts" -STAGING_BINDIR_TOOLCHAIN = "${STAGING_DIR_NATIVE}${bindir_native}/${BASEPKG_TARGET_SYS}" +STAGING_BINDIR_TOOLCHAIN = "${STAGING_DIR_NATIVE}${bindir_native}/${TUNE_PKGARCH}${TARGET_VENDOR}-${TARGET_OS}" STAGING_LIBDIR_NATIVE = "${STAGING_DIR_NATIVE}${libdir_native}" STAGING_INCDIR_NATIVE = "${STAGING_DIR_NATIVE}${includedir_native}" STAGING_ETCDIR_NATIVE = "${STAGING_DIR_NATIVE}${sysconfdir_native}" diff --git a/meta/recipes-graphics/xorg-font/font-util_1.2.0.bb b/meta/recipes-graphics/xorg-font/font-util_1.2.0.bb index a04bd6d5a34..88347086443 100644 --- a/meta/recipes-graphics/xorg-font/font-util_1.2.0.bb +++ b/meta/recipes-graphics/xorg-font/font-util_1.2.0.bb @@ -8,8 +8,6 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=c0067273d90f6336008cb2504e14bd32 \ file://bdftruncate.c;endline=26;md5=4f82ffc101a1b165eae9c6998abff937 \ file://map-ISO8859-1;beginline=9;endline=23;md5=1cecb984063248f29ffe5c46f5c04f34" -PACKAGE_ARCH = "${BASE_PACKAGE_ARCH}" - DEPENDS = "encodings util-macros" DEPENDS_virtclass-native = "util-macros-native" RDEPENDS_${PN} = "mkfontdir mkfontscale encodings" |