[oe-commits] Robert Yang : native.bbclass: make TOOLCHAIN_OPTIONS empty

git at git.openembedded.org git at git.openembedded.org
Mon Mar 19 20:31:28 UTC 2012


Module: openembedded-core.git
Branch: master
Commit: e5555c743a9637f86a0a2c4c45a63a80838e81ae
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=e5555c743a9637f86a0a2c4c45a63a80838e81ae

Author: Robert Yang <liezhi.yang at windriver.com>
Date:   Thu Mar 15 21:50:59 2012 +0800

native.bbclass: make TOOLCHAIN_OPTIONS empty

The native pkg doesn't need the TOOLCHAIN_OPTIONS, but it maybe used by
native pkgs, for example, the cmake.bbclass uses TOOLCHAIN_OPTIONS:

OECMAKE_C_FLAGS ?= "${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} ${CPPFLAGS}"

and TOOLCHAIN_OPTIONS is:
TOOLCHAIN_OPTIONS = " --sysroot=${STAGING_DIR_TARGET}"

If a native pkg inherits cmake.bbclass, then:
TOOLCHAIN_OPTIONS = " --sysroot="

and OECMAKE_C_FLAGS would be:
${HOST_CC_ARCH} --sysroot= ${CPPFLAGS}

This would cause unexpected errors, I think that we can make
TOOLCHAIN_OPTIONS empty in native.bbclass since native pkg doesn't need
it.

[YOCTO #2124]

Signed-off-by: Robert Yang <liezhi.yang at windriver.com>

---

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

diff --git a/meta/classes/native.bbclass b/meta/classes/native.bbclass
index 00196ba..871dda0 100644
--- a/meta/classes/native.bbclass
+++ b/meta/classes/native.bbclass
@@ -45,6 +45,9 @@ LDFLAGS_build-darwin = "-L${STAGING_LIBDIR_NATIVE} "
 STAGING_BINDIR = "${STAGING_BINDIR_NATIVE}"
 STAGING_BINDIR_CROSS = "${STAGING_BINDIR_NATIVE}"
 
+# native pkg doesn't need the TOOLCHAIN_OPTIONS.
+TOOLCHAIN_OPTIONS = ""
+
 DEPENDS_GETTEXT = "gettext-native"
 
 # Don't use site files for native builds





More information about the Openembedded-commits mailing list