Review Request: 8005855: build-infra: Remove -R flag when cross compiling
Erik Joelsson
erik.joelsson at oracle.com
Tue Jan 22 10:18:00 UTC 2013
New webrev for this:
http://cr.openjdk.java.net/~erikj/8005855/webrev.root.02/
I changed the sed to only remove the -R argument and made it conditional
on cross compilation.
A bit of background on this. The X_LIBS variable is created by autoconf
by calling some special macros to locate libraries needed for X11. On
some systems nothing extra is needed and X_LIBS is left empty, but on
some, extra -L arguments are needed. Autoconf then also adds -R to put
these extra paths in the runtime search path for the built
library/executable.
In the case where we cross compile, the extra -R paths are unwanted
however. On the build host, autoconf will typically find them in
something like /path/to/cross-toolkit/lib. This directory is unlikely to
exist on the target host. The extra rpath entry in the built binary is
usually harmless, but also not correct. The main point though is that it
wasn't there in the old build and that's why we are trying to remove it
in the new.
/Erik
On 2013-01-09 14:14, Erik Joelsson wrote:
> 8003958 fixes this for sizer generation yes, but there is also one
> library in CompileNativeLibraries that has X_LIBS on the link line.
> But I suppose we shouldn't fix it unless there is a problem with it.
>
> /Erik
>
> On 2013-01-09 03:56, David Holmes wrote:
>> On 9/01/2013 5:56 AM, Kelly O'Hair wrote:
>>> I need more info on this, what is X_LIBS for, and why remove ALL -R
>>> options.
>>
>> IIRC Fredrik added this to deal with some binary difference detected
>> on OSX. I don't know what these variables actually contain
>>
>>> I always considered the -R options to be LD options, not library
>>> specifications really.
>>> The -L and -l options are library specifications, but -R is just a
>>> path that gets baked into the .so
>>> for runtime access to the libraries, the paths don't have to exist
>>> at build time.
>>
>> The paths that get baked in at build time may not exist at runtime.
>>
>> Also for cross-compilation the -R option is not recognized - which is
>> what
>>
>> https://jbs.oracle.com/bugs/browse/JDK-8003958
>>
>> build-infra: Cross-compilation of sizers utility has been broken
>>
>> is all about. So these two bugs seems to be overlapping somewhat -
>> but the real fix is 8003958.
>>
>> David
>> -----
>>
>>> -kto
>>>
>>> On Jan 8, 2013, at 5:35 AM, Erik Joelsson wrote:
>>>
>>>> Filter away -R flags from X_LIBS variable in configure.
>>>>
>>>> http://cr.openjdk.java.net/~erikj/8005855/webrev.root.01/
>>>
More information about the build-dev
mailing list