openssl/openssl

support OSSL_IMPLEMENT_GETAUXVAL for arm/ppc/s390x on musl libc on linux

Open

#24,786 创建于 2024年7月3日

在 GitHub 查看
 (2 评论) (0 反应) (0 负责人)C (11,262 fork)batch import
help wantedtriaged: feature

仓库指标

Star
 (30,157 star)
PR 合并指标
 (30 天内没有已合并 PR)

描述

currently, e.g. crypto/ppccap.c contains

#if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
# if __GLIBC_PREREQ(2, 16)
#  include <sys/auxv.h>
#  define OSSL_IMPLEMENT_GETAUXVAL
# elif defined(__ANDROID_API__)
/* see https://developer.android.google.cn/ndk/guides/cpu-features */
#  if __ANDROID_API__ >= 18
#   include <sys/auxv.h>
#   define OSSL_IMPLEMENT_GETAUXVAL
#  endif
# endif
#endif

however, this isn't glibc specific. <sys/auxv.h> works on linux in general, and does work on musl. simply changing those to #if 1 allows the code to work and use the auxv at runtime instead of the sigill-trap based detection

贡献者指南