glibc defines HWCAP_S390_VX and, since v2.33, its alias
HWCAP_S390_VXRS; musl has only HWCAP_S390_VXRS.
Use the common HWCAP_S390_VXRS, define it as HWCAP_S390_VX if
necessary.
# include <sys/auxv.h>
#endif
+#ifndef HWCAP_S390_VXRS
+#define HWCAP_S390_VXRS HWCAP_S390_VX
+#endif
+
void Z_INTERNAL s390_check_features(struct s390_cpu_features *features) {
- features->has_vx = getauxval(AT_HWCAP) & HWCAP_S390_VX;
+ features->has_vx = getauxval(AT_HWCAP) & HWCAP_S390_VXRS;
}
macro(check_s390_intrinsics)
check_c_source_compiles(
"#include <sys/auxv.h>
+ #ifndef HWCAP_S390_VXRS
+ #define HWCAP_S390_VXRS HWCAP_S390_VX
+ #endif
int main() {
- return (getauxval(AT_HWCAP) & HWCAP_S390_VX);
+ return (getauxval(AT_HWCAP) & HWCAP_S390_VXRS);
}"
HAVE_S390_INTRIN
)