From f09f8f4aa32d134081a5bd8a5cff631a2e7935f7 Mon Sep 17 00:00:00 2001 From: Lianhao Lu Date: Thu, 17 Feb 2011 10:43:38 +0800 Subject: toolchain-scripts.bbclass: Added libtool sysroot support. Added missing --with-libtool-sysroot and --sysroot in environment files. Signed-off-by: Lianhao Lu --- meta/classes/toolchain-scripts.bbclass | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/meta/classes/toolchain-scripts.bbclass b/meta/classes/toolchain-scripts.bbclass index b2165bc27..fb59761fd 100644 --- a/meta/classes/toolchain-scripts.bbclass +++ b/meta/classes/toolchain-scripts.bbclass @@ -14,7 +14,7 @@ toolchain_create_sdk_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=${SDK_ARCH}-linux"' >> $script + echo 'export CONFIGURE_FLAGS="--target=${TARGET_SYS} --host=${TARGET_SYS} --build=${SDK_ARCH}-linux --with-libtool-sysroot=${SDKTARGETSYSROOT}"' >> $script if [ "${TARGET_OS}" = "darwin8" ]; then echo 'export TARGET_CFLAGS="-I${SDKTARGETSYSROOT}${includedir}"' >> $script echo 'export TARGET_LDFLAGS="-L${SDKTARGETSYSROOT}${libdir}"' >> $script @@ -22,10 +22,8 @@ toolchain_create_sdk_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 "alias opkg='LD_LIBRARY_PATH=${SDKPATHNATIVE}${libdir_nativesdk} ${SDKPATHNATIVE}${bindir_nativesdk}/opkg-cl -f ${SDKPATHNATIVE}/${sysconfdir}/opkg-sdk.conf -o ${SDKPATHNATIVE}'" >> $script - echo "alias opkg-target='LD_LIBRARY_PATH=${SDKPATHNATIVE}${libdir_nativesdk} ${SDKPATHNATIVE}${bindir_nativesdk}/opkg-cl -f ${SDKTARGETSYSROOT}${sysconfdir}/opkg.conf -o ${SDKTARGETSYSROOT}'" >> $script + echo 'export CFLAGS="${TARGET_CC_ARCH} --sysroot=${SDKTARGETSYSROOT}"' >> $script + echo 'export CXXFLAGS="${TARGET_CC_ARCH} --sysroot=${SDKTARGETSYSROOT}"' >> $script echo 'export POKY_NATIVE_SYSROOT="${SDKPATHNATIVE}"' >> $script echo 'export POKY_TARGET_SYSROOT="${SDKTARGETSYSROOT}"' >> $script echo 'export POKY_DISTRO_VERSION="${DISTRO_VERSION}"' >> $script @@ -75,7 +73,7 @@ toolchain_create_sdk_env_script_for_installer () { 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=${SDK_ARCH}-linux"' >> $script + echo 'export CONFIGURE_FLAGS="--target=${TARGET_SYS} --host=${TARGET_SYS} --build=${SDK_ARCH}-linux --with-libtool-sysroot=##SDKTARGETSYSROOT##"' >> $script if [ "${TARGET_OS}" = "darwin8" ]; then echo 'export TARGET_CFLAGS="-I##SDKTARGETSYSROOT##${target_includedir}"' >> $script echo 'export TARGET_LDFLAGS="-L##SDKTARGETSYSROOT##{target_libdir}"' >> $script -- cgit v1.2.3