aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Krummenacher <max.oss.09@gmail.com>2018-01-18 14:46:56 +0100
committerMaxin B. John <maxin.john@intel.com>2018-02-26 13:51:38 +0200
commitfbe0b0eb30d93f5fa2101fb015f20c1dc118b4a6 (patch)
tree0e7ab0228daa416e7439a661cfed9d4ae621ca69
parent952e92b035b94b700abf094415db7c189362f146 (diff)
downloadmeta-java-rocko.tar.gz
meta-java-rocko.tar.bz2
meta-java-rocko.zip
openjdk-8: strip leading non digit chars from GCCVERSIONrocko
When using the linaro cross toolchain GCCVERSION is set to "linaro-6.2%", i.e. the first char is not GCC's major version. Thus needed compiler options for GCC 6 are not set. Fix at least this case by stripping GCCVERSION up to the first numeric char. Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> (cherry picked from commit 1fbdc60eaccaa29c2942d479f8068b722e7b5bf3) Signed-off-by: Maxin B. John <maxin.john@intel.com>
-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 ''