[OE-core] [PATCH 8/8] fix SDK building due TARGET_ARCH use in installation path

Richard Purdie richard.purdie at linuxfoundation.org
Fri Jul 8 15:38:48 UTC 2011


On Fri, 2011-07-08 at 13:47 +0000, Otavio Salvador wrote:
> TARGET_ARCH makes the building too fragile since it changes during
> building of target and nativesdk binaries thus making it difficult to
> handle a proper path for installation of binaries. The fix for it is
> to move it to toolchain tarball name.
> 
> Signed-off-by: Otavio Salvador <otavio at ossystems.com.br>
> ---
>  meta/classes/populate_sdk.bbclass |    2 +-
>  meta/conf/bitbake.conf            |    2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/meta/classes/populate_sdk.bbclass b/meta/classes/populate_sdk.bbclass
> index 089ed9a..03b6d0f 100644
> --- a/meta/classes/populate_sdk.bbclass
> +++ b/meta/classes/populate_sdk.bbclass
> @@ -9,7 +9,7 @@ SDKTARGETSYSROOT = "${SDKPATH}/sysroots/${TARGET_SYS}"
>  
>  TOOLCHAIN_HOST_TASK ?= "task-sdk-host-nativesdk task-cross-canadian-${TRANSLATED_TARGET_ARCH}"
>  TOOLCHAIN_TARGET_TASK ?= "task-core-standalone-sdk-target task-core-standalone-sdk-target-dbg"
> -TOOLCHAIN_OUTPUTNAME ?= "${SDK_NAME}-toolchain-${DISTRO_VERSION}"
> +TOOLCHAIN_OUTPUTNAME ?= "${SDK_NAME}-${SDK_ARCH}-${TARGET_ARCH}-toolchain-${DISTRO_VERSION}"
>  
>  RDEPENDS = "${TOOLCHAIN_TARGET_TASK} ${TOOLCHAIN_HOST_TASK}"
>  DEPENDS = "virtual/fakeroot-native sed-native"
> diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
> index bdaa35d..cc2b8e2 100644
> --- a/meta/conf/bitbake.conf
> +++ b/meta/conf/bitbake.conf
> @@ -341,7 +341,7 @@ DEPLOY_DIR_TOOLS = "${DEPLOY_DIR}/tools"
>  
>  PKGDATA_DIR = "${TMPDIR}/pkgdata/${MULTIMACH_TARGET_SYS}"
>  
> -SDK_NAME = "oecore-${SDK_ARCH}-${TARGET_ARCH}"
> +SDK_NAME = "oecore-sdk-${DISTRO}"
>  SDKPATH = "/usr/local/${SDK_NAME}"
>  SDKPATHNATIVE = "${SDKPATH}/sysroots/${SDK_SYS}"

I'd really like Koen to take a look at this with his Angstrom hat on. I
still suspect the better fix for this is likely to end up with:

 SDK_NAME = "oecore-${SDK_ARCH}-${TARGET_ARCH}"
-SDKPATH = "/usr/local/${SDK_NAME}"
+SDKPATH = "/usr/local/oecore-sdk-${DISTRO}"
 SDKPATHNATIVE = "${SDKPATH}/sysroots/${SDK_SYS}"

Certainly having TARGET_ARCH in SDKPATH is a bad idea but I think the
SDK_NAME variable could make sense as it is originally...

Cheers,

Richard





More information about the Openembedded-core mailing list