meta: define REAL_MULTIMACH_TARGET_SYS/SDKTARGETSYSROOT in bitbake.conf
PATCH 1/1 meta: define REAL_MULTIMACH_TARGET_SYS/SDKTARGETSYSROOT in bitbake.conf
From: Ming Liu <[email protected]>
REAL_MULTIMACH_TARGET_SYS is being defined and referred in several recipes, which is redundant and not easy to be overriden, and SDKTARGETSYSROOT is also defined in two recipes.
So move their definitions to bitbake.conf.
--- meta/classes/populate_sdk_base.bbclass | 6 ------ meta/classes/toolchain-scripts.bbclass | 3 --- meta/conf/bitbake.conf | 2 ++ meta/recipes-core/meta/meta-environment.bb | 3 --- 4 files changed, 2 insertions(+), 12 deletions(-)
meta/classes/populate_sdk_base.bbclass +0 -6
@@ -30,8 +30,6 @@ SDKDEPLOYDIR = "${WORKDIR}/${SDKMACHINE}-deploy-${PN}-populate-sdk" B_task-populate-sdk = "${SDK_DIR}" -SDKTARGETSYSROOT = "${SDKPATH}/sysroots/${REAL_MULTIMACH_TARGET_SYS}" - TOOLCHAIN_HOST_TASK ?= "nativesdk-packagegroup-sdk-host packagegroup-cross-canadian-${MACHINE}" TOOLCHAIN_HOST_TASK_ATTEMPTONLY ?= "" TOOLCHAIN_TARGET_TASK ?= "${@multilib_pkg_extend(d, 'packagegroup-core-standalone-sdk-target')}"
@@ -41,10 +39,6 @@ TOOLCHAIN_OUTPUTNAME ?= "${SDK_NAME}-toolchain-${SDK_VERSION}" SDK_RDEPENDS = "${TOOLCHAIN_TARGET_TASK} ${TOOLCHAIN_HOST_TASK}" SDK_DEPENDS = "virtual/fakeroot-native pixz-native" -# We want the MULTIARCH_TARGET_SYS to point to the TUNE_PKGARCH, not PACKAGE_ARCH as it -# could be set to the MACHINE_ARCH -REAL_MULTIMACH_TARGET_SYS = "${TUNE_PKGARCH}${TARGET_VENDOR}-${TARGET_OS}" - PID = "${@os.getpid()}" EXCLUDE_FROM_WORLD = "1"
meta/classes/toolchain-scripts.bbclass +0 -3
@@ -1,8 +1,5 @@ inherit toolchain-scripts-base siteinfo kernel-arch -# We want to be able to change the value of MULTIMACH_TARGET_SYS, because it -# doesn't always match our expectations... but we default to the stock value -REAL_MULTIMACH_TARGET_SYS ?= "${MULTIMACH_TARGET_SYS}" TARGET_CC_ARCH_append_libc-uclibc = " -muclibc" TARGET_CC_ARCH_append_libc-musl = " -mmusl"
meta/conf/bitbake.conf +2 -0
@@ -151,6 +151,7 @@ PACKAGE_ARCHS[vardepsexclude] = "MACHINE_ARCH" MULTIMACH_TARGET_SYS = "${PACKAGE_ARCH}${TARGET_VENDOR}-${TARGET_OS}" MULTIMACH_HOST_SYS = "${PACKAGE_ARCH}${HOST_VENDOR}-${HOST_OS}" +REAL_MULTIMACH_TARGET_SYS ?= "${TUNE_PKGARCH}${TARGET_VENDOR}-${TARGET_OS}" ################################################################## # Date/time variables.
@@ -400,6 +401,7 @@ SDK_NAME_PREFIX ?= "oecore" SDK_NAME = "${SDK_NAME_PREFIX}-${SDK_ARCH}-${TUNE_PKGARCH}" SDKPATH = "/usr/local/${SDK_NAME_PREFIX}-${SDK_ARCH}" SDKPATHNATIVE = "${SDKPATH}/sysroots/${SDK_SYS}" +SDKTARGETSYSROOT = "${SDKPATH}/sysroots/${REAL_MULTIMACH_TARGET_SYS}" ################################################################## # Kernel info.
meta/recipes-core/meta/meta-environment.bb +0 -3
@@ -6,8 +6,6 @@ EXCLUDE_FROM_WORLD = "1" MODIFYTOS = "0" -REAL_MULTIMACH_TARGET_SYS = "${TUNE_PKGARCH}${TARGET_VENDOR}-${TARGET_OS}" - inherit toolchain-scripts TOOLCHAIN_NEED_CONFIGSITE_CACHE_append = " zlib" # Need to expand here before cross-candian changes HOST_ARCH -> SDK_ARCH
@@ -15,7 +13,6 @@ TOOLCHAIN_CONFIGSITE_NOCACHE := "${TOOLCHAIN_CONFIGSITE_NOCACHE}" SDK_DIR = "${WORKDIR}/sdk" SDK_OUTPUT = "${SDK_DIR}/image" -SDKTARGETSYSROOT = "${SDKPATH}/sysroots/${REAL_MULTIMACH_TARGET_SYS}" inherit cross-canadian
Signature · 1 line
2.7.4
Quoted 8 lines · On Thu, 2017-03-30 at 09:57 +0200, [email protected] wrote:
From: Ming Liu <[email protected]>
REAL_MULTIMACH_TARGET_SYSis being defined and referred in several recipes, which is redundant and not easy to be overriden, and SDKTARGETSYSROOT is also defined in two recipes.So move their definitions to bitbake.conf.
Quoted 7 lines
Signed-off-by Ming Liu <[email protected]>---
meta/classes/populate_sdk_base.bbclass | 6 ------ meta/classes/toolchain-scripts.bbclass | 3 --- meta/conf/bitbake.conf | 2 ++ meta/recipes-core/meta/meta-environment.bb | 3 ---4 files changed, 2 insertions(+), 12 deletions(-)
To be honest, REAL_MULTIMACH_TARGET_SYS is a hack and I'd prefer to find ways to remove the need for it (and perhaps the other MULTIMACH* variables). I'd therefore prefer not to move this to bitbake.conf which would give the impression its something we want to encourage (we don't).
Cheers,
Richard
Quoted 7 lines · On Thu, 2017-03-30 at 09:57 +0200, [email protected] wrote:
From: Ming Liu <[email protected]>
REAL_MULTIMACH_TARGET_SYSis being defined and referred in several recipes, which is redundant and not easy to be overriden, and SDKTARGETSYSROOT is also defined in two recipes.So move their definitions to bitbake.conf.
I have been wondering why you're needing to customise REAL_MULTIMACH_TARGET_SYS? Are you having trouble with arm multilibs? If so, the patches I just sent out might be useful...
Cheers,
Richard
Hi, Richard:
No, it's not about multilib, but just some special requirement from my company, we have 2 IMX5 machines and we want to separate the sdk install path for them, so it's decided we append the ${MACHINE} to REAL_MULTIMACH_TARGET_SYS, but in current poky, to achieve it, I need extend two recipes, meta-environment.bbappend and populate_sdk_base inheritor, since I can not override it in a conf file, otherwise some other "REAL_MULTIMACH_TARGET_SYS = "none"" setting will be overriden as well.
BTW, do you mean this patch: "multilib_header: Update wrapper to handle arm 32/64 bit"?
//Ming Liu
2017-03-30 17:34 GMT+02:00 Richard Purdie <
[email protected]>:
Quoted 17 lines · On Thu, 2017-03-30 at 09:57 +0200, [email protected] wrote:
Quoted 7 lines
From: Ming Liu <[email protected]>
REAL_MULTIMACH_TARGET_SYSis being defined and referred in several recipes, which is redundant and not easy to be overriden, and SDKTARGETSYSROOT is also defined in two recipes.So move their definitions to bitbake.conf.
I have been wondering why you're needing to customise
REAL_MULTIMACH_TARGET_SYS? Are you having trouble with arm multilibs? If so, the patches I just sent out might be useful...Cheers,
Richard