lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 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/i386. |
| 34 | |
| 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 |
| 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 |
| 42 | fi |
| 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; } |
| 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; } |
| 59 | EOF |
| 60 | if ! { 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; }; } |
| 69 | then |
| 70 | libc_compiler_builtin_inlined=yes |
| 71 | fi |
| 72 | rm -f conftest* |
| 73 | if test $libc_compiler_builtin_inlined = yes; then |
| 74 | libc_cv_unsupported_i386=no |
| 75 | else |
| 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 |
| 80 | fi |
| 81 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_compiler_builtin_inlined" >&5 |
| 82 | $as_echo "$libc_compiler_builtin_inlined" >&6; } |
| 83 | |
| 84 | |
| 85 | ac_fn_c_check_header_compile "$LINENO" "cpuid.h" "ac_cv_header_cpuid_h" "/* No default includes. */ |
| 86 | " |
| 87 | if test "x$ac_cv_header_cpuid_h" = xyes; then : |
| 88 | |
| 89 | else |
| 90 | as_fn_error $? "gcc must provide the <cpuid.h> header" "$LINENO" 5 |
| 91 | fi |
| 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; } |
| 97 | if ${libc_cv_cc_sse4+:} false; then : |
| 98 | $as_echo_n "(cached) " >&6 |
| 99 | else |
| 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 |
| 107 | else |
| 108 | libc_cv_cc_sse4=no |
| 109 | fi |
| 110 | |
| 111 | fi |
| 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 |
| 116 | |
| 117 | fi |
| 118 | config_vars="$config_vars |
| 119 | config-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; } |
| 123 | if ${libc_cv_as_i686+:} false; then : |
| 124 | $as_echo_n "(cached) " >&6 |
| 125 | else |
| 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 |
| 133 | else |
| 134 | libc_cv_as_i686=no |
| 135 | fi |
| 136 | |
| 137 | fi |
| 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" |
| 142 | |
| 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 |
| 147 | else |
| 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 |
| 155 | else |
| 156 | libc_cv_cc_avx=no |
| 157 | fi |
| 158 | |
| 159 | fi |
| 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 |
| 164 | |
| 165 | fi |
| 166 | config_vars="$config_vars |
| 167 | config-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; } |
| 171 | if ${libc_cv_cc_sse2avx+:} false; then : |
| 172 | $as_echo_n "(cached) " >&6 |
| 173 | else |
| 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 |
| 181 | else |
| 182 | libc_cv_cc_sse2avx=no |
| 183 | fi |
| 184 | |
| 185 | fi |
| 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 |
| 190 | |
| 191 | fi |
| 192 | config_vars="$config_vars |
| 193 | config-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; } |
| 197 | if ${libc_cv_cc_fma4+:} false; then : |
| 198 | $as_echo_n "(cached) " >&6 |
| 199 | else |
| 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 |
| 207 | else |
| 208 | libc_cv_cc_fma4=no |
| 209 | fi |
| 210 | |
| 211 | fi |
| 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 |
| 216 | |
| 217 | fi |
| 218 | config_vars="$config_vars |
| 219 | have-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; } |
| 223 | if ${libc_cv_cc_novzeroupper+:} false; then : |
| 224 | $as_echo_n "(cached) " >&6 |
| 225 | else |
| 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 |
| 233 | else |
| 234 | libc_cv_cc_novzeroupper=no |
| 235 | fi |
| 236 | |
| 237 | fi |
| 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" |
| 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; } |
| 245 | if ${libc_cv_asm_mpx+:} false; then : |
| 246 | $as_echo_n "(cached) " >&6 |
| 247 | else |
| 248 | cat > conftest.s <<\EOF |
| 249 | bndmov %bnd0,(%esp) |
| 250 | EOF |
| 251 | if { 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 |
| 258 | else |
| 259 | libc_cv_asm_mpx=no |
| 260 | fi |
| 261 | rm -f conftest* |
| 262 | fi |
| 263 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_asm_mpx" >&5 |
| 264 | $as_echo "$libc_cv_asm_mpx" >&6; } |
| 265 | if test $libc_cv_asm_mpx == yes; then |
| 266 | $as_echo "#define HAVE_MPX_SUPPORT 1" >>confdefs.h |
| 267 | |
| 268 | fi |
| 269 | |
| 270 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AVX2 support" >&5 |
| 271 | $as_echo_n "checking for AVX2 support... " >&6; } |
| 272 | if ${libc_cv_cc_avx2+:} false; then : |
| 273 | $as_echo_n "(cached) " >&6 |
| 274 | else |
| 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 |
| 282 | else |
| 283 | libc_cv_cc_avx2=no |
| 284 | fi |
| 285 | |
| 286 | fi |
| 287 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_avx2" >&5 |
| 288 | $as_echo "$libc_cv_cc_avx2" >&6; } |
| 289 | if test $libc_cv_cc_avx2 = yes; then |
| 290 | $as_echo "#define HAVE_AVX2_SUPPORT 1" >>confdefs.h |
| 291 | |
| 292 | fi |
| 293 | config_vars="$config_vars |
| 294 | config-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 | |