Patchwork [8/8] fix SDK building due TARGET_ARCH use in installation path

login
register
mail settings
Submitter Otavio Salvador
Date July 8, 2011, 1:47 p.m.
Message ID <73f52ab56a2f932082e954f5650896cdee010fee.1310132765.git.otavio@ossystems.com.br>
Download mbox | patch
Permalink /patch/7245/
State New, archived
Headers show

Comments

Otavio Salvador - July 8, 2011, 1:47 p.m.
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@ossystems.com.br>
---
 meta/classes/populate_sdk.bbclass |    2 +-
 meta/conf/bitbake.conf            |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
Richard Purdie - July 8, 2011, 3:38 p.m.
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@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
Koen Kooi - July 8, 2011, 4:12 p.m.
I'll take a look when I get back into the country next week

Op 8 jul. 2011 om 16:38 heeft Richard Purdie <richard.purdie@linuxfoundation.org> het volgende geschreven:

> 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@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
>

Patch

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}"