]> code.ossystems Code Review - openembedded-core.git/commitdiff
toolchain-scripts: export extra variables for use by scripts
authorJoshua Lock <josh@linux.intel.com>
Fri, 3 Sep 2010 17:31:19 +0000 (18:31 +0100)
committerJoshua Lock <josh@linux.intel.com>
Tue, 7 Sep 2010 10:22:54 +0000 (11:22 +0100)
Export the location of the native sysroot for use in the scripts to
determine the location of native binaries.

Also add a POKY_DISTRO_VERSION to the external toolchain environment as a
method of determining if we're running under a build directory or not
i.e. not if the variable is empty

Signed-off-by: Joshua Lock <josh@linux.intel.com>
meta/classes/toolchain-scripts.bbclass

index cda453dadd45a2af40c55f33b0115e4aeeb40fe4..5c9acda6debb8d4c1a504577300554e1d3a00f77 100644 (file)
@@ -24,10 +24,12 @@ toolchain_create_sdk_env_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 POKY_NATIVE_SYSROOT="${SDKPATHNATIVE}"' >> $script
+       echo 'export POKY_DISTRO_VERSION="${DISTRO_VERSION}"' >> $script
 }
 
-# This function creates an environment-setup-script in the TMPDIR which enables a Poky IDE to integrate with the
-# build tree
+# This function creates an environment-setup-script in the TMPDIR which enables
+# a Poky IDE to integrate with the build tree
 toolchain_create_tree_env_script () {
        script=${TMPDIR}/environment-setup-${MULTIMACH_TARGET_SYS}
        rm -f $script
@@ -50,4 +52,5 @@ toolchain_create_tree_env_script () {
        fi
        echo 'export CFLAGS="${TARGET_CC_ARCH}"' >> $script
        echo 'export CXXFLAGS="${TARGET_CC_ARCH}"' >> $script
+       echo 'export POKY_NATIVE_SYSROOT="${STAGING_DIR_NATIVE}"' >> $script
 }