clang doesn't support the GCC pragma to enable AVX2, but instead requires the command line option -mavx2. Since GCC also supports that, remove the pragma lines and add the -mavx2 option when building the test.
Signed-off-by: Rebecca Cran <rebe...@bsdio.com> --- configure | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/configure b/configure index 714e7fb6a1..30d6c02ab4 100755 --- a/configure +++ b/configure @@ -5392,8 +5392,6 @@ fi if test "$cpuid_h" = "yes" && test "$avx2_opt" != "no"; then cat > $TMPC << EOF -#pragma GCC push_options -#pragma GCC target("avx2") #include <cpuid.h> #include <immintrin.h> static int bar(void *a) { @@ -5402,7 +5400,7 @@ static int bar(void *a) { } int main(int argc, char *argv[]) { return bar(argv[0]); } EOF - if compile_object "" ; then + if compile_object "-mavx2" ; then avx2_opt="yes" else avx2_opt="no" -- 2.22.0