Remove configure tests for -mno-vzeroupper support.
[platform/upstream/glibc.git] / sysdeps / x86_64 / configure
1
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 ()
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; }
11 if eval \${$3+:} false; then :
12   $as_echo_n "(cached) " >&6
13 else
14   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15 /* end confdefs.h.  */
16 $4
17 #include <$2>
18 _ACEOF
19 if ac_fn_c_try_compile "$LINENO"; then :
20   eval "$3=yes"
21 else
22   eval "$3=no"
23 fi
24 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25 fi
26 eval 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/x86_64.
34
35
36 ac_fn_c_check_header_compile "$LINENO" "cpuid.h" "ac_cv_header_cpuid_h" "/* No default includes.  */
37 "
38 if test "x$ac_cv_header_cpuid_h" = xyes; then :
39
40 else
41   as_fn_error $? "gcc must provide the <cpuid.h> header" "$LINENO" 5
42 fi
43
44
45
46 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AVX512 support in assembler" >&5
47 $as_echo_n "checking for AVX512 support in assembler... " >&6; }
48 if ${libc_cv_asm_avx512+:} false; then :
49   $as_echo_n "(cached) " >&6
50 else
51   cat > conftest.s <<\EOF
52         vmovdqu64 %zmm0, (%rsp)
53         vandpd (%rax), %zmm6, %zmm1
54 EOF
55 if { ac_try='${CC-cc} -c $ASFLAGS conftest.s 1>&5'
56   { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
57   (eval $ac_try) 2>&5
58   ac_status=$?
59   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
60   test $ac_status = 0; }; }; then
61   libc_cv_asm_avx512=yes
62 else
63   libc_cv_asm_avx512=no
64 fi
65 rm -f conftest*
66 fi
67 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_asm_avx512" >&5
68 $as_echo "$libc_cv_asm_avx512" >&6; }
69 if test $libc_cv_asm_avx512 == yes; then
70   $as_echo "#define HAVE_AVX512_ASM_SUPPORT 1" >>confdefs.h
71
72 fi
73
74 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AVX512 support" >&5
75 $as_echo_n "checking for AVX512 support... " >&6; }
76 if ${libc_cv_cc_avx512+:} false; then :
77   $as_echo_n "(cached) " >&6
78 else
79   if { ac_try='${CC-cc} -mavx512f -xc /dev/null -S -o /dev/null'
80   { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
81   (eval $ac_try) 2>&5
82   ac_status=$?
83   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
84   test $ac_status = 0; }; }; then :
85   libc_cv_cc_avx512=$libc_cv_asm_avx512
86 else
87   libc_cv_cc_avx512=no
88 fi
89
90 fi
91 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_avx512" >&5
92 $as_echo "$libc_cv_cc_avx512" >&6; }
93 if test $libc_cv_cc_avx512 = yes; then
94   $as_echo "#define HAVE_AVX512_SUPPORT 1" >>confdefs.h
95
96 fi
97 config_vars="$config_vars
98 config-cflags-avx512 = $libc_cv_cc_avx512"
99
100 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Intel MPX support" >&5
101 $as_echo_n "checking for Intel MPX support... " >&6; }
102 if ${libc_cv_asm_mpx+:} false; then :
103   $as_echo_n "(cached) " >&6
104 else
105   cat > conftest.s <<\EOF
106         bndmov %bnd0,(%rsp)
107 EOF
108 if { ac_try='${CC-cc} -c $ASFLAGS conftest.s 1>&5'
109   { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
110   (eval $ac_try) 2>&5
111   ac_status=$?
112   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
113   test $ac_status = 0; }; }; then
114   libc_cv_asm_mpx=yes
115 else
116   libc_cv_asm_mpx=no
117 fi
118 rm -f conftest*
119 fi
120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_asm_mpx" >&5
121 $as_echo "$libc_cv_asm_mpx" >&6; }
122 if test $libc_cv_asm_mpx == yes; then
123   $as_echo "#define HAVE_MPX_SUPPORT 1" >>confdefs.h
124
125 fi
126
127 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AVX2 support" >&5
128 $as_echo_n "checking for AVX2 support... " >&6; }
129 if ${libc_cv_cc_avx2+:} false; then :
130   $as_echo_n "(cached) " >&6
131 else
132   if { ac_try='${CC-cc} -mavx2 -xc /dev/null -S -o /dev/null'
133   { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
134   (eval $ac_try) 2>&5
135   ac_status=$?
136   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
137   test $ac_status = 0; }; }; then :
138   libc_cv_cc_avx2=yes
139 else
140   libc_cv_cc_avx2=no
141 fi
142
143 fi
144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_avx2" >&5
145 $as_echo "$libc_cv_cc_avx2" >&6; }
146 if test $libc_cv_cc_avx2 = yes; then
147   $as_echo "#define HAVE_AVX2_SUPPORT 1" >>confdefs.h
148
149 fi
150 config_vars="$config_vars
151 config-cflags-avx2 = $libc_cv_cc_avx2"
152
153 if test x"$build_mathvec" = xnotset; then
154   build_mathvec=yes
155 fi
156
157 $as_echo "#define PI_STATIC_AND_HIDDEN 1" >>confdefs.h
158
159 # work around problem with autoconf and empty lines at the end of files