jdk8 extra c/cxx - flags settings
Volker Simonis
volker.simonis at gmail.com
Mon Dec 2 09:34:50 UTC 2013
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).
Matthias and I will work on a patch.
Regards,
Volker
On Mon, Dec 2, 2013 at 9:27 AM, Erik Joelsson <erik.joelsson at oracle.com> wrote:
>
> 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 sooner too.
>
> /Erik
>
>> Matthias
>>
>>
>> -----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
>>>>
>>>> jdk/makefiles/gensrc/GensrcMisc.gmk
>>>>
>>>> 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.
>>
>> /Erik
>>>
>>> David
>>> -----
>>>
>>>> Example :
>>>>
>>>> configure --with-extra-cflags=-DTESTMYEXTRAFLAGC
>>>> --with-extra-cxxflags=-DTESTMYEXTRAFLAGCXX
>>>>
>>>> does not lead to the expected flags in the build for
>>>> genSocketOptionRegistry.c :
>>>>
>>>> ...
>>>> /usr/local/bin/gcc -DTHIS_FILE='"genSocketOptionRegistry.c"' -c -MMD
>>>> -MF
>>>>
>>>> /mydir/open_jdk/jdk8/linuxx86_64_opt/jdk/gensrc/genSocketOptionRegistry/genSocketOptionRegistry.d
>>>> -o
>>>>
>>>> /mydir/open_jdk/jdk8/linuxx86_64_opt/jdk/gensrc/genSocketOptionRegistry/genSocketOptionRegistry.o
>>>>
>>>> /mydir/open_jdk/jdk8/openjdk8/jdk/src/share/native/sun/nio/ch/genSocketOptionRegistry.c
>>>>
>>>> ...
>>>>
>>>> (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 ?
>>>>
>>>>
>>>> Thanks,
>>>> Matthias
>>>>
>
More information about the build-dev
mailing list