From patchwork Wed Aug 16 19:20:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rainer Orth X-Patchwork-Id: 1822016 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=cebitec.uni-bielefeld.de header.i=@cebitec.uni-bielefeld.de header.a=rsa-sha256 header.s=20200306 header.b=aGlT2M6d; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RQyf33LnMz1xrk for ; Thu, 17 Aug 2023 05:20:43 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 60CCE385E021 for ; Wed, 16 Aug 2023 19:20:41 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtp.CeBiTec.Uni-Bielefeld.DE (smtp.CeBiTec.Uni-Bielefeld.DE [129.70.160.84]) by sourceware.org (Postfix) with ESMTPS id 21E683858035 for ; Wed, 16 Aug 2023 19:20:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 21E683858035 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=CeBiTec.Uni-Bielefeld.DE Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=cebitec.uni-bielefeld.de Received: from localhost (localhost [127.0.0.1]) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id 49676664DF; Wed, 16 Aug 2023 21:20:28 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d= cebitec.uni-bielefeld.de; h=content-type:content-type :mime-version:user-agent:message-id:date:date:subject:subject :from:from:received:received; s=20200306; t=1692213627; bh=t78Z+ kdLqwvbAM0OwtNhw43/LWREFP/aCSwx1rZbSng=; b=aGlT2M6dUZxVjNjmJf0/+ 8QCM6kahiG2xbjLX69uNBD9RPgceVoKkqnbuBDroCKF+4QBtCX2Z2GZw6r04ozHh do9YKMUPR2MjgwMt+Xs/83eJdpRM5zzNlcIEAbNTj9tFri30FY/BqwOgPS4EvI/N d8HdS96cCsdlXKYEbxy8ym1yEMdWnHcQySnJZeVMMsLsqBlGnmPE45t2FfvCT3+z xgLiuhiJC+17KjAHSvWbiC8/z+FwKVZDSrJD/tRWVUdRmF7iZV58HBO7DpLspeF7 KykSDMsoD1kSu6cPU2OS4q6Uy4iNd/CCZRuzmTd52rtUfTX9gPef61IL1hFej81L Q== X-Virus-Scanned: amavisd-new at cebitec.uni-bielefeld.de Received: from smtp.CeBiTec.Uni-Bielefeld.DE ([127.0.0.1]) by localhost (smtp.cebitec.uni-bielefeld.de [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id C_BcQgkibAp2; Wed, 16 Aug 2023 21:20:27 +0200 (CEST) Received: from manam.CeBiTec.Uni-Bielefeld.DE (p4fddb6a6.dip0.t-ipconnect.de [79.221.182.166]) (Authenticated sender: ro) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTPSA id A5D1E66980; Wed, 16 Aug 2023 21:20:27 +0200 (CEST) From: Rainer Orth To: gcc-patches@gcc.gnu.org Cc: Bruce Korb , Iain Sandoe Subject: [PATCH] fixincludes: Update darwin_flt_eval_method for macOS 14 Date: Wed, 16 Aug 2023 21:20:27 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1.90 (usg-unix-v) MIME-Version: 1.0 X-Spam-Status: No, score=-3792.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, GIT_PATCH_0, KAM_NUMSUBJECT, SPF_HELO_NONE, SPF_PASS, TXREP 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: , Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" On macOS 14, a guard in changed: -- MacOSX13.3.sdk/usr/include/math.h 2023-04-19 01:54:44 +++ MacOSX14.0.sdk/usr/include/math.h 2023-08-01 08:42:43 @@ -22,0 +23 @@ + @@ -43 +44 @@ -#if __FLT_EVAL_METHOD__ == 0 +#if __FLT_EVAL_METHOD__ == 0 || __FLT_EVAL_METHOD__ == -1 @@ -49 +50 @@ -#elif __FLT_EVAL_METHOD__ == 2 || __FLT_EVAL_METHOD__ == -1 +#elif __FLT_EVAL_METHOD__ == 2 Therefore the darwin_flt_eval_method fixincludes fix doesn't match any longer, leading to a large number of testsuite failures like /private/var/gcc/regression/master/14-gcc/build/gcc/include-fixed/math.h:69:5: error: #error "Unsupported value of __FLT_EVAL_METHOD__." where __FLT_EVAL_METHOD__ = 16. This patch adjusts the fix to allow for both forms. Tested with make check in fixincludes on x86_64-apple-darwin23.0.0 and verifying that has indeed been fixed as expected. Ok for trunk? Rainer # HG changeset patch # Parent e7f5115ad4125cf69230cd511f1887327f1b3d4b fixincludes: Update darwin_flt_eval_method for macOS 14 diff --git a/fixincludes/inclhack.def b/fixincludes/inclhack.def --- a/fixincludes/inclhack.def +++ b/fixincludes/inclhack.def @@ -1819,10 +1819,11 @@ fix = { hackname = darwin_flt_eval_method; mach = "*-*-darwin*"; files = math.h; - select = "^#if __FLT_EVAL_METHOD__ == 0$"; - c_fix = format; - c_fix_arg = "#if __FLT_EVAL_METHOD__ == 0 || __FLT_EVAL_METHOD__ == 16"; - test_text = "#if __FLT_EVAL_METHOD__ == 0"; + select = "^#if __FLT_EVAL_METHOD__ == 0( \\|\\| __FLT_EVAL_METHOD__ == -1)?$"; + c_fix = format; + c_fix_arg = "%0 || __FLT_EVAL_METHOD__ == 16"; + test_text = "#if __FLT_EVAL_METHOD__ == 0\n" + "#if __FLT_EVAL_METHOD__ == 0 || __FLT_EVAL_METHOD__ == -1"; }; /* diff --git a/fixincludes/tests/base/math.h b/fixincludes/tests/base/math.h --- a/fixincludes/tests/base/math.h +++ b/fixincludes/tests/base/math.h @@ -32,6 +32,7 @@ #if defined( DARWIN_FLT_EVAL_METHOD_CHECK ) #if __FLT_EVAL_METHOD__ == 0 || __FLT_EVAL_METHOD__ == 16 +#if __FLT_EVAL_METHOD__ == 0 || __FLT_EVAL_METHOD__ == -1 || __FLT_EVAL_METHOD__ == 16 #endif /* DARWIN_FLT_EVAL_METHOD_CHECK */