]> code.ossystems Code Review - openembedded-core.git/commitdiff
native.bbclass: make TOOLCHAIN_OPTIONS empty
authorRobert Yang <liezhi.yang@windriver.com>
Thu, 15 Mar 2012 13:50:59 +0000 (21:50 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 19 Mar 2012 20:26:02 +0000 (20:26 +0000)
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@windriver.com>
meta/classes/native.bbclass

index 00196baba834d2f394b15690f5b544643bd949d8..871dda042631263ce46223eb1dde741ef527c282 100644 (file)
@@ -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