jdk8 extra c/cxx - flags settings
volker.simonis at gmail.com
Mon Dec 2 16:06:34 UTC 2013
I think we discussed this before. CFLAGS is used internally by the
configure script (e.g. for compiling little test programs which are
used by configure itself). Afterwards it is explicitly and
intentionally cleared (with a warning on the console) because we want
to avoid pulling in compiler options from the environment.
I think the solution you proposed in the bug comment with new options
called '--with-extra-build-cflags' is the right way to go although I
think the name itself may be too generic (actually all the flags are
for the build in some way :) What about
'--with-extra-buildgenerators-cflags' or just
'--with-extra-generators-cflags'? Actually, I think we can argue about
the exact wording once the webrev is ready:)
On Mon, Dec 2, 2013 at 3:03 PM, Magnus Ihse Bursie
<magnus.ihse.bursie at oracle.com> wrote:
> On 2013-12-02 10:34, Volker Simonis wrote:
>> I've just created "configure needs a way to customize compiler/linker
>> options for the "build" compiler"
> 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.
More information about the build-dev