diff options
author | Lianhao Lu <lianhao.lu@intel.com> | 2010-12-16 09:40:08 +0800 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2010-12-21 08:53:20 +0000 |
commit | 6a31a2a89e60a3890239b7ff889b9ee1c249faf5 (patch) | |
tree | e4737eebba32c602837dcec80f1e06bff4cdd490 /meta/classes | |
parent | 05963b0a1b1a685a3df3d39477312bb629579fb4 (diff) | |
download | openembedded-core-6a31a2a89e60a3890239b7ff889b9ee1c249faf5.tar.gz openembedded-core-6a31a2a89e60a3890239b7ff889b9ee1c249faf5.tar.bz2 openembedded-core-6a31a2a89e60a3890239b7ff889b9ee1c249faf5.tar.xz openembedded-core-6a31a2a89e60a3890239b7ff889b9ee1c249faf5.zip |
meta-environment: Added package of meta-environment-${TARGET_ARCH} for
environment files.
[BUGID #565] Fixing bug #565, added package of
meta-environment-${TARGET_ARCH} for environment files used by
cross-canadian toolchain.
Also corrected the situation of empty config site file for target.
Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/cross-canadian.bbclass | 1 | ||||
-rw-r--r-- | meta/classes/toolchain-scripts.bbclass | 30 |
2 files changed, 31 insertions, 0 deletions
diff --git a/meta/classes/cross-canadian.bbclass b/meta/classes/cross-canadian.bbclass index 9edce31cb..3f3a24dd5 100644 --- a/meta/classes/cross-canadian.bbclass +++ b/meta/classes/cross-canadian.bbclass @@ -15,6 +15,7 @@ STAGING_BINDIR_TOOLCHAIN = "${STAGING_DIR_NATIVE}${bindir_native}/${SDK_ARCH}${S # Update BASE_PACKAGE_ARCH and PACKAGE_ARCHS # OLD_MULTIMACH_ARCH := "${MULTIMACH_ARCH}" +OLD_MULTIMACH_TARGET_SYS := "${MULTIMACH_TARGET_SYS}" OLD_PACKAGE_ARCH := ${BASE_PACKAGE_ARCH} BASE_PACKAGE_ARCH = "${SDK_ARCH}-nativesdk" python () { diff --git a/meta/classes/toolchain-scripts.bbclass b/meta/classes/toolchain-scripts.bbclass index c393d9964..a5b2bd129 100644 --- a/meta/classes/toolchain-scripts.bbclass +++ b/meta/classes/toolchain-scripts.bbclass @@ -60,3 +60,33 @@ toolchain_create_tree_env_script () { echo 'export POKY_NATIVE_SYSROOT="${STAGING_DIR_NATIVE}"' >> $script echo 'export POKY_TARGET_SYSROOT="${STAGING_DIR_TARGET}"' >> $script } + +# This function creates an environment-setup-script for use by the ADT installer +toolchain_create_sdk_env_script_for_installer () { + # Create environment setup script + script=${SDK_OUTPUT}/${SDKPATH}/environment-setup-${OLD_MULTIMACH_TARGET_SYS} + rm -f $script + touch $script + echo 'export PATH=${SDKPATHNATIVE}${bindir_nativesdk}:${SDKPATHNATIVE}${bindir_nativesdk}/${OLD_MULTIMACH_TARGET_SYS}:$PATH' >> $script + echo 'export PKG_CONFIG_SYSROOT_DIR=##SDKTARGETSYSROOT##' >> $script + echo 'export PKG_CONFIG_PATH=##SDKTARGETSYSROOT##${target_libdir}/pkgconfig' >> $script + echo 'export CONFIG_SITE=${SDKPATH}/site-config-${OLD_MULTIMACH_TARGET_SYS}' >> $script + echo 'export CC=${TARGET_PREFIX}gcc' >> $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 + if [ "${TARGET_OS}" = "darwin8" ]; then + echo 'export TARGET_CFLAGS="-I##SDKTARGETSYSROOT##${target_includedir}"' >> $script + echo 'export TARGET_LDFLAGS="-L##SDKTARGETSYSROOT##{target_libdir}"' >> $script + # Workaround darwin toolchain sysroot path problems + cd ${SDK_OUTPUT}${SDKTARGETSYSROOT}/usr + ln -s /usr/local local + fi + echo 'export CFLAGS="${TARGET_CC_ARCH} --sysroot=##SDKTARGETSYSROOT##"' >> $script + echo 'export CXXFLAGS="${TARGET_CC_ARCH} --sysroot=##SDKTARGETSYSROOT## -I##SDKTARGETSYSROOT##${GXX_INCLUDEDIR}"' >> $script + echo 'export POKY_NATIVE_SYSROOT="${SDKPATHNATIVE}"' >> $script + echo 'export POKY_TARGET_SYSROOT="##SDKTARGETSYSROOT##"' >> $script + echo 'export POKY_DISTRO_VERSION="${DISTRO_VERSION}"' >> $script + echo 'export POKY_SDK_VERSION="${SDK_VERSION}"' >> $script +} |