From: Ilya Leoshkevich Date: Mon, 6 Mar 2023 22:25:04 +0000 (+0100) Subject: IBM zSystems: Use HWCAP_S390_VXRS X-Git-Tag: 2.1.0-beta1~24 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b8c2114d51ca120f76e0cdad706c8f0c15d1f829;p=thirdparty%2Fzlib-ng.git IBM zSystems: Use HWCAP_S390_VXRS 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. --- diff --git a/arch/s390/s390_features.c b/arch/s390/s390_features.c index 711b7dd46..82901060e 100644 --- a/arch/s390/s390_features.c +++ b/arch/s390/s390_features.c @@ -5,6 +5,10 @@ # include #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; } diff --git a/cmake/detect-intrinsics.cmake b/cmake/detect-intrinsics.cmake index 3e932d83b..6ce0f3e3c 100644 --- a/cmake/detect-intrinsics.cmake +++ b/cmake/detect-intrinsics.cmake @@ -344,8 +344,11 @@ endmacro() macro(check_s390_intrinsics) check_c_source_compiles( "#include + #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 )