jdk8 extra c/cxx - flags settings

Magnus Ihse Bursie magnus.ihse.bursie at oracle.com
Mon Dec 2 14:03:50 UTC 2013


On 2013-12-02 10:34, Volker Simonis wrote:
> Hi,
>
> I've just created "configure needs a way to customize compiler/linker
> options for the "build" compiler"
> (https://bugs.openjdk.java.net/browse/JDK-8029375).

Actually, I think the --with-extra-cflags argument is a non-optimal 
solution. The common way to do this in the configure world is to supply 
CFLAGS= as argument to configure.

I believe the reason this was not done this way initially was, one or 
both of the following:
1) The original implementor did not know of the CFLAGS convention,
2) When setting CFLAGS in this way, it overrides CFLAGS instead of 
appending to it. But we do not really use CFLAGS internally -- instead 
we have specialiced CFLAGS like JDK_CFLAGS. These should instead be 
written to include a CFLAGS, which can be user supplied but will 
normally be empty.

But then again, this is mostly a different question from what you are 
talking about. :-) Even with a CFLAGS= support, I think those flags 
should go only to the normal "target" compilation, not when building 
tools for the build platform.

/Magnus




More information about the build-dev mailing list