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

login
register
mail settings
Submitter Otavio Salvador
Date Aug. 20, 2011, 4:58 a.m.
Message ID <7fbda567f12cd48df2dc292b370109681ce39cfb.1313816148.git.otavio@ossystems.com.br>
Download mbox | patch
Permalink /patch/10313/
State New, archived
Headers show

Comments

Otavio Salvador - Aug. 20, 2011, 4:58 a.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(-)
Saul Wold - Aug. 22, 2011, 9:58 p.m.
On 08/19/2011 09:58 PM, 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 0f3591b..929f730 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 b309516..b5c6696 100644
> --- a/meta/conf/bitbake.conf
> +++ b/meta/conf/bitbake.conf
> @@ -361,7 +361,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}"
>
This is the same set that has been rejected before.

I think this has been discussed before between Richard and Koen, Koen 
was going to look into a variation that Richard suggested, I am not sure 
if Koen has replied to that email (from back in early July).

Sau!
Otavio Salvador - Aug. 23, 2011, 11:54 a.m.
On Mon, Aug 22, 2011 at 18:58, Saul Wold <sgw@linux.intel.com> wrote:
> On 08/19/2011 09:58 PM, 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.
...
> This is the same set that has been rejected before.
>
> I think this has been discussed before between Richard and Koen, Koen was
> going to look into a variation that Richard suggested, I am not sure if Koen
> has replied to that email (from back in early July).

It seems that the current way is broken and this even this solution is
not perfect this improves it a lot and works for most use cases.

Richard and Koen might make clear their concerns about it and then we
work to fix them, otherwise this is better then what we have now.

Patch

diff --git a/meta/classes/populate_sdk.bbclass b/meta/classes/populate_sdk.bbclass
index 0f3591b..929f730 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 b309516..b5c6696 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -361,7 +361,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}"