+ import os
+
+ f = os.popen ("%s --version" % cc, 'r')
+ line = f.readline()
+ if f.close() or not line:
+ raise bb.build.FuncFailed("Failed to run %s" % cc)
+
+ import re
+
+ m = re.match("^.* \(.*\) (.\..\..).*$", line)
+ if not m:
+ raise bb.build.FuncFailed("Failed to parse gcc version output")
+ v = m.group(1).split('.')
+ if not (v[0] == '3' and v[1] in ['3', '4']):
+ raise bb.build.FuncFailed("qemu requires GCC 3.3.x or 3.4.x. Please install either version to build\nthis package.\nIf you haven't explicitely asked for this package to be built, it is likely\nthat ENABLE_BINARY_LOCALE_GENERATION is set. To work around the problem set it\nto \"0\" (but note that this will break internationalization).")