3 S = "${WORKDIR}/qemu-${PV}"
4 prefix = "${STAGING_DIR}/${BUILD_SYS}"
6 python do_check_gcc () {
7 from bb import which, data
10 path = data.getVar('PATH', d)
11 if len(which(path, 'gcc-3.4')) != 0:
13 data.setVar('EXTRA_OECONF', " --cc=gcc-3.4", d)
14 elif len(which(path, 'gcc-3.3')) != 0:
16 data.setVar('EXTRA_OECONF', " --cc=gcc-3.3", d)
20 f = os.popen ("%s --version" % cc, 'r')
22 if f.close() or not line:
23 raise bb.build.FuncFailed("Failed to run %s" % cc)
27 m = re.match("^.* \(.*\) (.\..\..).*$", line)
29 raise bb.build.FuncFailed("Failed to parse gcc version output")
30 v = m.group(1).split('.')
31 if not (v[0] == '3' and v[1] in ['3', '4']):
32 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).")
35 addtask check_gcc before do_configure after do_patch