RFR [XXS] : JDK-8081616: build fixes for --disable-warnings-as-errors
david.holmes at oracle.com
Tue Jun 2 09:57:37 UTC 2015
On 2/06/2015 6:40 PM, Bertrand Delsart wrote:
> Thanks David,
> Answers inlined.
> On 02/06/2015 01:34, David Holmes wrote:
>> Hi Bertrand,
>> On 2/06/2015 3:23 AM, Bertrand Delsart wrote:
>>> Hi all,
>>> A small open webrev to fix some issues around
>>> --disable-warnings-as-errors (this is not a full cleanup):
>>> Without the fix, -Werror is used to compiled native JDK libraries even
>>> when the --disable-warnings-as-errors is used.
>>> A lot of these libs are addressed by clearing CFLAGS_WARNINGS_ARE_ERRORS
>>> in flags.m4
>> I'd be tempted to make the whole case statement that sets
>> CFLAGS_WARNINGS_ARE_ERRORS and DISABLE_WARNING_PREFIX conditional on
>> WARNINGS_AS_ERRORS. But that's for the build folk to decide.
> I did not do it so that DISABLE_WARNING_PREFIX is always defined. This
> allows to tune the reported warnings while still not causing an error if
> we cannot eliminate all warnings (e.g. use something like "-Wall
> -Wno-..." without "-Werror").
Ah yes - good point. In that case what you have done seems the simplest fix.
>> But I think your change should probably be expressed as:
>> if test "WARNINGS_AS_ERRORS" = "true"; then ...
> I had tried something like that first but must have got the syntax
> wrong. The new version below seems to work (will do a jprt run to check
> all platforms):
> if test "$WARNINGS_AS_ERRORS" = "false"; then
>>> Lib-jdk.sctp.gmk is a special case because it uses directly -Werror.
>>> Instead of modifying SCTP to use CFLAGS_WARNINGS_ARE_ERRORS, I use the
>>> mechanism put in place in that file to disable -Werror and control it
>>> through the WARNINGS_AS_ERRORS configured value.
>> Seems fine.
>>> Best regards,
More information about the build-dev