Patchwork [1/1,M3] meta-environment: set correct *MULTIMACH_TARGET_SYS.

login
register
mail settings
Submitter Jessica Zhang
Date July 28, 2011, 4:23 p.m.
Message ID <C6510F6D410BB64A8C15398EDC6B847C136FBF0A@ORSMSX101.amr.corp.intel.com>
Download mbox | patch
Permalink /patch/8811/
State New, archived
Headers show

Comments

Jessica Zhang - July 28, 2011, 4:23 p.m.
-----Original Message-----
From: openembedded-core-bounces@lists.openembedded.org [mailto:openembedded-core-bounces@lists.openembedded.org] On Behalf Of Lianhao Lu
Sent: Thursday, July 28, 2011 4:24 AM
To: openembedded-core@lists.openembedded.org
Subject: [OE-core] [PATCH 1/1] meta-environment: set correct *MULTIMACH_TARGET_SYS.

Fixed [BUGID #1299]. OLD_MULTIMACH_TARGET_SYS is no longer available.
Use new recipe-scope variable REAL_MULTIMACH_TARGET_SYS instead.

Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
Acted-by: Jessica Zhang <jessica.zhang@intel.com>
---
 meta/classes/toolchain-scripts.bbclass     |    7 ++++---
 meta/recipes-core/meta/meta-environment.bb |    9 +++++----
 2 files changed, 9 insertions(+), 7 deletions(-)

--
1.7.0.4

Patch

diff --git a/meta/classes/toolchain-scripts.bbclass b/meta/classes/toolchain-scripts.bbclass
index 3301319..832cce4 100644
--- a/meta/classes/toolchain-scripts.bbclass
+++ b/meta/classes/toolchain-scripts.bbclass
@@ -66,13 +66,14 @@  toolchain_create_tree_env_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}
+       local multimach_target_sys=$1
+       script=${SDK_OUTPUT}/${SDKPATH}/environment-setup-${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 PATH=${SDKPATHNATIVE}${bindir_nativesdk}:${SDKPATHNATIVE}${bindir_nativesdk}/'"${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 CONFIG_SITE=${SDKPATH}/site-config-'"${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
diff --git a/meta/recipes-core/meta/meta-environment.bb b/meta/recipes-core/meta/meta-environment.bb
index 351cbf0..6d547bb 100644
--- a/meta/recipes-core/meta/meta-environment.bb
+++ b/meta/recipes-core/meta/meta-environment.bb
@@ -2,13 +2,14 @@  DESCRIPTION = "Package of environment files for SDK"
 LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58 \
                     file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
 LICENSE = "MIT"
-PR = "r4"
+PR = "r5"

 EXCLUDE_FROM_WORLD = "1"

 inherit toolchain-scripts
 # get target config site before inheritting cross-canadian
 TARGET_CONFIG_SITE := "${@siteinfo_get_files(d)}"
+REAL_MULTIMACH_TARGET_SYS = "${TUNE_PKGARCH}${TARGET_VENDOR}-${TARGET_OS}"

 SDK_DIR = "${WORKDIR}/sdk"
 SDK_OUTPUT = "${SDK_DIR}/image"
@@ -22,12 +23,12 @@  do_generate_content() {
     rm -rf ${SDK_OUTPUT}
     mkdir -p ${SDK_OUTPUT}/${SDKPATH}

-    toolchain_create_sdk_siteconfig ${SDK_OUTPUT}/${SDKPATH}/site-config-${OLD_MULTIMACH_TARGET_SYS} ${TARGET_CONFIG_SITE}
+    toolchain_create_sdk_siteconfig ${SDK_OUTPUT}/${SDKPATH}/site-config-${REAL_MULTIMACH_TARGET_SYS} ${TARGET_CONFIG_SITE}

-    toolchain_create_sdk_env_script_for_installer
+    toolchain_create_sdk_env_script_for_installer ${REAL_MULTIMACH_TARGET_SYS}

     # Add version information
-    toolchain_create_sdk_version ${SDK_OUTPUT}/${SDKPATH}/version-${OLD_MULTIMACH_TARGET_SYS}
+    toolchain_create_sdk_version ${SDK_OUTPUT}/${SDKPATH}/version-${REAL_MULTIMACH_TARGET_SYS}
 }
 addtask generate_content before do_install after do_compile