2 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
3 # -------------------------------------------------------
4 # Tests whether HEADER exists and can be compiled using the include files in
5 # INCLUDES, setting the cache variable VAR accordingly.
6 ac_fn_c_check_header_compile ()
8 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
9 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
10 $as_echo_n "checking for $2... " >&6; }
11 if eval \${$3+:} false; then :
12 $as_echo_n "(cached) " >&6
14 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19 if ac_fn_c_try_compile "$LINENO"; then :
24 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
28 $as_echo "$ac_res" >&6; }
29 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
31 } # ac_fn_c_check_header_compile
32 # This file is generated from configure.ac by Autoconf. DO NOT EDIT!
33 # Local configure fragment for sysdeps/i386.
35 # We no longer support i386 since it lacks the atomic instructions
36 # required to implement NPTL threading.
37 if test "$config_machine" = i386; then
39 *** ERROR: Support for i386 is deprecated.
40 *** Please use host i786, i686, i585 or i486.
41 *** For example: /src/glibc/configure --host=i686-pc-linux-gnu ...\"" "$LINENO" 5
44 # The GNU C Library can't be built for i386. There are several reasons for
45 # this restriction. The primary reason is that i386 lacks the atomic
46 # operations required to support the current NPTL implementation. While it is
47 # possible that such atomic operations could be emulated in the kernel to date
48 # no such work has been done to enable this. Even with NPTL disabled you still
49 # have no atomic.h implementation. Given the declining use of i386 we disable
50 # support for building with `-march=i386' or `-mcpu=i386.' We don't explicitly
51 # check for i386, instead we make sure the compiler has support for inlining
52 # the builtin __sync_val_compare_and_swap. If it does then we should have no
53 # problem building for i386.
54 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compiler support of inlined builtin function __sync_val_compare_and_swap" >&5
55 $as_echo_n "checking for compiler support of inlined builtin function __sync_val_compare_and_swap... " >&6; }
56 libc_compiler_builtin_inlined=no
57 cat > conftest.c <<EOF
58 int _start (void) { int a, b, c; __sync_val_compare_and_swap (&a, b, c); return 0; }
60 if ! { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS
61 -O0 -nostdlib -nostartfiles
62 -S conftest.c -o - | fgrep "__sync_val_compare_and_swap"
64 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
67 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
68 test $ac_status = 0; }; }
70 libc_compiler_builtin_inlined=yes
73 if test $libc_compiler_builtin_inlined = yes; then
74 libc_cv_unsupported_i386=no
77 *** Building with -march=i386/-mcpu=i386 is not supported.
78 *** Please use host i786, i686, i586, or i486.
79 *** For example: /source/glibc/configure CFLAGS='-O2 -march=i686' ..." "$LINENO" 5
81 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_compiler_builtin_inlined" >&5
82 $as_echo "$libc_compiler_builtin_inlined" >&6; }
85 ac_fn_c_check_header_compile "$LINENO" "cpuid.h" "ac_cv_header_cpuid_h" "/* No default includes. */
87 if test "x$ac_cv_header_cpuid_h" = xyes; then :
90 as_fn_error $? "gcc must provide the <cpuid.h> header" "$LINENO" 5
95 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSE4 support" >&5
96 $as_echo_n "checking for SSE4 support... " >&6; }
97 if ${libc_cv_cc_sse4+:} false; then :
98 $as_echo_n "(cached) " >&6
100 if { ac_try='${CC-cc} -msse4 -xc /dev/null -S -o /dev/null'
101 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
104 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
105 test $ac_status = 0; }; }; then :
112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_sse4" >&5
113 $as_echo "$libc_cv_cc_sse4" >&6; }
114 if test $libc_cv_cc_sse4 = yes; then
115 $as_echo "#define HAVE_SSE4_SUPPORT 1" >>confdefs.h
118 config_vars="$config_vars
119 config-cflags-sse4 = $libc_cv_cc_sse4"
121 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for assembler -mtune=i686 support" >&5
122 $as_echo_n "checking for assembler -mtune=i686 support... " >&6; }
123 if ${libc_cv_as_i686+:} false; then :
124 $as_echo_n "(cached) " >&6
126 if { ac_try='${CC-cc} -Wa,-mtune=i686 -xc /dev/null -S -o /dev/null'
127 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
130 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
131 test $ac_status = 0; }; }; then :
138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_as_i686" >&5
139 $as_echo "$libc_cv_as_i686" >&6; }
140 config_vars="$config_vars
141 config-asflags-i686 = $libc_cv_as_i686"
143 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AVX support" >&5
144 $as_echo_n "checking for AVX support... " >&6; }
145 if ${libc_cv_cc_avx+:} false; then :
146 $as_echo_n "(cached) " >&6
148 if { ac_try='${CC-cc} -mavx -xc /dev/null -S -o /dev/null'
149 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
152 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
153 test $ac_status = 0; }; }; then :
160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_avx" >&5
161 $as_echo "$libc_cv_cc_avx" >&6; }
162 if test $libc_cv_cc_avx = yes; then
163 $as_echo "#define HAVE_AVX_SUPPORT 1" >>confdefs.h
166 config_vars="$config_vars
167 config-cflags-avx = $libc_cv_cc_avx"
169 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AVX encoding of SSE instructions" >&5
170 $as_echo_n "checking for AVX encoding of SSE instructions... " >&6; }
171 if ${libc_cv_cc_sse2avx+:} false; then :
172 $as_echo_n "(cached) " >&6
174 if { ac_try='${CC-cc} -msse2avx -xc /dev/null -S -o /dev/null'
175 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
178 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
179 test $ac_status = 0; }; }; then :
180 libc_cv_cc_sse2avx=yes
182 libc_cv_cc_sse2avx=no
186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_sse2avx" >&5
187 $as_echo "$libc_cv_cc_sse2avx" >&6; }
188 if test $libc_cv_cc_sse2avx = yes; then
189 $as_echo "#define HAVE_SSE2AVX_SUPPORT 1" >>confdefs.h
192 config_vars="$config_vars
193 config-cflags-sse2avx = $libc_cv_cc_sse2avx"
195 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FMA4 support" >&5
196 $as_echo_n "checking for FMA4 support... " >&6; }
197 if ${libc_cv_cc_fma4+:} false; then :
198 $as_echo_n "(cached) " >&6
200 if { ac_try='${CC-cc} -mfma4 -xc /dev/null -S -o /dev/null'
201 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
204 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
205 test $ac_status = 0; }; }; then :
212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_fma4" >&5
213 $as_echo "$libc_cv_cc_fma4" >&6; }
214 if test $libc_cv_cc_fma4 = yes; then
215 $as_echo "#define HAVE_FMA4_SUPPORT 1" >>confdefs.h
218 config_vars="$config_vars
219 have-mfma4 = $libc_cv_cc_fma4"
221 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -mno-vzeroupper support" >&5
222 $as_echo_n "checking for -mno-vzeroupper support... " >&6; }
223 if ${libc_cv_cc_novzeroupper+:} false; then :
224 $as_echo_n "(cached) " >&6
226 if { ac_try='${CC-cc} -mno-vzeroupper -xc /dev/null -S -o /dev/null'
227 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
230 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
231 test $ac_status = 0; }; }; then :
232 libc_cv_cc_novzeroupper=yes
234 libc_cv_cc_novzeroupper=no
238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_novzeroupper" >&5
239 $as_echo "$libc_cv_cc_novzeroupper" >&6; }
240 config_vars="$config_vars
241 config-cflags-novzeroupper = $libc_cv_cc_novzeroupper"
243 $as_echo "#define PI_STATIC_AND_HIDDEN 1" >>confdefs.h