RFR: JDK-8075140: Solaris build of native libraries not consistently using EXTRA_CFLAGS and EXTRA_LDFLAGS
Erik Joelsson
erik.joelsson at oracle.com
Wed Mar 18 09:32:47 UTC 2015
David,
Are you OK with me pushing this or should I interpret your reply as a
need for a different solution?
/Erik
On 2015-03-16 09:26, Erik Joelsson wrote:
>
> On 2015-03-14 01:08, David Holmes wrote:
>> 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.
>>
> Well, the devkit/sysroot CFLAGS and LDFLAGS should be considered more
> or less equal to cross compilation arguments. Everything being
> compiled for the target platform should use them. If EXTRA_CFLAGS is
> not a good option for providing these compiler options, then it
> shouldn't be used for cross compilation on linux either. I figured
> that since we are already using them that way on linux, extending that
> usage to Solaris would be the right thing to do. If it isn't, should I
> define a new set of variables for transporting these options for both
> platforms instead?
>
> I still think using EXTRA_*FLAGS is a viable solution for my usecase
> and that anyone trying to use these variables and expecting them to
> only apply selectively is on a slippery slope.
>
> /Erik
>> David
>>
>>> /Erik
>
More information about the build-dev
mailing list