From cae7bd9b65a3dc16e4d575a6f4cb9443c7dac7dd Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Fri, 6 Aug 2021 12:01:24 -0700
Subject: [PATCH] Don't use AVX with clang if the compiler isn't building with
AVX instructions
Fixes https://github.com/libsdl-org/SDL/issues/4533
---
src/audio/SDL_audiocvt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/audio/SDL_audiocvt.c b/src/audio/SDL_audiocvt.c
index 19a08354b..aec67667d 100644
--- a/src/audio/SDL_audiocvt.c
+++ b/src/audio/SDL_audiocvt.c
@@ -47,7 +47,7 @@
#define HAVE_AVX_INTRINSICS 1
#endif
#if defined __clang__
-# if (__clang_major__ < 5)
+# if (__clang_major__ < 5) || !defined(__AVX__)
# undef HAVE_AVX_INTRINSICS
# endif
#elif defined __GNUC__