RFR [XXS] : JDK-8081616: build fixes for --disable-warnings-as-errors

David Holmes david.holmes at oracle.com
Mon Jun 1 23:34:02 UTC 2015

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):
> http://cr.openjdk.java.net/~bdelsart/8081616/webrev.00/webrev/
> 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 
WARNINGS_AS_ERRORS. But that's for the build folk to decide.

But I think your change should probably be expressed as:

if test "WARNINGS_AS_ERRORS" = "true"; 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,
> Bertrand.

More information about the build-dev mailing list