2 # as_fn_set_status STATUS
3 # -----------------------
4 # Set $? to STATUS, without forking.
12 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
19 if expr a : '\(a\)' >/dev/null 2>&1 &&
20 test "X`expr 00001 : '.*\(...\)'`" = X001; then
26 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
32 as_me=`$as_basename -- "$0" ||
33 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
34 X"$0" : 'X\(//\)$' \| \
35 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
37 sed '/^.*\/\([^/][^/]*\)\/*$/{
52 as_lineno_1=$LINENO as_lineno_1a=$LINENO
53 as_lineno_2=$LINENO as_lineno_2a=$LINENO
54 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
55 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
56 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
68 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
72 chmod +x "$as_me.lineno" ||
73 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
75 # Don't try to exec as it changes $[0], causing all sort of problems
76 # (the dirname of $[0] is not the place where we might find the
77 # original and so on. Autoconf is especially sensitive to this).
79 # Exit status is that of the last command.
84 # ac_fn_c_try_compile LINENO
85 # --------------------------
86 # Try to compile conftest.$ac_ext, and return whether this succeeded.
87 ac_fn_c_try_compile ()
89 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
90 rm -f conftest.$ac_objext
91 if { { ac_try="$ac_compile"
93 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
94 *) ac_try_echo=$ac_try;;
96 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
97 $as_echo "$ac_try_echo"; } >&5
98 (eval "$ac_compile") 2>conftest.err
100 if test -s conftest.err; then
101 grep -v '^ *+' conftest.err >conftest.er1
103 mv -f conftest.er1 conftest.err
105 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
106 test $ac_status = 0; } && {
107 test -z "$ac_c_werror_flag" ||
108 test ! -s conftest.err
109 } && test -s conftest.$ac_objext; then :
112 $as_echo "$as_me: failed program was:" >&5
113 sed 's/^/| /' conftest.$ac_ext >&5
117 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
118 as_fn_set_status $ac_retval
120 } # ac_fn_c_try_compile
122 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
123 # -------------------------------------------------------
124 # Tests whether HEADER exists and can be compiled using the include files in
125 # INCLUDES, setting the cache variable VAR accordingly.
126 ac_fn_c_check_header_compile ()
128 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
129 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
130 $as_echo_n "checking for $2... " >&6; }
131 if eval \${$3+:} false; then :
132 $as_echo_n "(cached) " >&6
134 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
135 /* end confdefs.h. */
139 if ac_fn_c_try_compile "$LINENO"; then :
144 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
148 $as_echo "$ac_res" >&6; }
149 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
151 } # ac_fn_c_check_header_compile
152 # This file is generated from configure.in by Autoconf. DO NOT EDIT!
153 # Local configure fragment for sysdeps/x86_64.
156 ac_fn_c_check_header_compile "$LINENO" "cpuid.h" "ac_cv_header_cpuid_h" "/* No default includes. */
158 if test "x$ac_cv_header_cpuid_h" = xyes; then :
161 as_fn_error $? "gcc must provide the <cpuid.h> header" "$LINENO" 5
166 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -g produces usable source locations for assembler-with-cpp" >&5
167 $as_echo_n "checking if -g produces usable source locations for assembler-with-cpp... " >&6; }
168 if ${libc_cv_cpp_asm_debuginfo+:} false; then :
169 $as_echo_n "(cached) " >&6
171 cat > conftest.S <<EOF
172 #include "confdefs.h"
177 ${libc_cv_asm_global_directive} foo
179 /* Unfortunately this test only works for a real instruction,
180 not for any of the machine-independent pseudo-ops.
181 So we just have to assume everybody has a "nop". */
188 if { ac_try='${CC-cc} $CPPFLAGS $ASFLAGS -g -c conftest.S 1>&5'
189 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
192 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
193 test $ac_status = 0; }; } && {
194 ac_pattern='conftest\.S'
195 { ac_try='readelf --debug-dump=line conftest.o |
196 grep $ac_pattern 1>&5'
197 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
200 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
201 test $ac_status = 0; }; }
203 libc_cv_cpp_asm_debuginfo=yes
205 libc_cv_cpp_asm_debuginfo=no
209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cpp_asm_debuginfo" >&5
210 $as_echo "$libc_cv_cpp_asm_debuginfo" >&6; }
211 if test $libc_cv_cpp_asm_debuginfo = yes; then
212 $as_echo "#define HAVE_CPP_ASM_DEBUGINFO 1" >>confdefs.h
216 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSE4 support" >&5
217 $as_echo_n "checking for SSE4 support... " >&6; }
218 if ${libc_cv_cc_sse4+:} false; then :
219 $as_echo_n "(cached) " >&6
221 if { ac_try='${CC-cc} -msse4 -xc /dev/null -S -o /dev/null'
222 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
225 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
226 test $ac_status = 0; }; }; then
232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_sse4" >&5
233 $as_echo "$libc_cv_cc_sse4" >&6; }
234 if test $libc_cv_cc_sse4 = yes; then
235 $as_echo "#define HAVE_SSE4_SUPPORT 1" >>confdefs.h
239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AVX support" >&5
240 $as_echo_n "checking for AVX support... " >&6; }
241 if ${libc_cv_cc_avx+:} false; then :
242 $as_echo_n "(cached) " >&6
244 if { ac_try='${CC-cc} -mavx -xc /dev/null -S -o /dev/null'
245 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
248 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
249 test $ac_status = 0; }; }; then
255 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_avx" >&5
256 $as_echo "$libc_cv_cc_avx" >&6; }
257 if test $libc_cv_cc_avx = yes; then
258 $as_echo "#define HAVE_AVX_SUPPORT 1" >>confdefs.h
262 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AVX encoding of SSE instructions" >&5
263 $as_echo_n "checking for AVX encoding of SSE instructions... " >&6; }
264 if ${libc_cv_cc_sse2avx+:} false; then :
265 $as_echo_n "(cached) " >&6
267 if { ac_try='${CC-cc} -msse2avx -xc /dev/null -S -o /dev/null'
268 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
271 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
272 test $ac_status = 0; }; }; then
273 libc_cv_cc_sse2avx=yes
275 libc_cv_cc_sse2avx=no
278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_sse2avx" >&5
279 $as_echo "$libc_cv_cc_sse2avx" >&6; }
280 if test $libc_cv_cc_sse2avx = yes; then
281 $as_echo "#define HAVE_SSE2AVX_SUPPORT 1" >>confdefs.h
285 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FMA4 support" >&5
286 $as_echo_n "checking for FMA4 support... " >&6; }
287 if ${libc_cv_cc_fma4+:} false; then :
288 $as_echo_n "(cached) " >&6
290 if { ac_try='${CC-cc} -mfma4 -xc /dev/null -S -o /dev/null'
291 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
294 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
295 test $ac_status = 0; }; }; then
301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_fma4" >&5
302 $as_echo "$libc_cv_cc_fma4" >&6; }
303 if test $libc_cv_cc_fma4 = yes; then
304 $as_echo "#define HAVE_FMA4_SUPPORT 1" >>confdefs.h
308 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -mno-vzeroupper support" >&5
309 $as_echo_n "checking for -mno-vzeroupper support... " >&6; }
310 if ${libc_cv_cc_novzeroupper+:} false; then :
311 $as_echo_n "(cached) " >&6
313 if { ac_try='${CC-cc} -mno-vzeroupper -xc /dev/null -S -o /dev/null'
314 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
317 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
318 test $ac_status = 0; }; }; then
319 libc_cv_cc_novzeroupper=yes
321 libc_cv_cc_novzeroupper=no
324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_novzeroupper" >&5
325 $as_echo "$libc_cv_cc_novzeroupper" >&6; }
327 # Check for support of thread-local storage handling in assembler and linker.
328 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for x86-64 TLS support" >&5
329 $as_echo_n "checking for x86-64 TLS support... " >&6; }
330 if ${libc_cv_x86_64_tls+:} false; then :
331 $as_echo_n "(cached) " >&6
333 cat > conftest.s <<\EOF
334 .section ".tdata", "awT", @progbits
337 .section ".tbss", "awT", @nobits
341 baz: leaq bar@TLSLD(%rip), %rdi
342 leaq bar@DTPOFF(%rax), %rcx
343 addq foo@GOTTPOFF(%rip), %rax
344 movq $bar@TPOFF, %rdx
346 if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5'
347 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
350 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
351 test $ac_status = 0; }; }; then
352 libc_cv_x86_64_tls=yes
354 libc_cv_x86_64_tls=no
358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_x86_64_tls" >&5
359 $as_echo "$libc_cv_x86_64_tls" >&6; }
360 if test $libc_cv_x86_64_tls = no; then
361 as_fn_error $? "the assembler must support TLS" "$LINENO" 5
364 $as_echo "#define PI_STATIC_AND_HIDDEN 1" >>confdefs.h
366 # work around problem with autoconf and empty lines at the end of files