RFR (S): 7192916: Hotspot development launcher should use DYLD_LIBRARY_PATH on OS X

David Holmes david.holmes at oracle.com
Tue Aug 21 18:10:19 PDT 2012


On 21/08/2012 11:57 PM, Staffan Larsen wrote:
> I prefer the earlier version since it's easier to read. New version with correct indentation:
>
> http://cr.openjdk.java.net/~sla/7192916/webrev.01/

Copyright year needs updating.

Shouldn't this:

131         DYLD_LIBRARY_PATH="$SBP:$LD_LIBRARY_PATH"

be using  $DYLD_LIBRARY_PATH ?

David
-----

>
> Thanks,
> /Staffan
>
> On 21 aug 2012, at 15:51, Nils Loodin<nils.loodin at oracle.com>  wrote:
>
>>
>>>> Although, since the logic is very similar, perhaps it should be a common 'logic bloc', and the 'if darwin' statement only set's if it's LD_LIBRARY_PATH or DYLD_LIBRARY_PATH that gets
>>>> That would be good, except the common "logic block" needs to see if either LD_LIBRARY_PATH or DYLD_LIBRARY_PATH is set. But I could change it to something like this:
>>>>
>>>> OS=`uname -s`
>>>> if [ "${OS}" = "Darwin" ]
>>>> then
>>>>      LIB_PATH=$DYLD_LIBRARY_PATH
>>>> else
>>>>      LIB_PATH=$LD_LIBRARY_PATH
>>>> fi
>>>>
>>>> if [ -z "$LIB_PATH" ]
>>>> then
>>>>      LIB_PATH="$SBP"
>>>> else
>>>>      LIB_PATH="$SBP:$LIB_PATH"
>>>> fi
>>>>
>>>> if [ "${OS}" = "Darwin" ]
>>>> then
>>>>      export DYLD_LIBRARY_PATH=$LIB_PATH
>>>> else
>>>>      export LD_LIBRARY_PATH=$LIB_PATH
>>>> fi
>>>>
>>>>
>>>> /Staffan
>>>>
>>
>> Ah, right. Well, not sure if that's cleaner, both seems viable. I'll leave it up to your judgement.
>>
>> /Nils
>


More information about the hotspot-dev mailing list