this should not be glibc guarded, as this auxv fallback always works on linux this makes libcrypto use the auxv for cpu feature detection instead of falling back on the sigill trapping method on these arches -- --- a/crypto/armcap.c +++ b/crypto/armcap.c @@ -66,11 +66,9 @@ uint32_t OPENSSL_rdtsc(void) void OPENSSL_cpuid_setup(void) __attribute__((constructor)); #endif -#if defined(__GLIBC__) && defined(__GLIBC_PREREQ) -#if __GLIBC_PREREQ(2, 16) +#if 1 #include #define OSSL_IMPLEMENT_GETAUXVAL -#endif #elif defined(__ANDROID_API__) /* see https://developer.android.google.cn/ndk/guides/cpu-features */ #if __ANDROID_API__ >= 18 --- a/crypto/ppccap.c +++ b/crypto/ppccap.c @@ -86,18 +86,8 @@ size_t OPENSSL_instrument_bus2(unsigned int *out, size_t cnt, size_t max) return 0; } -#if defined(__GLIBC__) && defined(__GLIBC_PREREQ) -#if __GLIBC_PREREQ(2, 16) #include #define OSSL_IMPLEMENT_GETAUXVAL -#elif defined(__ANDROID_API__) -/* see https://developer.android.google.cn/ndk/guides/cpu-features */ -#if __ANDROID_API__ >= 18 -#include -#define OSSL_IMPLEMENT_GETAUXVAL -#endif -#endif -#endif #if defined(__FreeBSD__) || defined(__OpenBSD__) #include --- a/crypto/s390xcap.c +++ b/crypto/s390xcap.c @@ -25,10 +25,10 @@ #include #endif -#if defined(__GLIBC__) && defined(__GLIBC_PREREQ) -#if __GLIBC_PREREQ(2, 16) +#if 1 +#if 1 #include -#if defined(HWCAP_S390_STFLE) && defined(HWCAP_S390_VX) +#if defined(HWCAP_S390_STFLE) && defined(HWCAP_S390_VXRS) #define OSSL_IMPLEMENT_GETAUXVAL #endif #endif @@ -133,7 +133,7 @@ void OPENSSL_cpuid_setup(void) OPENSSL_s390x_facilities(); /* protection against disabled vector facility */ - if (!(hwcap & HWCAP_S390_VX)) { + if (!(hwcap & HWCAP_S390_VXRS)) { OPENSSL_s390xcap_P.stfle[2] &= ~(S390X_CAPBIT(S390X_VX) | S390X_CAPBIT(S390X_VXD) | S390X_CAPBIT(S390X_VXE));