public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Iain Sandoe <iain@sandoe.co.uk>
To: Mark Mentovai <mark@mentovai.com>
Cc: "GCC Patches" <gcc-patches@gcc.gnu.org>,
	"François-Xavier Coudert" <fxcoudert@gcc.gnu.org>
Subject: Re: [PATCH] Darwin: Future-proof -mmacosx-version-min
Date: Fri, 10 Jun 2022 16:18:08 +0100	[thread overview]
Message-ID: <014F8BAE-2051-4064-BB55-EC31545CF6C7@sandoe.co.uk> (raw)
In-Reply-To: <20220610145642.29159-1-mark@mentovai.com>

Hi Mark,

> On 10 Jun 2022, at 15:56, Mark Mentovai <mark@mentovai.com> wrote:
> 
> f18cbc1ee1f4 (2021-12-18) updated various parts of gcc to not impose a
> Darwin or macOS version maximum of the current known release. Different
> parts of gcc accept, variously, Darwin version numbers matching
> darwin2*, and macOS major version numbers up to 99. The current released
> version is Darwin 21 and macOS 12, with Darwin 22 and macOS 13 expected
> for public release later this year. With one major OS release per year,
> this strategy is expected to provide another 8 years of headroom.
> 
> However, f18cbc1ee1f4 missed config/darwin-c.c (now .cc), which
> continued to impose a maximum of macOS 12 on the -mmacosx-version-min
> compiler driver argument. This was last updated from 11 to 12 in
> 11b967577483 (2021-10-27), but kicking the can down the road one year at
> a time is not a viable strategy, and is not in line with the more recent
> technique from f18cbc1ee1f4.
> 
> Prior to 556ab5125912 (2020-11-06), config/darwin-c.c did not impose a
> maximum that needed annual maintenance, as at that point, all macOS
> releases had used a major version of 10. The stricter approach imposed
> since then was valuable for a time until the particulars of the new
> versioning scheme were established and understood, but now that they
> are, it's prudent to restore a more permissive approach.

OK for master and open branches, thanks 
Iain

> 
> gcc/ChangeLog:
> 
> 	* config/darwin-c.cc: Make -mmacosx-version-min more future-proof.
> 
> Signed-off-by: Mark Mentovai <mark@mentovai.com>
> ---
> gcc/config/darwin-c.cc | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/gcc/config/darwin-c.cc b/gcc/config/darwin-c.cc
> index 9203c84d2c26..00fc1253e265 100644
> --- a/gcc/config/darwin-c.cc
> +++ b/gcc/config/darwin-c.cc
> @@ -691,7 +691,8 @@ macosx_version_as_macro (void)
>   if (!version_array)
>     goto fail;
> 
> -  if (version_array[MAJOR] < 10 || version_array[MAJOR] > 12)
> +  /* clang accepts up to 99. */
> +  if (version_array[MAJOR] < 10 || version_array[MINOR] > 99)
>     goto fail;
> 
>   if (version_array[MAJOR] == 10 && version_array[MINOR] < 10)
> -- 
> 2.36.1
> 


      reply	other threads:[~2022-06-10 15:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-10 14:56 Mark Mentovai
2022-06-10 15:18 ` Iain Sandoe [this message]

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=014F8BAE-2051-4064-BB55-EC31545CF6C7@sandoe.co.uk \
    --to=iain@sandoe.co.uk \
    --cc=fxcoudert@gcc.gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=mark@mentovai.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).