aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--recipes-core/openjdk/openjdk-8-common.inc6
1 files changed, 6 insertions, 0 deletions
diff --git a/recipes-core/openjdk/openjdk-8-common.inc b/recipes-core/openjdk/openjdk-8-common.inc
index 83828e1..070ffaa 100644
--- a/recipes-core/openjdk/openjdk-8-common.inc
+++ b/recipes-core/openjdk/openjdk-8-common.inc
@@ -232,6 +232,8 @@ FLAGS_GCC7 = "-fno-lifetime-dse -fno-delete-null-pointer-checks"
# version.
def version_specific_cflags(d):
+ import re
+
extraflags = None
version = None
@@ -246,6 +248,10 @@ def version_specific_cflags(d):
# work if the native toolchain is Clang, but as of this writing that
# doesn't work anyway.
version = d.getVar('GCCVERSION', expand=True)[0]
+ # skip non digit characters at the beginning, e.g. from "linaro-6.2%"
+ match = re.search("\d", version)
+ if match:
+ version = version[match.start():]
if version.isdigit():
extraflags = d.getVar('FLAGS_GCC%d' % int(version), True) or ''