Review Request: 8005879: Add -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 to builds on Mac

Erik Joelsson erik.joelsson at oracle.com
Fri Feb 15 01:49:05 PST 2013



On 2013-02-15 09:43, Erik Joelsson wrote:
>
> On 2013-02-14 18:04, David DeHaven wrote:
>>> Here are a series of patches that adds the following to all native 
>>> compile lines on macosx:
>>>
>>> -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 
>>> -DMAC_OS_X_VERSION_MIN_REQUIRED=1070
>> I know I'm not a reviewer, but I have an opinion anyways :)
>>
>> Using "-mmacosx-version-min=10.7" seems more appropriate for the 
>> latter, this is passed to the linker as well which I believe sets 
>> version information in the Mach-O headers (in the form of a load 
>> command) to prevent it from being loaded on older systems. The 
>> MIN_REQUIRED macro is set to a value that matches what's passed to 
>> the -mmacosx-version-min argument, so it doesn't need to be provided.
>>
>>
> The effect of the -mmacosx-version-min=10.7 when sent to the linker is 
> to make any calls to newer APIs "softlinked". This means the library 
> will still load fine on the older OS, but the application is 
> responsible for only actually making the newer calls if they are 
> available. This is a good feature if you knowingly want to support 
> multiple versions of the OS and still use features in the newer OS 
> when available. I do not believe we have the need for that and if we 
> ever do, then these parameters will need to change.
>
It's true -mmacosx-version-min= also sets the macro 
MAC_OS_X_VERSION_MIN_REQUIRED=, but I see no gain in changing just one 
of them to something else just because it works. The format of the 
parameter is also different (10.7 vs 1070) which would require us to add 
logic for converting between the two.

/Erik


More information about the hotspot-runtime-dev mailing list