From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qt1-x830.google.com (mail-qt1-x830.google.com [IPv6:2607:f8b0:4864:20::830]) by sourceware.org (Postfix) with ESMTPS id 319AF392AC02 for ; Fri, 10 Jun 2022 14:56:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 319AF392AC02 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=mentovai.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentovai.com Received: by mail-qt1-x830.google.com with SMTP id i25so1343286qtq.0 for ; Fri, 10 Jun 2022 07:56:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mentovai.com; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Ln9y0xPlmepIzN+e7OPoP+llu2RwwHhx2eGyY6OVCto=; b=WoPmd2PuEcMXXpvi3aQ74xBgOFUMFbeyRSYlyZOePGY2FGrIxhS6Eu/N6AnhGdfUed L/Rld51FcTKiZz9p658dPlKkXSr4PLTvCXrK87JkbUTvK78pGvZyVbOTKbwmSpmoBWrh JbJmWpstSzF1ZOb1KGCvHyoxd3X4hYse8W4Vg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Ln9y0xPlmepIzN+e7OPoP+llu2RwwHhx2eGyY6OVCto=; b=mmVv0KFM+tAOTpVo47QqC0CoZn8NwDFmY46Rai7d9d2EW4HNZk8t9Ykf/jg6WuycHJ atXWjbONbuBbLVEhSjT0fqIzGfH8GTlnWzvFqz+iVWakOv2KN2hrVhCnw4m6bbdeuyx4 4UO63lutjfFZJrmrICUKEDLL5DsluSUBmoINDxKXmRnPnspAkwowm+C16tEuDwYZVUoX GnF5YroeBIBkJznnAAau86AH7K4wELfZGU/1c4wikft4wCqRpdybLj2Ef7GxYJf8q0fd OQIw4V+V6KIYUzE3AXTbG1lflxSnAf9Tp2TpBDlMBKPOyNfWLtrRo+0nkwifVH0IMnps R5dQ== X-Gm-Message-State: AOAM531exl9msNw4pUGbatA7v/oR3s4dwRfHnst+mTJA6rVH7FdtNclo RusQ0CGZJG8p9ubGLCFy4JBiBeSNTqSYmr1J X-Google-Smtp-Source: ABdhPJwr0Q1NgJMNtZZfPflJhtek0PXzDbmDv/BB0dtIB/SYA6vA6CscHAFpRzuDdcNSFQwRlh5atQ== X-Received: by 2002:ac8:6b9a:0:b0:305:842:6681 with SMTP id z26-20020ac86b9a000000b0030508426681mr10288010qts.595.1654873017749; Fri, 10 Jun 2022 07:56:57 -0700 (PDT) Received: from redacted (pool-100-33-93-50.nycmny.fios.verizon.net. [100.33.93.50]) by smtp.gmail.com with ESMTPSA id n15-20020a05620a294f00b006a5d8d96681sm3036252qkp.100.2022.06.10.07.56.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Jun 2022 07:56:54 -0700 (PDT) From: Mark Mentovai To: gcc-patches@gcc.gnu.org Cc: Iain Sandoe , =?UTF-8?q?Fran=C3=A7ois-Xavier=20Coudert?= Subject: [PATCH] Darwin: Future-proof -mmacosx-version-min Date: Fri, 10 Jun 2022 10:56:42 -0400 Message-Id: <20220610145642.29159-1-mark@mentovai.com> X-Mailer: git-send-email 2.36.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-14.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jun 2022 14:57:01 -0000 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. gcc/ChangeLog: * config/darwin-c.cc: Make -mmacosx-version-min more future-proof. Signed-off-by: Mark Mentovai --- 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