summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--meta/classes/populate_sdk_ext.bbclass5
-rw-r--r--meta/classes/uninative.bbclass2
-rw-r--r--meta/lib/oe/utils.py14
3 files changed, 18 insertions, 3 deletions
diff --git a/meta/classes/populate_sdk_ext.bbclass b/meta/classes/populate_sdk_ext.bbclass
index 944fe5cd26..1904508af3 100644
--- a/meta/classes/populate_sdk_ext.bbclass
+++ b/meta/classes/populate_sdk_ext.bbclass
@@ -374,8 +374,9 @@ python copy_buildsystem () {
sstate_out = baseoutpath + '/sstate-cache'
bb.utils.remove(sstate_out, True)
- # uninative.bbclass sets NATIVELSBSTRING to 'universal'
- fixedlsbstring = 'universal'
+
+ # uninative.bbclass sets NATIVELSBSTRING to 'universal%s' % oe.utils.host_gcc_version(d)
+ fixedlsbstring = "universal%s" % oe.utils.host_gcc_version(d)
sdk_include_toolchain = (d.getVar('SDK_INCLUDE_TOOLCHAIN', True) == '1')
sdk_ext_type = d.getVar('SDK_EXT_TYPE', True)
diff --git a/meta/classes/uninative.bbclass b/meta/classes/uninative.bbclass
index 9242320fee..11cbf9be80 100644
--- a/meta/classes/uninative.bbclass
+++ b/meta/classes/uninative.bbclass
@@ -88,7 +88,7 @@ def enable_uninative(d):
loader = d.getVar("UNINATIVE_LOADER", True)
if os.path.exists(loader):
bb.debug(2, "Enabling uninative")
- d.setVar("NATIVELSBSTRING", "universal")
+ d.setVar("NATIVELSBSTRING", "universal%s" % oe.utils.host_gcc_version(d))
d.appendVar("SSTATEPOSTUNPACKFUNCS", " uninative_changeinterp")
d.prependVar("PATH", "${STAGING_DIR}-uninative/${BUILD_ARCH}-linux${bindir_native}:")
diff --git a/meta/lib/oe/utils.py b/meta/lib/oe/utils.py
index d6545b197d..2b095f1f0a 100644
--- a/meta/lib/oe/utils.py
+++ b/meta/lib/oe/utils.py
@@ -230,6 +230,20 @@ def format_pkg_list(pkg_dict, ret_format=None):
return '\n'.join(output)
+def host_gcc_version(d):
+ compiler = d.getVar("BUILD_CC", True)
+ retval, output = getstatusoutput("%s --version" % compiler)
+ if retval:
+ bb.fatal("Error running %s --version: %s" % (compiler, output))
+
+ import re
+ match = re.match(".* (\d\.\d)\.\d.*", output.split('\n')[0])
+ if not match:
+ bb.fatal("Can't get compiler version from %s --version output" % compiler)
+
+ version = match.group(1)
+ return "-%s" % version if version in ("4.8", "4.9") else ""
+
#
# Python 2.7 doesn't have threaded pools (just multiprocessing)
# so implement a version here