aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaxin B. John <maxin.john@intel.com>2017-10-09 15:54:10 +0300
committerMaxin B. John <maxin.john@intel.com>2017-10-09 15:54:10 +0300
commit03e35bf64f97980652ac532cca0ea96e730a551c (patch)
tree40a7d0da722f5d0990d4069da8602ba36c7e6d46
parent6801f6d4e19c88dabd5a02dfbbf69a2dcc8e079c (diff)
downloadmeta-java-03e35bf64f97980652ac532cca0ea96e730a551c.tar.gz
meta-java-03e35bf64f97980652ac532cca0ea96e730a551c.tar.bz2
meta-java-03e35bf64f97980652ac532cca0ea96e730a551c.zip
Revert "openjdk-8-common: Fix the issue of building failed adlc on host with gcc < 6"
This reverts commit 6801f6d4e19c88dabd5a02dfbbf69a2dcc8e079c.
-rw-r--r--recipes-core/openjdk/openjdk-8-common.inc36
1 files changed, 12 insertions, 24 deletions
diff --git a/recipes-core/openjdk/openjdk-8-common.inc b/recipes-core/openjdk/openjdk-8-common.inc
index c609232..83828e1 100644
--- a/recipes-core/openjdk/openjdk-8-common.inc
+++ b/recipes-core/openjdk/openjdk-8-common.inc
@@ -231,39 +231,27 @@ FLAGS_GCC7 = "-fno-lifetime-dse -fno-delete-null-pointer-checks"
# version is and only add the flags that are appropriate for that GCC
# version.
-def version_specific_cflags(d, toolchain):
+def version_specific_cflags(d):
extraflags = None
version = None
- from subprocess import Popen, PIPE
- cmd = d.expand('%s -dumpversion' % toolchain ).split()
- cc = Popen(cmd, stdout=PIPE, stderr=PIPE)
- version = cc.communicate()[0].decode('utf-8')[0]
-
- if version.isdigit():
- extraflags = d.getVar('FLAGS_GCC%d' % int(version), True) or ''
- return extraflags
- return ''
-
-python __anonymous() {
if bb.data.inherits_class('native', d):
- toolchain = d.getVar('CC', True)
- extraflags = version_specific_cflags(d, toolchain)
- d.appendVar("CFLAGS", ' ' + extraflags)
- d.appendVar("CXXFLAGS", ' ' + extraflags)
+ from subprocess import Popen, PIPE
+
+ cmd = d.expand('${CC} -dumpversion').split()
+ cc = Popen(cmd, stdout=PIPE, stderr=PIPE)
+ version = cc.communicate()[0].decode('utf-8')[0]
else:
# in the cross case, trust that GCCVERSION is correct. This won't
# work if the native toolchain is Clang, but as of this writing that
# doesn't work anyway.
version = d.getVar('GCCVERSION', expand=True)[0]
- extraflags = d.getVar('FLAGS_GCC%d' % int(version), True) or ''
- d.appendVar("TARGET_CFLAGS", ' ' + extraflags)
- d.appendVar("TARGET_CXXFLAGS", ' ' + extraflags)
- toolchain = d.getVar('BUILD_CC', True)
- extraflags = version_specific_cflags(d, toolchain)
- d.appendVar("BUILD_CFLAGS", ' ' + extraflags)
- d.appendVar("BUILD_CXXFLAGS", ' ' + extraflags)
-}
+ if version.isdigit():
+ extraflags = d.getVar('FLAGS_GCC%d' % int(version), True) or ''
+ return extraflags
+ return ''
+CFLAGS_append = " ${@version_specific_cflags(d)}"
+CXXFLAGS_append = " ${@version_specific_cflags(d)}"
CXX_append = " -std=gnu++98"