RFR : 8211146 : fix problematic elif-tests after recent gcc warning changes Werror=undef

Alan Bateman Alan.Bateman at oracle.com
Wed Sep 26 09:51:12 UTC 2018



On 26/09/2018 10:24, Baesken, Matthias wrote:
>
> Hello, please review this small build fix .
>
> After the recent changes  to  the gcc compile flags   with  8211029   
>  , most of our  Linux builds stopped working .
>
> Error :
>
> === Output from failing command(s) repeated here ===
>
> * For target support_native_java.base_libnet_DatagramPacket.o:
>
> In file included from 
> /OpenJDK/8210319/jdk/src/java.base/share/native/libnet/net_util.h:31:0,
>
>                 from 
> /OpenJDK/8210319/jdk/src/java.base/share/native/libnet/DatagramPacket.c:27:
>
> /OpenJDK/8210319/jdk/src/java.base/unix/native/libnet/net_util_md.h:50:7: 
> error: "__solaris__" is not defined [-Werror=undef]
>
> #elif __solaris__
>
>        ^
>
> After looking into it, it seems  that  the 
> jdk/src/java.base/unix/native/libnet/net_util_md.h compile error is 
> only triggered on older Linux OS  (e.g. SLES11).
>
> Probably that’s why it was not seen at Oracle  after  puhsing  after 
> 8211029   .
>
> Some greps  showed me a number of similar problematic  #elif-checks 
> for OS, I adjusted them too .
>
> Bug / webrev :
>
> https://bugs.openjdk.java.net/browse/JDK-8211146
>
> http://cr.openjdk.java.net/~mbaesken/webrevs/8211146.0/ 
> <http://cr.openjdk.java.net/%7Embaesken/webrevs/8211146.0/>
>
>
This looks okay to me although I could imagine this issue coming back 
again with ongoing edits that add "ifdef __solaris" or similar.

-Alan



More information about the build-dev mailing list