From 8ba735c208388159477bf0ccb06a8573a273fb02 Mon Sep 17 00:00:00 2001 From: Esme Date: Wed, 10 Mar 2021 11:40:34 -0600 Subject: [PATCH] Include arm_neon.h in mingw targeting ARM Windows. The llvm-mingw project includes cross-compilers targeting ARM: https://github.com/mstorsjo/llvm-mingw/releases Currently, compilation fails with this configuration, because neon features are used as long as __ARM_NEON is defined, but arm_neon.h was not included. --- include/SDL_cpuinfo.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/SDL_cpuinfo.h b/include/SDL_cpuinfo.h index c51f713be..d3984be34 100644 --- a/include/SDL_cpuinfo.h +++ b/include/SDL_cpuinfo.h @@ -57,6 +57,9 @@ #endif /* __clang__ */ #elif defined(__MINGW64_VERSION_MAJOR) #include +#if !defined(SDL_DISABLE_ARM_NEON_H) && defined(__ARM_NEON) +# include +#endif #else /* altivec.h redefining bool causes a number of problems, see bugs 3993 and 4392, so you need to explicitly define SDL_ENABLE_ALTIVEC_H to have it included. */ #if defined(HAVE_ALTIVEC_H) && defined(__ALTIVEC__) && !defined(__APPLE_ALTIVEC__) && defined(SDL_ENABLE_ALTIVEC_H)