diff options
author | Ed Bartosh <ed.bartosh@linux.intel.com> | 2016-12-14 01:55:04 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-01-11 11:46:53 +0000 |
commit | 3d39ca5c91dbb62fb43199f916bd390cd6212e3d (patch) | |
tree | f680a886b35335e2359cc034e280424f02eb5b2c /meta/lib/oe/utils.py | |
parent | 401d552f9e4ed3341e42864e566dddb2b26019dc (diff) | |
download | openembedded-core-3d39ca5c91dbb62fb43199f916bd390cd6212e3d.tar.gz openembedded-core-3d39ca5c91dbb62fb43199f916bd390cd6212e3d.tar.bz2 openembedded-core-3d39ca5c91dbb62fb43199f916bd390cd6212e3d.zip |
uninative: rebuild uninative for gcc 4.8 and 4.9
Some c++ libraries fail to build if uninative is built
with gcc 5.x and host gcc version is either 4.8 or 4.9.
The issue should be solved by making separate uninative sstate
directory structure sstate-cache/universal-<gcc version> for host gcc
versions 4.8 and 4.9. This causes rebuilds of uninative if host gcc
is either 4.8 or 4.9 and it doesn't match gcc version used to build
uninative.
[YOCTO #10441]
(From OE-Core rev: d36f41e5658bbbb6080ee833027879c119edf3e0)
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Diffstat (limited to 'meta/lib/oe/utils.py')
-rw-r--r-- | meta/lib/oe/utils.py | 14 |
1 files changed, 14 insertions, 0 deletions
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 |