RFR(XS) : 8144695 : --disable-warnings-as-errors does not work for HotSpot build
Igor Ignatyev
igor.ignatyev at oracle.com
Wed Dec 16 23:14:44 UTC 2015
> On Dec 17, 2015, at 2:09 AM, Magnus Ihse Bursie <magnus.ihse.bursie at oracle.com> wrote:
>
> On 2015-12-16 23:54, Igor Ignatyev wrote:
>> as Mikael V correctly pointed out, there is missed $( ) in solaris/adlc.
>> here is the new webrev: http://cr.openjdk.java.net/~iignatyev/8144695/webrev.01/
>>
>> and diff comparing to the prev. iteration:
>>
>>> diff -r fe04b6ccb21a make/solaris/makefiles/adlc.make
>>> --- a/make/solaris/makefiles/adlc.make Thu Dec 17 00:50:42 2015 +0300
>>> +++ b/make/solaris/makefiles/adlc.make Thu Dec 17 01:47:39 2015 +0300
>>> @@ -77,7 +77,7 @@
>>> WARNINGS_ARE_ERRORS ?= -w -xwe
>>> endif
>>> -CFLAGS_WARN = WARNINGS_ARE_ERRORS
>>> +CFLAGS_WARN = $(WARNINGS_ARE_ERRORS)
>>> # When using compiler version 5.13 (Solaris Studio 12.4), calls to explicitly
>>> # instantiated template functions trigger this warning when +w is active.
> Have you tested that this achieves the correct thing, i.e. if introduce a warning in a file, you can still build successfully on all platforms with --disable-warnings-as-errors?
not on all platforms, but I checked that it fixes the problem from the description:
> sh ./configure --disable-warnings-as-errors --enable-native-coverage --enable-debug
> make all
> ...
> /home/dmitry/work/bugs/disable_warnings_as_errors/jdk9-hs-rt/hotspot/src/share/vm/gc/shared/genCollectedHeap.cpp: In function ‘ScratchBlock* removeSmallestScratch(ScratchBlock**)’:
> /home/dmitry/work/bugs/disable_warnings_as_errors/jdk9-hs-rt/hotspot/src/share/vm/gc/shared/genCollectedHeap.cpp:1032:33: error: ‘smallest_ptr’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
> *smallest_ptr = smallest->next;
> ^
> cc1plus: all warnings being treated as errors
> make[8]: *** [genCollectedHeap.o] Error 1
will double check other platforms.
— Igor
>
> /Magnus
>
>> — Igor
>>
>>> On Dec 17, 2015, at 1:09 AM, Igor Ignatyev <igor.ignatyev at oracle.com> wrote:
>>>
>>>> http://cr.openjdk.java.net/~iignatyev/8144695/webrev.00/
>>> 11 lines changed: 4 ins; 0 del; 7 mod;
>>>
>>> Hi,
>>>
>>> could you please review the fix for 8144695[1]?
>>>
>>> 8141543[1] propagated --disable-warnings-as-errors to hotspot build by setting WARNINGS_ARE_ERRORS to empty line. however in hotspot makefiles there are places where this variable is set explicitly.
>>> the fix changes = operator to ?= operator and updates adlc.make to use WARNINGS_ARE_ERRORS if it’s defined.
>>>
>>> [1] https://bugs.openjdk.java.net/browse/JDK-8144695
>>> [2] https://bugs.openjdk.java.net/browse/JDK-8141543
>>>
>>> Thanks,
>>> — Igor
>>>
>>>
>
More information about the build-dev
mailing list