(Apologies if this is a duplicate: Mac Mail vs the list's requirement for plain 
text)

On 4 Sep 2017, at 07:09, Jeff Law <l...@redhat.com> wrote:
> 
> On 09/01/2017 04:05 PM, Simon Wright wrote:
>> In gcc/config/darwin-driver.c, darwin_find_version_from_kernel() assumes
>> that the minor version in the Darwin kernel version (16.7.0, => minor
>> version 7) is equal to the bugfix component of the macOS version, so that
>> the compiler receives -mmacosx-version-min=10.12.7 and the linker receives
>> -macosx_version_min 10.12.7.
>> 
>> Unfortunately, Apple don’t apply this algorithm; the macOS version is
>> actually 10.12.6.
>> 
>> Getting this wrong means that it’s impossible to run an executable from 
>> within a bundle: Sierra complains "You have macOS 10.12.6. The application
>> requires macOS 10.12.7 or later".
>> 
>> A workround would perhaps be to link the executable with
>> -Wl,-macosx_version_min,`sw_vers -productVersion` (I assume that it’s only
>> the linker phase that matters?)
>> 
>> I see that Apple’s gcc (Apple LLVM version 8.0.0
>> (clang-800.0.42.1)) specifies - only at link time -
>> -macosx_version_min 10.12.0
>> 
>> This patch does the same.
>> 
>> gcc/Changelog:
>> 
>>      2017-09-01 Simon Wright <si...@pushface.org>
>> 
>>      PR target/80204
>>      * config/darwin-driver.c (darwin_find_version_from_kernel): eliminate 
>> calculation of the
>>        minor version, always output as 0.
>> 
> OK
> jeff

Great! Can it be applied, please, when convenient

--S

Reply via email to