jdk8 extra c/cxx - flags settings
erik.joelsson at oracle.com
Mon Dec 2 08:27:03 UTC 2013
On 2013-11-29 14:56, Baesken, Matthias wrote:
>> We haven't had the need to customize the compiler or
>> link args for these yet, but I don't see why there shouldn't be a
>> variable from configure that that would enable customization.
> Would this be done with another --with... configure option ?
> Should we provide a change for this ?
Yes, it would. I would say the first step would be creating a bug for
it. Of course providing a patch will make it more likely to be fixed
> -----Original Message-----
> From: Erik Joelsson [mailto:erik.joelsson at oracle.com]
> Sent: Montag, 25. November 2013 10:37
> To: David Holmes; Baesken, Matthias
> Cc: build-dev at openjdk.java.net
> Subject: Re: jdk8 extra c/cxx - flags settings
> On 2013-11-25 03:01, David Holmes wrote:
>> Hi Matthias,
>> On 22/11/2013 10:55 PM, Baesken, Matthias wrote:
>>> I had the need for setting additional C/C++ compilation flags in my
>>> OpenJDK8 build.
>>> It seems they are used for most jdk C/C++ compilation, but at least
>>> the generators from
>>> seem to be an exception.
>> The "extra flags' variables are intended for use when compiling the
>> actual JDK sources, not for compiling auxiliary tools used during the
>> build process. There is currently no means, that I am aware of, to
>> customize those invocations.
>> To expand further on this the primary role of the "extra flags" is to
>> provide values needed for cross-compilation of the JDK sources. I'm
>> sure you can see that it wouldn't make sense to pass cross-compiler
>> options to the compilation of the build tools on the host build machine.
> David is correct, these tools are handled differently due to being
> compiled by the "build" compiler rather than the "target" compiler when
> cross compiling. We haven't had the need to customize the compiler or
> link args for these yet, but I don't see why there shouldn't be a
> variable from configure that that would enable customization.
>>> Example :
>>> configure --with-extra-cflags=-DTESTMYEXTRAFLAGC
>>> does not lead to the expected flags in the build for
>>> genSocketOptionRegistry.c :
>>> /usr/local/bin/gcc -DTHIS_FILE='"genSocketOptionRegistry.c"' -c -MMD
>>> (while the flags show up for "normal" C/C++ files .)
>>> Is there another option (available / planned?) to configure the
>>> extra C/C++ compile flags for this special case ?
More information about the build-dev