93dc2d
commit 550116486692efc394d03befee19f7e9c17d5044
93dc2d
Author: Florian Weimer <fweimer@redhat.com>
93dc2d
Date:   Fri Jan 14 20:16:05 2022 +0100
93dc2d
93dc2d
    powerpc64le: Use <gcc-macros.h> in early HWCAP check
93dc2d
    
93dc2d
    This is required so that the checks still work if $(early-cflags)
93dc2d
    selects a different ISA level.
93dc2d
    
93dc2d
    Reviewed-by: Carlos O'Donell <carlos@redhat.com>
93dc2d
    Tested-by: Carlos O'Donell <carlos@redhat.com>
93dc2d
93dc2d
diff --git a/sysdeps/powerpc/powerpc64/le/dl-hwcap-check.h b/sysdeps/powerpc/powerpc64/le/dl-hwcap-check.h
93dc2d
index 0437ae4d522fb36d..899c74f880e6f5f0 100644
93dc2d
--- a/sysdeps/powerpc/powerpc64/le/dl-hwcap-check.h
93dc2d
+++ b/sysdeps/powerpc/powerpc64/le/dl-hwcap-check.h
93dc2d
@@ -19,17 +19,18 @@
93dc2d
 #ifndef _DL_HWCAP_CHECK_H
93dc2d
 #define _DL_HWCAP_CHECK_H
93dc2d
 
93dc2d
+#include <gcc-macros.h>
93dc2d
 #include <ldsodefs.h>
93dc2d
 
93dc2d
 static inline void
93dc2d
 dl_hwcap_check (void)
93dc2d
 {
93dc2d
-#ifdef _ARCH_PWR9
93dc2d
+#ifdef GCCMACRO_ARCH_PWR9
93dc2d
   if ((GLRO (dl_hwcap2) & PPC_FEATURE2_ARCH_3_00) == 0)
93dc2d
     _dl_fatal_printf ("\
93dc2d
 Fatal glibc error: CPU lacks ISA 3.00 support (POWER9 or later required)\n");
93dc2d
 #endif
93dc2d
-#ifdef __FLOAT128_HARDWARE__
93dc2d
+#ifdef GCCMACRO__FLOAT128_HARDWARE__
93dc2d
   if ((GLRO (dl_hwcap2) & PPC_FEATURE2_HAS_IEEE128) == 0)
93dc2d
     _dl_fatal_printf ("\
93dc2d
 Fatal glibc error: CPU lacks float128 support (POWER 9 or later required)\n");
93dc2d
@@ -37,12 +38,12 @@ Fatal glibc error: CPU lacks float128 support (POWER 9 or later required)\n");
93dc2d
    /* This check is not actually reached when building for POWER10 and
93dc2d
       running on POWER9 because there are faulting PCREL instructions
93dc2d
       before this point.  */
93dc2d
-#if defined _ARCH_PWR10 || defined __PCREL__
93dc2d
+#if defined GCCMACRO_ARCH_PWR10 || defined GCCMACRO__PCREL__
93dc2d
   if ((GLRO (dl_hwcap2) & PPC_FEATURE2_ARCH_3_1) == 0)
93dc2d
     _dl_fatal_printf ("\
93dc2d
 Fatal glibc error: CPU lacks ISA 3.10 support (POWER10 or later required)\n");
93dc2d
 #endif
93dc2d
-#ifdef __MMA__
93dc2d
+#ifdef GCCMACRO__MMA__
93dc2d
   if ((GLRO (dl_hwcap2) & PPC_FEATURE2_MMA) == 0)
93dc2d
     _dl_fatal_printf ("\
93dc2d
 Fatal glibc error: CPU lacks MMA support (POWER10 or later required)\n");