[oe] [PATCH] native.bbclass: add (re)definitions for TARGET_SYS and HOST_SYS

Frans Meulenbroeks fransmeulenbroeks at gmail.com
Fri Aug 20 14:19:37 UTC 2010


Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks at gmail.com>
---

The issue at hand was discovered by setting 
TARGET_OS_local = "linux-gnuspe"
in my local.conf file as I needed to build for ppc e500
This caused configure of gmp-native to be called with
--build=x86_64-linux --host=x86_64-linux --target=x86_64-linux-gnuspe
which in turn caused configure to fail.
The odd thing is that for a native recipe I would expect
that build host and target gets the same args.

The configure line comes from autotools.bbclass 
which says:
CONFIGUREOPTS = " --build=${BUILD_SYS} \
                  --host=${HOST_SYS} \
                  --target=${TARGET_SYS} \

Apparently HOST_SYS and TARGET_SYS are not identical for native recipes
Peeking into native.bbclass learned that things like TARGET_PREFIX and
HOST_PREFIX are redefined, but TARGET_SYS and HOST_SYS are not.

This patch adds assignments to fix this.
I have tested this by building the image I am working on 
(which includes some low level stuff like kernel and u-boot, and 
also requires that lots of native recipes are build)
No problem was detected during that test.

If TARGET_OS = "linux" this will not make any difference for you.
If your TARGET_OS = "linux-gnuspe" like it is for me and your
build system has "linux" as OS, a side effect of this change
is that a rebuild is needed as the work dir will change
from (in my case) x68_64-linux to x86_64-linux-gnuspe
It might be that a full rebuild is needed in that case
(haven't tested that case)

Frans

 classes/native.bbclass |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/classes/native.bbclass b/classes/native.bbclass
index 3437836..85c7cf1 100644
--- a/classes/native.bbclass
+++ b/classes/native.bbclass
@@ -23,6 +23,7 @@ TARGET_VENDOR = "${BUILD_VENDOR}"
 TARGET_PREFIX = "${BUILD_PREFIX}"
 TARGET_CC_ARCH = "${BUILD_CC_ARCH}"
 TARGET_EXEEXT = "${BUILD_EXEEXT}"
+TARGET_SYS = "${BUILD_SYS}"
 
 HOST_ARCH = "${BUILD_ARCH}"
 HOST_OS = "${BUILD_OS}"
@@ -30,6 +31,7 @@ HOST_VENDOR = "${BUILD_VENDOR}"
 HOST_PREFIX = "${BUILD_PREFIX}"
 HOST_CC_ARCH = "${BUILD_CC_ARCH}"
 HOST_EXEEXT = "${BUILD_EXEEXT}"
+HOST_SYS = "${BUILD_SYS}"
 
 CPPFLAGS = "${BUILD_CPPFLAGS}"
 CFLAGS = "${BUILD_CFLAGS}"
-- 
1.7.0.4





More information about the Openembedded-devel mailing list