public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Florian Weimer <fw@sourceware.org>
To: glibc-cvs@sourceware.org
Subject: [glibc] x86: In ld.so, diagnose missing APX support in APX-only builds
Date: Thu, 25 Apr 2024 15:20:46 +0000 (GMT)	[thread overview]
Message-ID: <20240425152046.B65873858C50@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=b62928f9070c6f3c5cc43a4cb89b4bfb950d7406

commit b62928f9070c6f3c5cc43a4cb89b4bfb950d7406
Author: Florian Weimer <fweimer@redhat.com>
Date:   Thu Apr 25 17:20:28 2024 +0200

    x86: In ld.so, diagnose missing APX support in APX-only builds
    
    At this point, this is mainly a tool for testing the early ld.so
    CPU compatibility diagnostics: GCC uses the new instructions in most
    functions, so it's easy to spot if some of the early code is not
    built correctly.
    
    Reviewed-by: H.J. Lu <hjl.tools@gmail.com>

Diff:
---
 sysdeps/x86/dl-get-cpu-features.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/sysdeps/x86/dl-get-cpu-features.c b/sysdeps/x86/dl-get-cpu-features.c
index 4d6c5c59a6..579d02d638 100644
--- a/sysdeps/x86/dl-get-cpu-features.c
+++ b/sysdeps/x86/dl-get-cpu-features.c
@@ -64,6 +64,11 @@ Fatal glibc error: CPU does not support x86-64-v%d\n", 4);
 #    endif /* ISA level 4 */
 #   endif /* ISA level 3 */
 #  endif /* ISA level 2 */
+# ifdef GCCMACRO__APX_F__
+      if (!CPU_FEATURE_USABLE_P (cpu_features, APX_F))
+	_dl_fatal_printf ("\
+Fatal glibc error: CPU does not support APX\n");
+# endif
 # endif /* IS_IN (rtld) */
     }
 }

                 reply	other threads:[~2024-04-25 15:20 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20240425152046.B65873858C50@sourceware.org \
    --to=fw@sourceware.org \
    --cc=glibc-cvs@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).