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