public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Florian Weimer <fweimer@redhat.com>
To: libc-alpha@sourceware.org
Subject: [PATCH v2 4/6] powerpc64le: Use <gcc-macros.h> in early HWCAP check
Date: Fri, 14 Jan 2022 17:53:08 +0100	[thread overview]
Message-ID: <7540e03f5d1e4f301d53f755307d12f67eb17b0b.1642179009.git.fweimer@redhat.com> (raw)
In-Reply-To: <cover.1642179009.git.fweimer@redhat.com>

This is required so that the checks still work if $(early-cflags)
selects a different ISA level.
---
 sysdeps/powerpc/powerpc64/le/dl-hwcap-check.h | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/sysdeps/powerpc/powerpc64/le/dl-hwcap-check.h b/sysdeps/powerpc/powerpc64/le/dl-hwcap-check.h
index 713a7f0313..b43c182683 100644
--- a/sysdeps/powerpc/powerpc64/le/dl-hwcap-check.h
+++ b/sysdeps/powerpc/powerpc64/le/dl-hwcap-check.h
@@ -19,17 +19,18 @@
 #ifndef _DL_HWCAP_CHECK_H
 #define _DL_HWCAP_CHECK_H
 
+#include <gcc-macros.h>
 #include <ldsodefs.h>
 
 static inline void
 dl_hwcap_check (void)
 {
-#ifdef _ARCH_PWR9
+#ifdef GCCMACRO_ARCH_PWR9
   if ((GLRO (dl_hwcap2) & PPC_FEATURE2_ARCH_3_00) == 0)
     _dl_fatal_printf ("\
 Fatal glibc error: CPU lacks ISA 3.00 support (POWER9 or later required)\n");
 #endif
-#ifdef __FLOAT128_HARDWARE__
+#ifdef GCCMACRO__FLOAT128_HARDWARE__
   if ((GLRO (dl_hwcap2) & PPC_FEATURE2_HAS_IEEE128) == 0)
     _dl_fatal_printf ("\
 Fatal glibc error: CPU lacks float128 support (POWER 9 or later required)\n");
@@ -37,12 +38,12 @@ Fatal glibc error: CPU lacks float128 support (POWER 9 or later required)\n");
    /* This check is not actually reached when building for POWER10 and
       running on POWER9 because there are faulting PCREL instructions
       before this point.  */
-#if defined _ARCH_PWR10 || defined __PCREL__
+#if defined GCCMACRO_ARCH_PWR10 || defined GCCMACRO__PCREL__
   if ((GLRO (dl_hwcap2) & PPC_FEATURE2_ARCH_3_1) == 0)
     _dl_fatal_printf ("\
 Fatal glibc error: CPU lacks ISA 3.10 support (POWER10 or later required)\n");
 #endif
-#ifdef __MMA__
+#ifdef GCCMACRO__MMA__
   if ((GLRO (dl_hwcap2) & PPC_FEATURE2_MMA) == 0)
     _dl_fatal_printf ("\
 Fatal glibc error: CPU lacks MMA support (POWER10 or later required)\n");
-- 
2.34.1



  parent reply	other threads:[~2022-01-14 16:53 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-14 16:51 [PATCH v2 0/6] Reliable CPU compatibility diagnostics in ld.so Florian Weimer
2022-01-14 16:52 ` [PATCH v2 1/6] elf/Makefile: Reflow and sort most variable assignments Florian Weimer
2022-01-14 18:39   ` H.J. Lu
2022-01-14 16:52 ` [PATCH v2 2/6] elf: Split dl-printf.c from dl-misc.c Florian Weimer
2022-01-14 18:40   ` H.J. Lu
2022-01-14 16:52 ` [PATCH v2 3/6] Add --with-rtld-early-cflags configure option Florian Weimer
2022-01-14 18:38   ` H.J. Lu
2022-01-14 16:53 ` Florian Weimer [this message]
2022-01-14 18:51   ` [PATCH v2 4/6] powerpc64le: Use <gcc-macros.h> in early HWCAP check Carlos O'Donell
2022-01-14 16:53 ` [PATCH v2 5/6] x86: Add x86-64-vN check to early startup Florian Weimer
2022-01-14 18:40   ` H.J. Lu
2022-01-14 16:53 ` [PATCH 6/6] s390x: Use <gcc-macros.h> in early HWCAP check Florian Weimer
2022-01-14 18:52   ` Carlos O'Donell
2022-01-14 17:42 ` [PATCH v2 0/6] Reliable CPU compatibility diagnostics in ld.so Joseph Myers
2022-01-14 17:59   ` Florian Weimer
2022-01-14 18:51     ` Carlos O'Donell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7540e03f5d1e4f301d53f755307d12f67eb17b0b.1642179009.git.fweimer@redhat.com \
    --to=fweimer@redhat.com \
    --cc=libc-alpha@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).