diff mbox series

[pushed] libgcc, X86: Adjust guard for Mach-O code.

Message ID DE5DE5D0-95A0-4CF9-8A93-59150B8715FE@sandoe.co.uk
State New
Headers show
Series [pushed] libgcc, X86: Adjust guard for Mach-O code. | expand

Commit Message

Iain Sandoe Sept. 22, 2021, 7:03 a.m. UTC
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 <iain@sandoe.co.uk>

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 mbox series

Patch

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.