diff options
| author | Max Krummenacher <max.oss.09@gmail.com> | 2018-01-18 14:46:56 +0100 |
|---|---|---|
| committer | Maxin B. John <maxin.john@intel.com> | 2018-02-26 13:51:38 +0200 |
| commit | fbe0b0eb30d93f5fa2101fb015f20c1dc118b4a6 (patch) | |
| tree | 0e7ab0228daa416e7439a661cfed9d4ae621ca69 | |
| parent | 952e92b035b94b700abf094415db7c189362f146 (diff) | |
| download | meta-java-fbe0b0eb30d93f5fa2101fb015f20c1dc118b4a6.tar.gz | |
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.inc | 6 |
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" | |||
| 232 | # version. | 232 | # version. |
| 233 | 233 | ||
| 234 | def version_specific_cflags(d): | 234 | def version_specific_cflags(d): |
| 235 | import re | ||
| 236 | |||
| 235 | extraflags = None | 237 | extraflags = None |
| 236 | version = None | 238 | version = None |
| 237 | 239 | ||
| @@ -246,6 +248,10 @@ def version_specific_cflags(d): | |||
| 246 | # work if the native toolchain is Clang, but as of this writing that | 248 | # work if the native toolchain is Clang, but as of this writing that |
| 247 | # doesn't work anyway. | 249 | # doesn't work anyway. |
| 248 | version = d.getVar('GCCVERSION', expand=True)[0] | 250 | version = d.getVar('GCCVERSION', expand=True)[0] |
| 251 | # skip non digit characters at the beginning, e.g. from "linaro-6.2%" | ||
| 252 | match = re.search("\d", version) | ||
| 253 | if match: | ||
| 254 | version = version[match.start():] | ||
| 249 | 255 | ||
| 250 | if version.isdigit(): | 256 | if version.isdigit(): |
| 251 | extraflags = d.getVar('FLAGS_GCC%d' % int(version), True) or '' | 257 | extraflags = d.getVar('FLAGS_GCC%d' % int(version), True) or '' |
