Skip to contentSkip to conversation

bitbake.conf, native*.bbclass: pass --sysroot to TOOLCHAIN_OPTIONS

PATCH RESEND New Denys Dmytriyenko 1 participant 1 message Feb 25, 2011

lore
Share & tools
lore
#0 lore raw

PATCH RESEND 1/3 bitbake.conf, native*.bbclass: pass --sysroot to TOOLCHAIN_OPTIONS

From: Denys Dmytriyenko <[email protected]>

Commit 9c5b9db29738a89837917b1a2d8ee5a1cae0b4cc (bitbake.conf: Simplify TARGET_CPPFLAGS/LDFLAGS) potentially breaks external toolchains, when their default sysroot is different from our sysroot/staging location.

Pass default --sysroot to compiler/linker through TOOLCHAIN_OPTIONS, avoiding native and nativesdk packages. This matches the corresponding changes in Poky. cross.bbclass was already doing it, since it originated from Poky, AFAIK.

---
 classes/native.bbclass    |    2 ++
 classes/nativesdk.bbclass |    2 ++
 conf/bitbake.conf         |    2 +-
 3 files changed, 5 insertions(+), 1 deletions(-)
classes/native.bbclass +2 -0
index 000ad61..b8a792f 100644
@@ -37,6 +37,8 @@ CXXFLAGS = "${BUILD_CFLAGS}"
 LDFLAGS = "${BUILD_LDFLAGS}"
 LDFLAGS_build-darwin = "-L${STAGING_LIBDIR_NATIVE} "
 
+TOOLCHAIN_OPTIONS = ""
+
 STAGING_BINDIR = "${STAGING_BINDIR_NATIVE}"
 STAGING_BINDIR_CROSS = "${STAGING_BINDIR_NATIVE}"
 
classes/nativesdk.bbclass +2 -0
index 6f21534..6689399 100644
@@ -36,6 +36,8 @@ CFLAGS = "${BUILDSDK_CFLAGS}"
 CXXFLAGS = "${BUILDSDK_CFLAGS}"
 LDFLAGS = "${BUILDSDK_LDFLAGS}"
 
+TOOLCHAIN_OPTIONS = ""
+
 # Change to place files in SDKPATH
 prefix = "${SDKPATH}"
 exec_prefix = "${SDKPATH}"
conf/bitbake.conf +1 -1
index 34f7726..1002c01 100644
@@ -460,7 +460,7 @@ export PATH
 ##################################################################
 
 CCACHE ?= ""
-TOOLCHAIN_OPTIONS = ""
+TOOLCHAIN_OPTIONS = " --sysroot=${STAGING_DIR_TARGET}"
 TOOLCHAIN_PATH ?= "${STAGING_DIR_NATIVE}${prefix_native}/${BASE_PACKAGE_ARCH}"
 TOOLCHAIN_SYSPATH ?= "${TOOLCHAIN_PATH}/${TARGET_SYS}"
 
Signature · 1 line
1.7.0.4