1 GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
2 # Local configure fragment for sysdeps/i386.
4 AC_HEADER_CHECK([cpuid.h], ,
5 [AC_MSG_ERROR([gcc must provide the <cpuid.h> header])])
7 AC_CACHE_CHECK(if -g produces usable source locations for assembler-with-cpp,
8 libc_cv_cpp_asm_debuginfo, [dnl
15 ${libc_cv_asm_global_directive} foo
17 /* Unfortunately this test only works for a real instruction,
18 not for any of the machine-independent pseudo-ops.
19 So we just have to assume everybody has a "nop". */
26 if AC_TRY_COMMAND([${CC-cc} $CPPFLAGS $ASFLAGS -g -c conftest.S 1>&AS_MESSAGE_LOG_FD]) && {
27 ac_pattern='conftest\.S'
28 AC_TRY_COMMAND([readelf --debug-dump=line conftest.o |
29 grep $ac_pattern 1>&AS_MESSAGE_LOG_FD])
31 libc_cv_cpp_asm_debuginfo=yes
33 libc_cv_cpp_asm_debuginfo=no
35 rm -f conftest*])AC_SUBST(libc_cv_cpp_asm_debuginfo)
36 if test $libc_cv_cpp_asm_debuginfo = yes; then
37 AC_DEFINE(HAVE_CPP_ASM_DEBUGINFO)
40 dnl Check if -msse4 works.
41 AC_CACHE_CHECK(for SSE4 support, libc_cv_cc_sse4, [dnl
42 if AC_TRY_COMMAND([${CC-cc} -msse4 -xc /dev/null -S -o /dev/null]); then
47 if test $libc_cv_cc_sse4 = yes; then
48 AC_DEFINE(HAVE_SSE4_SUPPORT)
51 dnl Check if -Wa,-mtune=i686 works.
52 AC_CACHE_CHECK(for assembler -mtune=i686 support, libc_cv_as_i686, [dnl
53 if AC_TRY_COMMAND([${CC-cc} -Wa,-mtune=i686 -xc /dev/null -S -o /dev/null]); then
59 dnl Check if -mavx works.
60 AC_CACHE_CHECK(for AVX support, libc_cv_cc_avx, [dnl
61 if AC_TRY_COMMAND([${CC-cc} -mavx -xc /dev/null -S -o /dev/null]); then
66 if test $libc_cv_cc_avx = yes; then
67 AC_DEFINE(HAVE_AVX_SUPPORT)