summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJessica Zhang <jessica.zhang@intel.com>2012-01-06 12:17:42 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-01-10 17:28:42 +0000
commit783c6ef46c5e6795187b2fdf30b6c99c92fce279 (patch)
tree3920a7ab87c18b396704a8504511878ec8a051e4
parentf1e58216fa81f74bc31ab5d242927185d8a3bf0b (diff)
downloadpoky-783c6ef46c5e6795187b2fdf30b6c99c92fce279.tar.gz
poky-783c6ef46c5e6795187b2fdf30b6c99c92fce279.tar.bz2
poky-783c6ef46c5e6795187b2fdf30b6c99c92fce279.zip
add sysroot support for meta-ide-support which is the toolchain within build env case
(From OE-Core rev: 3b2bbbf965f31088bcb796e8a55966a2fc180349) Signed-off-by: Jessica Zhang <jessica.zhang@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/toolchain-scripts.bbclass9
1 files changed, 5 insertions, 4 deletions
diff --git a/meta/classes/toolchain-scripts.bbclass b/meta/classes/toolchain-scripts.bbclass
index 5fb6cd3aaf..5cba403dc7 100644
--- a/meta/classes/toolchain-scripts.bbclass
+++ b/meta/classes/toolchain-scripts.bbclass
@@ -49,7 +49,7 @@ toolchain_create_tree_env_script () {
echo 'export CXX=${TARGET_PREFIX}g++' >> $script
echo 'export GDB=${TARGET_PREFIX}gdb' >> $script
echo 'export TARGET_PREFIX=${TARGET_PREFIX}' >> $script
- echo 'export CONFIGURE_FLAGS="--target=${TARGET_SYS} --host=${TARGET_SYS} --build=${BUILD_SYS}"' >> $script
+ echo 'export CONFIGURE_FLAGS="--target=${TARGET_SYS} --host=${TARGET_SYS} --build=${BUILD_SYS} --with-libtool-sysroot=${STAGING_DIR_TARGET}"' >> $script
if [ "${TARGET_OS}" = "darwin8" ]; then
echo 'export TARGET_CFLAGS="-I${STAGING_DIR}${MACHINE}${includedir}"' >> $script
echo 'export TARGET_LDFLAGS="-L${STAGING_DIR}${MACHINE}${libdir}"' >> $script
@@ -57,9 +57,10 @@ toolchain_create_tree_env_script () {
cd ${SDK_OUTPUT}${SDKTARGETSYSROOT}/usr
ln -s /usr/local local
fi
- echo 'export CFLAGS="${TARGET_CC_ARCH}"' >> $script
- echo 'export CXXFLAGS="${TARGET_CC_ARCH}"' >> $script
- echo 'export LDFLAGS="${TARGET_LD_ARCH}"' >> $script
+ echo 'export CFLAGS="${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}"' >> $script
+ echo 'export CXXFLAGS="${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}"' >> $script
+ echo 'export LDFLAGS="${TARGET_LD_ARCH} --sysroot=${STAGING_DIR_TARGET}"' >> $script
+ echo 'export CPPFLAGS="${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}"' >> $script
echo 'export OECORE_NATIVE_SYSROOT="${STAGING_DIR_NATIVE}"' >> $script
echo 'export OECORE_TARGET_SYSROOT="${STAGING_DIR_TARGET}"' >> $script
echo 'export OECORE_ACLOCAL_OPTS="-I ${STAGING_DIR_NATIVE}/usr/share/aclocal"' >> $script