summaryrefslogtreecommitdiffstats
path: root/meta/lib/oe/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'meta/lib/oe/utils.py')
-rw-r--r--meta/lib/oe/utils.py14
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):
230 230
231 return '\n'.join(output) 231 return '\n'.join(output)
232 232
233def host_gcc_version(d):
234 compiler = d.getVar("BUILD_CC", True)
235 retval, output = getstatusoutput("%s --version" % compiler)
236 if retval:
237 bb.fatal("Error running %s --version: %s" % (compiler, output))
238
239 import re
240 match = re.match(".* (\d\.\d)\.\d.*", output.split('\n')[0])
241 if not match:
242 bb.fatal("Can't get compiler version from %s --version output" % compiler)
243
244 version = match.group(1)
245 return "-%s" % version if version in ("4.8", "4.9") else ""
246
233# 247#
234# Python 2.7 doesn't have threaded pools (just multiprocessing) 248# Python 2.7 doesn't have threaded pools (just multiprocessing)
235# so implement a version here 249# so implement a version here