summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/classes/populate_sdk_base.bbclass27
-rw-r--r--meta/recipes-core/meta/meta-environment.bb35
2 files changed, 29 insertions, 33 deletions
diff --git a/meta/classes/populate_sdk_base.bbclass b/meta/classes/populate_sdk_base.bbclass
index 946a1d479b..de72e32ed8 100644
--- a/meta/classes/populate_sdk_base.bbclass
+++ b/meta/classes/populate_sdk_base.bbclass
@@ -88,25 +88,8 @@ fakeroot python do_populate_sdk() {
88 88
89 populate_sdk(d) 89 populate_sdk(d)
90 90
91 # Handle multilibs in the SDK environment, siteconfig, etc files...
92 localdata = bb.data.createCopy(d)
93
94 # make sure we only use the WORKDIR value from 'd', or it can change
95 localdata.setVar('WORKDIR', d.getVar('WORKDIR', True))
96
97 # make sure we only use the SDKTARGETSYSROOT value from 'd'
98 localdata.setVar('SDKTARGETSYSROOT', d.getVar('SDKTARGETSYSROOT', True))
99
100 # Process DEFAULTTUNE 91 # Process DEFAULTTUNE
101 bb.build.exec_func("create_sdk_files", localdata) 92 bb.build.exec_func("create_sdk_files", d)
102
103 variants = d.getVar("MULTILIB_VARIANTS", True) or ""
104 for item in variants.split():
105 # Load overrides from 'd' to avoid having to reset the value...
106 overrides = d.getVar("OVERRIDES", False) + ":virtclass-multilib-" + item
107 localdata.setVar("OVERRIDES", overrides)
108 bb.data.update_data(localdata)
109 bb.build.exec_func("create_sdk_files", localdata)
110 93
111 bb.build.exec_func("tar_sdk", d) 94 bb.build.exec_func("tar_sdk", d)
112 95
@@ -114,14 +97,6 @@ fakeroot python do_populate_sdk() {
114} 97}
115 98
116fakeroot create_sdk_files() { 99fakeroot create_sdk_files() {
117 # Setup site file for external use
118 toolchain_create_sdk_siteconfig ${SDK_OUTPUT}/${SDKPATH}/site-config-${REAL_MULTIMACH_TARGET_SYS}
119
120 toolchain_create_sdk_env_script ${SDK_OUTPUT}/${SDKPATH}/environment-setup-${REAL_MULTIMACH_TARGET_SYS}
121
122 # Add version information
123 toolchain_create_sdk_version ${SDK_OUTPUT}/${SDKPATH}/version-${REAL_MULTIMACH_TARGET_SYS}
124
125 cp ${COREBASE}/scripts/relocate_sdk.py ${SDK_OUTPUT}/${SDKPATH}/ 100 cp ${COREBASE}/scripts/relocate_sdk.py ${SDK_OUTPUT}/${SDKPATH}/
126 101
127 # Replace the ##DEFAULT_INSTALL_DIR## with the correct pattern. 102 # Replace the ##DEFAULT_INSTALL_DIR## with the correct pattern.
diff --git a/meta/recipes-core/meta/meta-environment.bb b/meta/recipes-core/meta/meta-environment.bb
index c80f8a8808..c6d3bb8d1c 100644
--- a/meta/recipes-core/meta/meta-environment.bb
+++ b/meta/recipes-core/meta/meta-environment.bb
@@ -18,20 +18,41 @@ SDKTARGETSYSROOT = "${SDKPATH}/sysroots/${TARGET_SYS}"
18inherit cross-canadian 18inherit cross-canadian
19 19
20do_generate_content[nostamp] = "1" 20do_generate_content[nostamp] = "1"
21do_generate_content() { 21do_generate_content[cleandirs] = "${SDK_OUTPUT}"
22do_generate_content[dirs] = "${SDK_OUTPUT}/${SDKPATH}"
23python do_generate_content() {
24 # Handle multilibs in the SDK environment, siteconfig, etc files...
25 localdata = bb.data.createCopy(d)
22 26
23 rm -rf ${SDK_OUTPUT} 27 # make sure we only use the WORKDIR value from 'd', or it can change
24 mkdir -p ${SDK_OUTPUT}/${SDKPATH} 28 localdata.setVar('WORKDIR', d.getVar('WORKDIR', True))
25 29
26 toolchain_create_sdk_siteconfig ${SDK_OUTPUT}/${SDKPATH}/site-config-${REAL_MULTIMACH_TARGET_SYS} 30 # make sure we only use the SDKTARGETSYSROOT value from 'd'
31 localdata.setVar('SDKTARGETSYSROOT', d.getVar('SDKTARGETSYSROOT', True))
27 32
28 toolchain_create_sdk_env_script ${SDK_OUTPUT}/${SDKPATH}/environment-setup-${REAL_MULTIMACH_TARGET_SYS} ${REAL_MULTIMACH_TARGET_SYS} '##SDKTARGETSYSROOT##' ${target_libdir} 33 # Process DEFAULTTUNE
34 bb.build.exec_func("create_sdk_files", localdata)
29 35
30 # Add version information 36 variants = d.getVar("MULTILIB_VARIANTS", True) or ""
31 toolchain_create_sdk_version ${SDK_OUTPUT}/${SDKPATH}/version-${REAL_MULTIMACH_TARGET_SYS} 37 for item in variants.split():
38 # Load overrides from 'd' to avoid having to reset the value...
39 overrides = d.getVar("OVERRIDES", False) + ":virtclass-multilib-" + item
40 localdata.setVar("OVERRIDES", overrides)
41 bb.data.update_data(localdata)
42 bb.build.exec_func("create_sdk_files", localdata)
32} 43}
33addtask generate_content before do_install after do_compile 44addtask generate_content before do_install after do_compile
34 45
46create_sdk_files() {
47 # Setup site file for external use
48 toolchain_create_sdk_siteconfig ${SDK_OUTPUT}/${SDKPATH}/site-config-${REAL_MULTIMACH_TARGET_SYS}
49
50 toolchain_create_sdk_env_script ${SDK_OUTPUT}/${SDKPATH}/environment-setup-${REAL_MULTIMACH_TARGET_SYS}
51
52 # Add version information
53 toolchain_create_sdk_version ${SDK_OUTPUT}/${SDKPATH}/version-${REAL_MULTIMACH_TARGET_SYS}
54}
55
35do_install[nostamp] = "1" 56do_install[nostamp] = "1"
36do_install() { 57do_install() {
37 install -d ${D}/${SDKPATH} 58 install -d ${D}/${SDKPATH}