public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc] x86: In ld.so, diagnose missing APX support in APX-only builds
@ 2024-04-25 15:20 Florian Weimer
  0 siblings, 0 replies; only message in thread
From: Florian Weimer @ 2024-04-25 15:20 UTC (permalink / raw)
  To: glibc-cvs

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) */
     }
 }

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-04-25 15:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-25 15:20 [glibc] x86: In ld.so, diagnose missing APX support in APX-only builds Florian Weimer

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).