summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/classes-global/uninative.bbclass2
-rw-r--r--meta/classes-recipe/populate_sdk_base.bbclass1
-rw-r--r--meta/classes-recipe/populate_sdk_ext.bbclass8
-rw-r--r--meta/files/toolchain-shar-extract.sh8
-rw-r--r--meta/lib/oe/utils.py26
5 files changed, 3 insertions, 42 deletions
diff --git a/meta/classes-global/uninative.bbclass b/meta/classes-global/uninative.bbclass
index 75e0c19704..c246a1ecd6 100644
--- a/meta/classes-global/uninative.bbclass
+++ b/meta/classes-global/uninative.bbclass
@@ -142,7 +142,7 @@ def enable_uninative(d):
142 loader = d.getVar("UNINATIVE_LOADER") 142 loader = d.getVar("UNINATIVE_LOADER")
143 if os.path.exists(loader): 143 if os.path.exists(loader):
144 bb.debug(2, "Enabling uninative") 144 bb.debug(2, "Enabling uninative")
145 d.setVar("NATIVELSBSTRING", "universal%s" % oe.utils.host_gcc_version(d)) 145 d.setVar("NATIVELSBSTRING", "universal")
146 d.appendVar("SSTATEPOSTUNPACKFUNCS", " uninative_changeinterp") 146 d.appendVar("SSTATEPOSTUNPACKFUNCS", " uninative_changeinterp")
147 d.appendVarFlag("SSTATEPOSTUNPACKFUNCS", "vardepvalueexclude", "| uninative_changeinterp") 147 d.appendVarFlag("SSTATEPOSTUNPACKFUNCS", "vardepvalueexclude", "| uninative_changeinterp")
148 d.appendVar("BUILD_LDFLAGS", " -Wl,--allow-shlib-undefined -Wl,--dynamic-linker=${UNINATIVE_LOADER} -pthread") 148 d.appendVar("BUILD_LDFLAGS", " -Wl,--allow-shlib-undefined -Wl,--dynamic-linker=${UNINATIVE_LOADER} -pthread")
diff --git a/meta/classes-recipe/populate_sdk_base.bbclass b/meta/classes-recipe/populate_sdk_base.bbclass
index 8ef4b2be77..e6685cde97 100644
--- a/meta/classes-recipe/populate_sdk_base.bbclass
+++ b/meta/classes-recipe/populate_sdk_base.bbclass
@@ -373,7 +373,6 @@ EOF
373 -e 's#@SDK_VERSION@#${SDK_VERSION}#g' \ 373 -e 's#@SDK_VERSION@#${SDK_VERSION}#g' \
374 -e '/@SDK_PRE_INSTALL_COMMAND@/d' \ 374 -e '/@SDK_PRE_INSTALL_COMMAND@/d' \
375 -e '/@SDK_POST_INSTALL_COMMAND@/d' \ 375 -e '/@SDK_POST_INSTALL_COMMAND@/d' \
376 -e 's#@SDK_GCC_VER@#${@oe.utils.host_gcc_version(d, taskcontextonly=True)}#g' \
377 -e 's#@SDK_ARCHIVE_TYPE@#${SDK_ARCHIVE_TYPE}#g' \ 376 -e 's#@SDK_ARCHIVE_TYPE@#${SDK_ARCHIVE_TYPE}#g' \
378 ${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.sh 377 ${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.sh
379 378
diff --git a/meta/classes-recipe/populate_sdk_ext.bbclass b/meta/classes-recipe/populate_sdk_ext.bbclass
index 2d7d661d25..20dfdf02d4 100644
--- a/meta/classes-recipe/populate_sdk_ext.bbclass
+++ b/meta/classes-recipe/populate_sdk_ext.bbclass
@@ -150,7 +150,6 @@ def create_filtered_tasklist(d, sdkbasepath, tasklistfile, conf_initpath):
150 with open(sdkbasepath + '/conf/local.conf', 'a') as f: 150 with open(sdkbasepath + '/conf/local.conf', 'a') as f:
151 # Force the use of sstate from the build system 151 # Force the use of sstate from the build system
152 f.write('\nSSTATE_DIR:forcevariable = "%s"\n' % d.getVar('SSTATE_DIR')) 152 f.write('\nSSTATE_DIR:forcevariable = "%s"\n' % d.getVar('SSTATE_DIR'))
153 f.write('SSTATE_MIRRORS:forcevariable = "file://universal/(.*) file://universal-4.9/\\1 file://universal-4.9/(.*) file://universal-4.8/\\1"\n')
154 # Ensure TMPDIR is the default so that clean_esdk_builddir() can delete it 153 # Ensure TMPDIR is the default so that clean_esdk_builddir() can delete it
155 f.write('TMPDIR:forcevariable = "${TOPDIR}/tmp"\n') 154 f.write('TMPDIR:forcevariable = "${TOPDIR}/tmp"\n')
156 # Drop uninative if the build isn't using it (or else NATIVELSBSTRING will 155 # Drop uninative if the build isn't using it (or else NATIVELSBSTRING will
@@ -380,9 +379,6 @@ def write_local_conf(d, baseoutpath, derivative, core_meta_subdir, uninative_che
380 f.write('# Provide a flag to indicate we are in the EXT_SDK Context\n') 379 f.write('# Provide a flag to indicate we are in the EXT_SDK Context\n')
381 f.write('WITHIN_EXT_SDK = "1"\n\n') 380 f.write('WITHIN_EXT_SDK = "1"\n\n')
382 381
383 # Map gcc-dependent uninative sstate cache for installer usage
384 f.write('SSTATE_MIRRORS += " file://universal/(.*) file://universal-4.9/\\1 file://universal-4.9/(.*) file://universal-4.8/\\1"\n\n')
385
386 if d.getVar("PRSERV_HOST"): 382 if d.getVar("PRSERV_HOST"):
387 # Override this, we now include PR data, so it should only point ot the local database 383 # Override this, we now include PR data, so it should only point ot the local database
388 f.write('PRSERV_HOST = "localhost:0"\n\n') 384 f.write('PRSERV_HOST = "localhost:0"\n\n')
@@ -491,8 +487,8 @@ def prepare_locked_cache(d, baseoutpath, derivative, conf_initpath):
491 sstate_out = baseoutpath + '/sstate-cache' 487 sstate_out = baseoutpath + '/sstate-cache'
492 bb.utils.remove(sstate_out, True) 488 bb.utils.remove(sstate_out, True)
493 489
494 # uninative.bbclass sets NATIVELSBSTRING to 'universal%s' % oe.utils.host_gcc_version(d) 490 # uninative.bbclass sets NATIVELSBSTRING to 'universal'
495 fixedlsbstring = "universal%s" % oe.utils.host_gcc_version(d) if bb.data.inherits_class('uninative', d) else "" 491 fixedlsbstring = "universal" if bb.data.inherits_class('uninative', d) else ""
496 492
497 sdk_include_toolchain = (d.getVar('SDK_INCLUDE_TOOLCHAIN') == '1') 493 sdk_include_toolchain = (d.getVar('SDK_INCLUDE_TOOLCHAIN') == '1')
498 sdk_ext_type = d.getVar('SDK_EXT_TYPE') 494 sdk_ext_type = d.getVar('SDK_EXT_TYPE')
diff --git a/meta/files/toolchain-shar-extract.sh b/meta/files/toolchain-shar-extract.sh
index 06934e5a9a..e2c617958a 100644
--- a/meta/files/toolchain-shar-extract.sh
+++ b/meta/files/toolchain-shar-extract.sh
@@ -31,9 +31,6 @@ tweakpath /sbin
31INST_ARCH=$(uname -m | sed -e "s/i[3-6]86/ix86/" -e "s/x86[-_]64/x86_64/") 31INST_ARCH=$(uname -m | sed -e "s/i[3-6]86/ix86/" -e "s/x86[-_]64/x86_64/")
32SDK_ARCH=$(echo @SDK_ARCH@ | sed -e "s/i[3-6]86/ix86/" -e "s/x86[-_]64/x86_64/") 32SDK_ARCH=$(echo @SDK_ARCH@ | sed -e "s/i[3-6]86/ix86/" -e "s/x86[-_]64/x86_64/")
33 33
34INST_GCC_VER=$(gcc --version 2>/dev/null | sed -ne 's/.* \([0-9]\+\.[0-9]\+\)\.[0-9]\+.*/\1/p')
35SDK_GCC_VER='@SDK_GCC_VER@'
36
37verlte () { 34verlte () {
38 [ "$1" = "`printf "$1\n$2" | sort -V | head -n1`" ] 35 [ "$1" = "`printf "$1\n$2" | sort -V | head -n1`" ]
39} 36}
@@ -145,11 +142,6 @@ fi
145# SDK_EXTENSIBLE is exposed from the SDK_PRE_INSTALL_COMMAND above 142# SDK_EXTENSIBLE is exposed from the SDK_PRE_INSTALL_COMMAND above
146if [ "$SDK_EXTENSIBLE" = "1" ]; then 143if [ "$SDK_EXTENSIBLE" = "1" ]; then
147 DEFAULT_INSTALL_DIR="@SDKEXTPATH@" 144 DEFAULT_INSTALL_DIR="@SDKEXTPATH@"
148 if [ "$INST_GCC_VER" = '4.8' -a "$SDK_GCC_VER" = '4.9' ] || [ "$INST_GCC_VER" = '4.8' -a "$SDK_GCC_VER" = '' ] || \
149 [ "$INST_GCC_VER" = '4.9' -a "$SDK_GCC_VER" = '' ]; then
150 echo "Error: Incompatible SDK installer! Your host gcc version is $INST_GCC_VER and this SDK was built by gcc higher version."
151 exit 1
152 fi
153fi 145fi
154 146
155if [ "$target_sdk_dir" = "" ]; then 147if [ "$target_sdk_dir" = "" ]; then
diff --git a/meta/lib/oe/utils.py b/meta/lib/oe/utils.py
index a11db5f3cd..0378071b5c 100644
--- a/meta/lib/oe/utils.py
+++ b/meta/lib/oe/utils.py
@@ -444,32 +444,6 @@ def get_host_compiler_version(d, taskcontextonly=False):
444 version = match.group(1) 444 version = match.group(1)
445 return compiler, version 445 return compiler, version
446 446
447
448def host_gcc_version(d, taskcontextonly=False):
449 import re, subprocess
450
451 if taskcontextonly and d.getVar('BB_WORKERCONTEXT') != '1':
452 return
453
454 compiler = d.getVar("BUILD_CC")
455 # Get rid of ccache since it is not present when parsing.
456 if compiler.startswith('ccache '):
457 compiler = compiler[7:]
458 try:
459 env = os.environ.copy()
460 env["PATH"] = d.getVar("PATH")
461 output = subprocess.check_output("%s --version" % compiler, \
462 shell=True, env=env, stderr=subprocess.STDOUT).decode("utf-8")
463 except subprocess.CalledProcessError as e:
464 bb.fatal("Error running %s --version: %s" % (compiler, e.output.decode("utf-8")))
465
466 match = re.match(r".* (\d+\.\d+)\.\d+.*", output.split('\n')[0])
467 if not match:
468 bb.fatal("Can't get compiler version from %s --version output" % compiler)
469
470 version = match.group(1)
471 return "-%s" % version if version in ("4.8", "4.9") else ""
472
473@bb.parse.vardepsexclude("DEFAULTTUNE_MULTILIB_ORIGINAL", "OVERRIDES") 447@bb.parse.vardepsexclude("DEFAULTTUNE_MULTILIB_ORIGINAL", "OVERRIDES")
474def get_multilib_datastore(variant, d): 448def get_multilib_datastore(variant, d):
475 localdata = bb.data.createCopy(d) 449 localdata = bb.data.createCopy(d)