All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] meta: define REAL_MULTIMACH_TARGET_SYS/SDKTARGETSYSROOT in bitbake.conf
@ 2017-03-30  7:57 liu.ming50
  2017-03-30  8:53 ` Richard Purdie
  2017-03-30 15:34 ` Richard Purdie
  0 siblings, 2 replies; 4+ messages in thread
From: liu.ming50 @ 2017-03-30  7:57 UTC (permalink / raw)
  To: openembedded-core; +Cc: Ming Liu

From: Ming Liu <peter.x.liu@external.atlascopco.com>

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.

Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com>
---
 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(-)

diff --git a/meta/classes/populate_sdk_base.bbclass b/meta/classes/populate_sdk_base.bbclass
index 563582e..fd123f6 100644
--- a/meta/classes/populate_sdk_base.bbclass
+++ b/meta/classes/populate_sdk_base.bbclass
@@ -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"
diff --git a/meta/classes/toolchain-scripts.bbclass b/meta/classes/toolchain-scripts.bbclass
index 260ece9..ecf5c60 100644
--- a/meta/classes/toolchain-scripts.bbclass
+++ b/meta/classes/toolchain-scripts.bbclass
@@ -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"
 
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index 96a9ed9..3f5fbce 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -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.
diff --git a/meta/recipes-core/meta/meta-environment.bb b/meta/recipes-core/meta/meta-environment.bb
index 29da121..e7bff7d 100644
--- a/meta/recipes-core/meta/meta-environment.bb
+++ b/meta/recipes-core/meta/meta-environment.bb
@@ -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
 
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] meta: define REAL_MULTIMACH_TARGET_SYS/SDKTARGETSYSROOT in bitbake.conf
  2017-03-30  7:57 [PATCH] meta: define REAL_MULTIMACH_TARGET_SYS/SDKTARGETSYSROOT in bitbake.conf liu.ming50
@ 2017-03-30  8:53 ` Richard Purdie
  2017-03-30 15:34 ` Richard Purdie
  1 sibling, 0 replies; 4+ messages in thread
From: Richard Purdie @ 2017-03-30  8:53 UTC (permalink / raw)
  To: liu.ming50, openembedded-core; +Cc: Ming Liu

On Thu, 2017-03-30 at 09:57 +0200, liu.ming50@gmail.com wrote:
> From: Ming Liu <peter.x.liu@external.atlascopco.com>
> 
> 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.
> 
> Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com>
> ---
>  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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] meta: define REAL_MULTIMACH_TARGET_SYS/SDKTARGETSYSROOT in bitbake.conf
  2017-03-30  7:57 [PATCH] meta: define REAL_MULTIMACH_TARGET_SYS/SDKTARGETSYSROOT in bitbake.conf liu.ming50
  2017-03-30  8:53 ` Richard Purdie
@ 2017-03-30 15:34 ` Richard Purdie
  2017-03-30 16:41   ` Ming Liu
  1 sibling, 1 reply; 4+ messages in thread
From: Richard Purdie @ 2017-03-30 15:34 UTC (permalink / raw)
  To: liu.ming50, openembedded-core; +Cc: Ming Liu

On Thu, 2017-03-30 at 09:57 +0200, liu.ming50@gmail.com wrote:
> From: Ming Liu <peter.x.liu@external.atlascopco.com>
> 
> 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.

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] meta: define REAL_MULTIMACH_TARGET_SYS/SDKTARGETSYSROOT in bitbake.conf
  2017-03-30 15:34 ` Richard Purdie
@ 2017-03-30 16:41   ` Ming Liu
  0 siblings, 0 replies; 4+ messages in thread
From: Ming Liu @ 2017-03-30 16:41 UTC (permalink / raw)
  To: Richard Purdie; +Cc: Ming Liu, OE-core

[-- Attachment #1: Type: text/plain, Size: 1303 bytes --]

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 <
richard.purdie@linuxfoundation.org>:

> On Thu, 2017-03-30 at 09:57 +0200, liu.ming50@gmail.com wrote:
> > From: Ming Liu <peter.x.liu@external.atlascopco.com>
> >
> > 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.
>
> 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
>

[-- Attachment #2: Type: text/html, Size: 1940 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-03-30 16:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-30  7:57 [PATCH] meta: define REAL_MULTIMACH_TARGET_SYS/SDKTARGETSYSROOT in bitbake.conf liu.ming50
2017-03-30  8:53 ` Richard Purdie
2017-03-30 15:34 ` Richard Purdie
2017-03-30 16:41   ` Ming Liu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.