From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2178) id BE9F5384B112; Thu, 25 Apr 2024 15:00:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BE9F5384B112 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1714057229; bh=oAohJr3i8I7KGgvMijHm24NwqhjV0Or4kNhGOt9UGlA=; h=From:To:Subject:Date:From; b=Ux3ouq2Nc+eYR9m+qQgm8XYDR9+u13WgVBQRDwWSeK8owutUG4Sl2PvLEElZfctZa fYXM0KFZuWDARReXcMrgQUNy5c34S0tjLLS21jfhkpEfEw14X/NSfTwQ62EGfqL0Ez ZVKFsvag41/OZ7dBauDY6sm6MapvJjYvBeJj8s3s= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Florian Weimer To: glibc-cvs@sourceware.org Subject: [glibc/tmp] x86: In ld.so, diagnose missing APX support in APX-only builds X-Act-Checkin: glibc X-Git-Author: Florian Weimer X-Git-Refname: refs/heads/tmp X-Git-Oldrev: c04a21e050d64a1193a6daab872bca2528bda44b X-Git-Newrev: 2a65d2032e92c5ee1a84b864c51dea505e6141e6 Message-Id: <20240425150029.BE9F5384B112@sourceware.org> Date: Thu, 25 Apr 2024 15:00:29 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=2a65d2032e92c5ee1a84b864c51dea505e6141e6 commit 2a65d2032e92c5ee1a84b864c51dea505e6141e6 Author: Florian Weimer Date: Thu Apr 25 17:00:05 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 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) */ } }