public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Simon Wright <simon@pushface.org>
To: Jeff Law <law@redhat.com>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [PATCH]: PR target/80204 (Darwin macosx-version-min problem)
Date: Mon, 04 Sep 2017 18:57:00 -0000	[thread overview]
Message-ID: <5C82FB09-95EE-47A4-91D9-7ADEF75023F6@pushface.org> (raw)
In-Reply-To: <20609590-d986-0ea0-5b20-e6104622badf@redhat.com>

(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 <law@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 <simon@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	other threads:[~2017-09-04 18:57 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-01 22:05 Simon Wright
2017-09-04  6:09 ` Jeff Law
2017-09-04 18:57   ` Simon Wright [this message]
2017-09-04 19:05     ` Jakub Jelinek
2017-09-04 19:47 ` Simon Wright
2017-09-04 19:48   ` Jakub Jelinek
2017-09-11 12:32     ` Iain Sandoe
2017-09-12 15:29     ` Jeff Law
  -- strict thread matches above, loose matches on Subject: below --
2017-09-01 13:18 Simon Wright

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5C82FB09-95EE-47A4-91D9-7ADEF75023F6@pushface.org \
    --to=simon@pushface.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=law@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).