Hi all,
I want to share task list for building OpenJDK with GCC 6.
* jdk:
- JDK-8160294: reviewing
* hotspot
Subtasks of JDK-8160310:
- JDK-8160353: reviewing (includes patch for JDK-8156980)
- JDK-8160354: reviewing (a part of fix depends on JDK-8156980)
- JDK-8160356: waiting to push
- JDK-8160357: might be discarded if JDK-8156980 will be resolved.
- JDK-8160361: waiting to push
- JDK-8160363: might be discarded if JDK-8156980 will be resolved.
For HotSpot, I think JDK-8156980 should be fixed at first.
I've proposed changes as below:
-----------
diff -r ba08710f3b6c make/lib/CompileJvm.gmk
--- a/make/lib/CompileJvm.gmk Mon Jun 27 09:35:18 2016 +0200
+++ b/make/lib/CompileJvm.gmk Tue Jun 28 12:10:09 2016 +0900
@@ -187,6 +187,11 @@
JVM_OPTIMIZATION ?= HIGHEST_JVM
+JVM_CXXFLAGS := $(JVM_CFLAGS)
+ifeq ($(TOOLCHAIN_TYPE), gcc)
+ JVM_CXXFLAGS += -std=gnu++98 -fno-delete-null-pointer-checks
-fno-lifetime-dse
+endif
+
################################################################################
# Now set up the actual compilation of the main hotspot native library
@@ -202,6 +207,7 @@
CFLAGS := $(JVM_CFLAGS), \
CFLAGS_DEBUG_SYMBOLS := $(JVM_CFLAGS_SYMBOLS), \
CXXFLAGS_DEBUG_SYMBOLS := $(JVM_CFLAGS_SYMBOLS), \
+ CXXFLAGS := $(JVM_CXXFLAGS), \
vm_version.cpp_CXXFLAGS := $(CFLAGS_VM_VERSION), \
DISABLED_WARNINGS_clang := delete-non-virtual-dtor
dynamic-class-memaccess \
empty-body format logical-op-parentheses parentheses \
-----------
I guess GCC 6 (or later) will be provided from several Linux Distros in near
future.
In fact, Fedora 24 already provides it.
I'm sure this work helps many developers who use Linux.
Thanks,
Yasumasa