summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/classes/populate_sdk_base.bbclass2
-rw-r--r--meta/lib/oe/utils.py5
2 files changed, 5 insertions, 2 deletions
diff --git a/meta/classes/populate_sdk_base.bbclass b/meta/classes/populate_sdk_base.bbclass
index c456c52..bbf1ff1 100644
--- a/meta/classes/populate_sdk_base.bbclass
+++ b/meta/classes/populate_sdk_base.bbclass
@@ -259,7 +259,7 @@ EOF
259 -e 's#@SDK_VERSION@#${SDK_VERSION}#g' \ 259 -e 's#@SDK_VERSION@#${SDK_VERSION}#g' \
260 -e '/@SDK_PRE_INSTALL_COMMAND@/d' \ 260 -e '/@SDK_PRE_INSTALL_COMMAND@/d' \
261 -e '/@SDK_POST_INSTALL_COMMAND@/d' \ 261 -e '/@SDK_POST_INSTALL_COMMAND@/d' \
262 -e 's#@SDK_GCC_VER@#${@oe.utils.host_gcc_version(d)}#g' \ 262 -e 's#@SDK_GCC_VER@#${@oe.utils.host_gcc_version(d, taskcontextonly=True)}#g' \
263 ${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.sh 263 ${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.sh
264 264
265 # add execution permission 265 # add execution permission
diff --git a/meta/lib/oe/utils.py b/meta/lib/oe/utils.py
index f22a6ab..fbda703 100644
--- a/meta/lib/oe/utils.py
+++ b/meta/lib/oe/utils.py
@@ -342,9 +342,12 @@ def format_pkg_list(pkg_dict, ret_format=None):
342 342
343 return '\n'.join(output) 343 return '\n'.join(output)
344 344
345def host_gcc_version(d): 345def host_gcc_version(d, taskcontextonly=False):
346 import re, subprocess 346 import re, subprocess
347 347
348 if taskcontextonly and d.getVar('BB_WORKERCONTEXT') != '1':
349 return
350
348 compiler = d.getVar("BUILD_CC") 351 compiler = d.getVar("BUILD_CC")
349 try: 352 try:
350 env = os.environ.copy() 353 env = os.environ.copy()