Skip to content

Commit

Permalink
configure.ac: Do not probe for <avxintrin.h>
Browse files Browse the repository at this point in the history
With GCC 12, this header file cannot be included on its own.
Doing so fails with #error, but also produces many warnings
related to implicit ints and implicit function declarations.
This is inconvenient for distributions who are trying to
switch to newer C versions (without implicit ints/function
declarations), and monitor builds for suspicious warnings
related to obsolete C features.
  • Loading branch information
fweimer-rh authored and lfield committed Jan 23, 2023
1 parent 5f4723d commit f5d4e1d
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -738,7 +738,7 @@ CXXFLAGS="${save_cxxflags} ${sse3_flags}"
AC_CHECK_HEADERS([intrin.h x86intrin.h pmmintrin.h xmmintrin.h emmintrin.h])
CXXFLAGS="${save_cxxflags} ${avx_flags}"
CPPFLAGS="${save_cppflags} ${avx_flags}"
AC_CHECK_HEADERS([immintrin.h avxintrin.h])
AC_CHECK_HEADERS([immintrin.h])

AC_CHECK_DECLS([_xgetbv, xgetbv, __xgetbv, cpuid, _cpuid, __cpuid],
[],[],[[
Expand All @@ -748,9 +748,6 @@ AC_CHECK_DECLS([_xgetbv, xgetbv, __xgetbv, cpuid, _cpuid, __cpuid],
#if HAVE_IMMINTRIN_H
# include <immintrin.h>
#endif
#if HAVE_AVXINTRIN_H
# include <avxintrin.h>
#endif
#if HAVE_X86INTRIN_H
# include <x86intrin.h>
#endif
Expand Down

0 comments on commit f5d4e1d

Please sign in to comment.