Status of building problem with GCC 6

Kim Barrett kim.barrett at oracle.com
Sun Jul 3 16:36:15 UTC 2016


> On Jul 1, 2016, at 3:13 PM, Kim Barrett <kim.barrett at oracle.com> wrote:
> 
>> On Jul 1, 2016, at 10:17 AM, Yasumasa Suenaga <yasuenag at gmail.com> wrote:
>> 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 \
>> —————
> 
> Please keep in mind that my understanding of the new build system is
> pretty weak.  That said, this doesn't look to me like the right way to
> fix JDK-8156980.
> 
> There is already code that is supposed to deal with both the -std
> option and the additional code generation options, which seems to work
> for some of the packages that we build, but is not affecting the
> Hotspot build for some reason.  Adding a completely separate way to
> deal with this just for Hotspot seems contrary to the unification
> effort that was part of the new build system.
> 
> -fno-lifetime-dse is a relatively recent option, and needs to be
> conditionalized.  And discussion during the review of JDK-8151841 led
> to the additional code generation options being limited to gcc6+.
> The existing code mentioned above is conditionalizing that way, except
> it's just not working for Hotspot.

I looked into why the additional code generation options aren’t being
added, and think I found 3-4 different problems, each of which would
interfere with that part.  I’m working on a patch, which I hope to send
to Yasumasa in next couple of days for a gcc6 test, since I don’t have
easy access to that compiler right now.

I’ve not (re)explored why -std=gnu++98 isn’t making it to Hotspot builds
yet, though what I’ve learned in the process of investigating the code
generation options problem has given me a possible lead.




More information about the hotspot-dev mailing list