RFR: JDK-8075140: Solaris build of native libraries not consistently using EXTRA_CFLAGS and EXTRA_LDFLAGS

David Holmes david.holmes at oracle.com
Sat Mar 14 00:08:21 UTC 2015


Hi Erik,

On 14/03/2015 12:08 AM, Erik Joelsson wrote:
> Hello,
>
> While working on the new Hotspot makefiles in build-infra I noticed this
> problem. When introducing devkits for Solaris, we rely on the variables
> EXTRA_CFLAGS, EXTRA_CXXFLAGS and EXTRA_LDFLAGS to propagate the SYSROOT
> specific flags into the hotspot build. However, these flags aren't
> consistently used in the Hotspot build for all the native libraries.
>
> This patch adds the variables to all missing compile and link command
> lines. It also fixes an issue with saproc.so where the debug info was
> created off one of the object files instead of the library.
>
> Bug: https://bugs.openjdk.java.net/browse/JDK-8075140
> Webrev: http://cr.openjdk.java.net/~erikj/8075140/webrev.hotspot.01/

For linux we primarily (only?) use these to pass cross-compilation flags 
and so everything that is compiled generally needs the same flags.

Outside of cross-compilation though that doesn't necessarily hold. If 
someone uses EXTRA_CFLAGS as a general customization mechanism it might 
only be intended for the primary VM build not for secondary libraries 
like jsig, dtrace and SA.

So I'm not sure that this is the right thing to do as really these 
variables are not quite what people might expect them to be. In general 
local customizations are better handled by local editing of the 
appropriate build file.

David

> /Erik



More information about the build-dev mailing list