From patchwork Wed Sep 22 07:03:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Iain Sandoe X-Patchwork-Id: 1531074 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4HDq6814sDz9s82 for ; Wed, 22 Sep 2021 17:04:15 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 0C987385802E for ; Wed, 22 Sep 2021 07:04:12 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtp001-out.apm-internet.net (smtp001-out.apm-internet.net [85.119.248.222]) by sourceware.org (Postfix) with ESMTPS id 11A553858439 for ; Wed, 22 Sep 2021 07:03:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 11A553858439 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=sandoe.co.uk Authentication-Results: sourceware.org; spf=none smtp.mailfrom=sandoe.co.uk Received: (qmail 78565 invoked from network); 22 Sep 2021 07:03:58 -0000 X-APM-Out-ID: 16322942387856 X-APM-Authkey: 257869/1(257869/1) 1 Received: from unknown (HELO ?192.168.1.214?) (81.138.1.83) by smtp001.apm-internet.net with SMTP; 22 Sep 2021 07:03:58 -0000 From: Iain Sandoe Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.21\)) Subject: [pushed] libgcc, X86: Adjust guard for Mach-O code. Message-Id: Date: Wed, 22 Sep 2021 08:03:57 +0100 To: GCC Patches X-Mailer: Apple Mail (2.3445.104.21) X-Spam-Status: No, score=-15.3 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_COUK, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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" Hi, Existing code in the sfp-machine header has been using __MACH__ as a guard for Mach-O, where currently symbols aliases are not supported. __MACH__ is not a sufficient guard for this, since the define is also emitted for HURD, at least. Fixed by amending the guard to use __APPLE__ instead. bootstrapped on x86_64-darwin18, pushed to master, thanks Iain Signed-off-by: Iain Sandoe libgcc/ChangeLog: * config/i386/sfp-machine.h: Guard Mach-O-specific code using __APPLE__. --- libgcc/config/i386/sfp-machine.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- diff --git a/libgcc/config/i386/sfp-machine.h b/libgcc/config/i386/sfp-machine.h index 172ebc70c8d..c451ae71923 100644 --- a/libgcc/config/i386/sfp-machine.h +++ b/libgcc/config/i386/sfp-machine.h @@ -74,7 +74,7 @@ void __sfp_handle_exceptions (int); #define __BYTE_ORDER __LITTLE_ENDIAN /* Define ALIASNAME as a strong alias for NAME. */ -#if defined __MACH__ +#if defined __APPLE__ /* Mach-O doesn't support aliasing, so we build a secondary function for the alias - we need to do a bit of a dance to find out what the type of the arguments is and then apply that to the secondary function.