blob: ab66c081609c9b70699b7048fce52153a2efda67 [file] [log] [blame]
lh9ed821d2023-04-07 01:36:19 -07001
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.
6ac_fn_c_check_header_compile ()
7{
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; }
11if eval \${$3+:} false; then :
12 $as_echo_n "(cached) " >&6
13else
14 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15/* end confdefs.h. */
16$4
17#include <$2>
18_ACEOF
19if ac_fn_c_try_compile "$LINENO"; then :
20 eval "$3=yes"
21else
22 eval "$3=no"
23fi
24rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25fi
26eval ac_res=\$$3
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
30
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.
34
35# We no longer support i386 since it lacks the atomic instructions
36# required to implement NPTL threading.
37if test "$config_machine" = i386; then
38 as_fn_error $? "
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
42fi
43
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; }
56libc_compiler_builtin_inlined=no
57cat > conftest.c <<EOF
58int _start (void) { int a, b, c; __sync_val_compare_and_swap (&a, b, c); return 0; }
59EOF
60if ! { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS
61 -O0 -nostdlib -nostartfiles
62 -S conftest.c -o - | fgrep "__sync_val_compare_and_swap"
63 1>&5'
64 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
65 (eval $ac_try) 2>&5
66 ac_status=$?
67 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
68 test $ac_status = 0; }; }
69then
70 libc_compiler_builtin_inlined=yes
71fi
72rm -f conftest*
73if test $libc_compiler_builtin_inlined = yes; then
74 libc_cv_unsupported_i386=no
75else
76 as_fn_error $? "
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
80fi
81{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_compiler_builtin_inlined" >&5
82$as_echo "$libc_compiler_builtin_inlined" >&6; }
83
84
85ac_fn_c_check_header_compile "$LINENO" "cpuid.h" "ac_cv_header_cpuid_h" "/* No default includes. */
86"
87if test "x$ac_cv_header_cpuid_h" = xyes; then :
88
89else
90 as_fn_error $? "gcc must provide the <cpuid.h> header" "$LINENO" 5
91fi
92
93
94
95{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSE4 support" >&5
96$as_echo_n "checking for SSE4 support... " >&6; }
97if ${libc_cv_cc_sse4+:} false; then :
98 $as_echo_n "(cached) " >&6
99else
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
102 (eval $ac_try) 2>&5
103 ac_status=$?
104 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
105 test $ac_status = 0; }; }; then :
106 libc_cv_cc_sse4=yes
107else
108 libc_cv_cc_sse4=no
109fi
110
111fi
112{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_sse4" >&5
113$as_echo "$libc_cv_cc_sse4" >&6; }
114if test $libc_cv_cc_sse4 = yes; then
115 $as_echo "#define HAVE_SSE4_SUPPORT 1" >>confdefs.h
116
117fi
118config_vars="$config_vars
119config-cflags-sse4 = $libc_cv_cc_sse4"
120
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; }
123if ${libc_cv_as_i686+:} false; then :
124 $as_echo_n "(cached) " >&6
125else
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
128 (eval $ac_try) 2>&5
129 ac_status=$?
130 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
131 test $ac_status = 0; }; }; then :
132 libc_cv_as_i686=yes
133else
134 libc_cv_as_i686=no
135fi
136
137fi
138{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_as_i686" >&5
139$as_echo "$libc_cv_as_i686" >&6; }
140config_vars="$config_vars
141config-asflags-i686 = $libc_cv_as_i686"
142
143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for AVX support" >&5
144$as_echo_n "checking for AVX support... " >&6; }
145if ${libc_cv_cc_avx+:} false; then :
146 $as_echo_n "(cached) " >&6
147else
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
150 (eval $ac_try) 2>&5
151 ac_status=$?
152 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
153 test $ac_status = 0; }; }; then :
154 libc_cv_cc_avx=yes
155else
156 libc_cv_cc_avx=no
157fi
158
159fi
160{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_avx" >&5
161$as_echo "$libc_cv_cc_avx" >&6; }
162if test $libc_cv_cc_avx = yes; then
163 $as_echo "#define HAVE_AVX_SUPPORT 1" >>confdefs.h
164
165fi
166config_vars="$config_vars
167config-cflags-avx = $libc_cv_cc_avx"
168
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; }
171if ${libc_cv_cc_sse2avx+:} false; then :
172 $as_echo_n "(cached) " >&6
173else
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
176 (eval $ac_try) 2>&5
177 ac_status=$?
178 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
179 test $ac_status = 0; }; }; then :
180 libc_cv_cc_sse2avx=yes
181else
182 libc_cv_cc_sse2avx=no
183fi
184
185fi
186{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_sse2avx" >&5
187$as_echo "$libc_cv_cc_sse2avx" >&6; }
188if test $libc_cv_cc_sse2avx = yes; then
189 $as_echo "#define HAVE_SSE2AVX_SUPPORT 1" >>confdefs.h
190
191fi
192config_vars="$config_vars
193config-cflags-sse2avx = $libc_cv_cc_sse2avx"
194
195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FMA4 support" >&5
196$as_echo_n "checking for FMA4 support... " >&6; }
197if ${libc_cv_cc_fma4+:} false; then :
198 $as_echo_n "(cached) " >&6
199else
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
202 (eval $ac_try) 2>&5
203 ac_status=$?
204 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
205 test $ac_status = 0; }; }; then :
206 libc_cv_cc_fma4=yes
207else
208 libc_cv_cc_fma4=no
209fi
210
211fi
212{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_fma4" >&5
213$as_echo "$libc_cv_cc_fma4" >&6; }
214if test $libc_cv_cc_fma4 = yes; then
215 $as_echo "#define HAVE_FMA4_SUPPORT 1" >>confdefs.h
216
217fi
218config_vars="$config_vars
219have-mfma4 = $libc_cv_cc_fma4"
220
221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -mno-vzeroupper support" >&5
222$as_echo_n "checking for -mno-vzeroupper support... " >&6; }
223if ${libc_cv_cc_novzeroupper+:} false; then :
224 $as_echo_n "(cached) " >&6
225else
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
228 (eval $ac_try) 2>&5
229 ac_status=$?
230 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
231 test $ac_status = 0; }; }; then :
232 libc_cv_cc_novzeroupper=yes
233else
234 libc_cv_cc_novzeroupper=no
235fi
236
237fi
238{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_novzeroupper" >&5
239$as_echo "$libc_cv_cc_novzeroupper" >&6; }
240config_vars="$config_vars
241config-cflags-novzeroupper = $libc_cv_cc_novzeroupper"
242
243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Intel MPX support" >&5
244$as_echo_n "checking for Intel MPX support... " >&6; }
245if ${libc_cv_asm_mpx+:} false; then :
246 $as_echo_n "(cached) " >&6
247else
248 cat > conftest.s <<\EOF
249 bndmov %bnd0,(%esp)
250EOF
251if { ac_try='${CC-cc} -c $ASFLAGS conftest.s 1>&5'
252 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
253 (eval $ac_try) 2>&5
254 ac_status=$?
255 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
256 test $ac_status = 0; }; }; then
257 libc_cv_asm_mpx=yes
258else
259 libc_cv_asm_mpx=no
260fi
261rm -f conftest*
262fi
263{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_asm_mpx" >&5
264$as_echo "$libc_cv_asm_mpx" >&6; }
265if test $libc_cv_asm_mpx == yes; then
266 $as_echo "#define HAVE_MPX_SUPPORT 1" >>confdefs.h
267
268fi
269
270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for AVX2 support" >&5
271$as_echo_n "checking for AVX2 support... " >&6; }
272if ${libc_cv_cc_avx2+:} false; then :
273 $as_echo_n "(cached) " >&6
274else
275 if { ac_try='${CC-cc} -mavx2 -xc /dev/null -S -o /dev/null'
276 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
277 (eval $ac_try) 2>&5
278 ac_status=$?
279 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
280 test $ac_status = 0; }; }; then :
281 libc_cv_cc_avx2=yes
282else
283 libc_cv_cc_avx2=no
284fi
285
286fi
287{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_avx2" >&5
288$as_echo "$libc_cv_cc_avx2" >&6; }
289if test $libc_cv_cc_avx2 = yes; then
290 $as_echo "#define HAVE_AVX2_SUPPORT 1" >>confdefs.h
291
292fi
293config_vars="$config_vars
294config-cflags-avx2 = $libc_cv_cc_avx2"
295
296$as_echo "#define USE_REGPARMS 1" >>confdefs.h
297
298
299$as_echo "#define PI_STATIC_AND_HIDDEN 1" >>confdefs.h
300