From: Charles-Antoine Couret Date: Thu, 26 Mar 2020 20:09:49 +0000 (+0100) Subject: utils: fix gcc 10 version detection X-Git-Tag: lucaceresoli/bug-15201-perf-libtraceevent-missing~11448 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=186fe4a3d390a52b87282c3e694ce3251e45ee78;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git utils: fix gcc 10 version detection Utils can not detect GCC 10 correctly due to wrong regex. It generates this error "ERROR: Can't get compiler version from gcc --version output" Sub-version numbers should be 1 or more digits instead of 1 only. Signed-off-by: Charles-Antoine Couret Signed-off-by: Richard Purdie --- diff --git a/meta/lib/oe/utils.py b/meta/lib/oe/utils.py index aee43364820..9042b370f73 100644 --- a/meta/lib/oe/utils.py +++ b/meta/lib/oe/utils.py @@ -391,7 +391,7 @@ def host_gcc_version(d, taskcontextonly=False): except subprocess.CalledProcessError as e: bb.fatal("Error running %s --version: %s" % (compiler, e.output.decode("utf-8"))) - match = re.match(r".* (\d\.\d)\.\d.*", output.split('\n')[0]) + match = re.match(r".* (\d+\.\d+)\.\d+.*", output.split('\n')[0]) if not match: bb.fatal("Can't get compiler version from %s --version output" % compiler)