]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
AArch64: Fix mv-cmpu-features.C test that fails on older glibc's [PR 122405]
authorAlfie Richards <alfie.richards@arm.com>
Mon, 27 Oct 2025 17:49:07 +0000 (17:49 +0000)
committerAlfie Richards <alfie.richards@arm.com>
Mon, 3 Nov 2025 09:58:48 +0000 (09:58 +0000)
Adds a definition of HWCAP_ATOMICS and HWCAP2_RNG in the test file for the
case that the glibc is old enough to not include them.

PR target/122405

gcc/testsuite/ChangeLog:

* g++.target/aarch64/mv-cpu-features.C: Add HWCAP_ATOMICS and
HWCAP2_RNG defines.

gcc/testsuite/g++.target/aarch64/mv-cpu-features.C

index ad6accd4c630029d2c7077740c44ba8a2b535cfc..56e29163524d94948d79089a19eddd51e1e1b525 100644 (file)
@@ -41,6 +41,14 @@ int impl ()
 #define _IFUNC_ARG_HWCAP (1ULL << 62)
 #endif
 
+#ifndef HWCAP_ATOMICS
+#define HWCAP_ATOMICS (1 << 8)
+#endif
+
+#ifndef HWCAP2_RNG
+#define HWCAP2_RNG (1 << 16)
+#endif
+
 extern "C" void
 __init_cpu_features_resolver (unsigned long hwcap, const ifunc_arg_t *arg);