diff options
-rw-r--r-- | meta/classes-recipe/toolchain-scripts.bbclass | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/meta/classes-recipe/toolchain-scripts.bbclass b/meta/classes-recipe/toolchain-scripts.bbclass index 6bfe0b6de0..cbef412e79 100644 --- a/meta/classes-recipe/toolchain-scripts.bbclass +++ b/meta/classes-recipe/toolchain-scripts.bbclass | |||
@@ -16,6 +16,13 @@ DEBUG_PREFIX_MAP = "" | |||
16 | 16 | ||
17 | EXPORT_SDK_PS1 = "${@ 'export PS1=\\"%s\\"' % d.getVar('SDK_PS1') if d.getVar('SDK_PS1') else ''}" | 17 | EXPORT_SDK_PS1 = "${@ 'export PS1=\\"%s\\"' % d.getVar('SDK_PS1') if d.getVar('SDK_PS1') else ''}" |
18 | 18 | ||
19 | def siteinfo_with_prefix(d, prefix): | ||
20 | # Return a prefixed value from siteinfo | ||
21 | for item in siteinfo_data_for_machine(d.getVar("TARGET_ARCH"), d.getVar("TARGET_OS"), d): | ||
22 | if item.startswith(prefix): | ||
23 | return item.replace(prefix, "") | ||
24 | raise KeyError | ||
25 | |||
19 | # This function creates an environment-setup-script for use in a deployable SDK | 26 | # This function creates an environment-setup-script for use in a deployable SDK |
20 | toolchain_create_sdk_env_script () { | 27 | toolchain_create_sdk_env_script () { |
21 | # Create environment setup script. Remember that $SDKTARGETSYSROOT should | 28 | # Create environment setup script. Remember that $SDKTARGETSYSROOT should |
@@ -63,6 +70,8 @@ toolchain_create_sdk_env_script () { | |||
63 | echo 'export OECORE_BASELIB="${baselib}"' >> $script | 70 | echo 'export OECORE_BASELIB="${baselib}"' >> $script |
64 | echo 'export OECORE_TARGET_ARCH="${TARGET_ARCH}"' >>$script | 71 | echo 'export OECORE_TARGET_ARCH="${TARGET_ARCH}"' >>$script |
65 | echo 'export OECORE_TARGET_OS="${TARGET_OS}"' >>$script | 72 | echo 'export OECORE_TARGET_OS="${TARGET_OS}"' >>$script |
73 | echo 'export OECORE_TARGET_BITS="${@siteinfo_with_prefix(d, 'bit-')}"' >>$script | ||
74 | echo 'export OECORE_TARGET_ENDIAN="${@siteinfo_with_prefix(d, 'endian-')}"' >>$script | ||
66 | 75 | ||
67 | echo 'unset command_not_found_handle' >> $script | 76 | echo 'unset command_not_found_handle' >> $script |
68 | 77 | ||