Skip to content
  • Martin Storsjö's avatar
    arm: Improve use of getauxval in quirky environments · d4fcb70d
    Martin Storsjö authored
    Manually define the necessary HWCAP if sys/auxv.h didn't define
    it. (It isn't defined in the Android NDK, one has to include
    asm/hwcap.h to get definitions of them. Additionally, the aarch64
    cross libc headers in Ubuntu 16.04 lacked HWCAP definitions from
    sys/auxv.h, also present in asm/hwcap.h. Ubuntu 16.04's armhf
    cross libc headers did however define HWCAP values in sys/auxv.h.)
    
    Don't use any detection at all for NEON on aarch64, since it is a
    mandatory feature there. On WSL on Windows 10 1803 arm64,
    getauxval(AT_HWCAP) returns 0.
    d4fcb70d