configure 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296
  1. # This file is generated from configure.ac by Autoconf. DO NOT EDIT!
  2. # Local configure fragment for sysdeps/x86_64.
  3. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -mprefer-vector-width=128" >&5
  4. printf %s "checking for -mprefer-vector-width=128... " >&6; }
  5. if test ${libc_cv_cc_mprefer_vector_width+y}
  6. then :
  7. printf %s "(cached) " >&6
  8. else case e in #(
  9. e) if { ac_try='${CC-cc} -mprefer-vector-width=128 -xc /dev/null -S -o /dev/null'
  10. { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
  11. (eval $ac_try) 2>&5
  12. ac_status=$?
  13. printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  14. test $ac_status = 0; }; }
  15. then :
  16. libc_cv_cc_mprefer_vector_width=yes
  17. else case e in #(
  18. e) libc_cv_cc_mprefer_vector_width=no ;;
  19. esac
  20. fi ;;
  21. esac
  22. fi
  23. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_mprefer_vector_width" >&5
  24. printf "%s\n" "$libc_cv_cc_mprefer_vector_width" >&6; }
  25. if test "$TEST_CC" = "$CC"; then
  26. libc_cv_test_cc_mprefer_vector_width=$libc_cv_cc_mprefer_vector_width
  27. else
  28. saved_CC="$CC"
  29. CC="$TEST_CC"
  30. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -mprefer-vector-width=128 in testing" >&5
  31. printf %s "checking for -mprefer-vector-width=128 in testing... " >&6; }
  32. if test ${libc_cv_test_cc_mprefer_vector_width+y}
  33. then :
  34. printf %s "(cached) " >&6
  35. else case e in #(
  36. e) if { ac_try='${CC-cc} -mprefer-vector-width=128 -xc /dev/null -S -o /dev/null'
  37. { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
  38. (eval $ac_try) 2>&5
  39. ac_status=$?
  40. printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  41. test $ac_status = 0; }; }
  42. then :
  43. libc_cv_test_cc_mprefer_vector_width=yes
  44. else case e in #(
  45. e) libc_cv_test_cc_mprefer_vector_width=no ;;
  46. esac
  47. fi ;;
  48. esac
  49. fi
  50. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_test_cc_mprefer_vector_width" >&5
  51. printf "%s\n" "$libc_cv_test_cc_mprefer_vector_width" >&6; }
  52. CC="$saved_CC"
  53. fi
  54. config_vars="$config_vars
  55. config-cflags-mprefer-vector-width = $libc_cv_cc_mprefer_vector_width"
  56. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for linker that supports -z mark-plt" >&5
  57. printf %s "checking for linker that supports -z mark-plt... " >&6; }
  58. libc_linker_feature=no
  59. cat > conftest.c <<EOF
  60. int _start (void) { return 42; }
  61. EOF
  62. if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS $no_ssp
  63. -Wl,-z,mark-plt -Wl,--fatal-warnings -nostdlib -nostartfiles
  64. -fPIC -shared -o conftest.so conftest.c
  65. 1>&5'
  66. { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
  67. (eval $ac_try) 2>&5
  68. ac_status=$?
  69. printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  70. test $ac_status = 0; }; }
  71. then
  72. if ${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS $no_ssp -Wl,-z,mark-plt -Wl,--fatal-warnings -nostdlib \
  73. -nostartfiles -fPIC -shared -o conftest.so conftest.c 2>&1 \
  74. | grep "warning: -z mark-plt ignored" > /dev/null 2>&1; then
  75. true
  76. else
  77. libc_linker_feature=yes
  78. fi
  79. fi
  80. rm -f conftest*
  81. if test $libc_linker_feature = yes; then
  82. libc_cv_z_mark_plt=yes
  83. else
  84. libc_cv_z_mark_plt=no
  85. fi
  86. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_linker_feature" >&5
  87. printf "%s\n" "$libc_linker_feature" >&6; }
  88. config_vars="$config_vars
  89. have-z-mark-plt = $libc_cv_z_mark_plt"
  90. if test x"$build_mathvec" = xnotset; then
  91. build_mathvec=yes
  92. fi
  93. test_enable_cet=$enable_cet
  94. if test $enable_cet != no; then
  95. # Check if CET can be enabled.
  96. conftest_code="
  97. #if !defined __CET__ || __CET__ != 3
  98. # error CET is not available.
  99. #endif
  100. "
  101. cat > conftest.c <<EOF
  102. $conftest_code
  103. EOF
  104. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether CET can be enabled" >&5
  105. printf %s "checking whether CET can be enabled... " >&6; }
  106. if test ${libc_cv_x86_cet_available+y}
  107. then :
  108. printf %s "(cached) " >&6
  109. else case e in #(
  110. e) if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -c -fcf-protection -include cet.h conftest.c -o conftest 1>&5'
  111. { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
  112. (eval $ac_try) 2>&5
  113. ac_status=$?
  114. printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  115. test $ac_status = 0; }; }
  116. then
  117. libc_cv_x86_cet_available=yes
  118. else
  119. libc_cv_x86_cet_available=no
  120. fi
  121. ;;
  122. esac
  123. fi
  124. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_x86_cet_available" >&5
  125. printf "%s\n" "$libc_cv_x86_cet_available" >&6; }
  126. if test "$TEST_CC" = "$CC"; then
  127. libc_cv_test_x86_cet_available=$libc_cv_x86_cet_available
  128. else
  129. saved_CC="$CC"
  130. CC="$TEST_CC"
  131. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether CET can be enabled in testing" >&5
  132. printf %s "checking whether CET can be enabled in testing... " >&6; }
  133. if test ${libc_cv_test_x86_cet_available+y}
  134. then :
  135. printf %s "(cached) " >&6
  136. else case e in #(
  137. e) if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -c -fcf-protection -include cet.h conftest.c -o conftest 1>&5'
  138. { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
  139. (eval $ac_try) 2>&5
  140. ac_status=$?
  141. printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  142. test $ac_status = 0; }; }
  143. then
  144. libc_cv_test_x86_cet_available=yes
  145. else
  146. libc_cv_test_x86_cet_available=no
  147. fi ;;
  148. esac
  149. fi
  150. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_test_x86_cet_available" >&5
  151. printf "%s\n" "$libc_cv_test_x86_cet_available" >&6; }
  152. CC="$saved_CC"
  153. fi
  154. rm -f conftest*
  155. test_enable_cet=$libc_cv_test_x86_cet_available
  156. if test $libc_cv_x86_cet_available != yes; then
  157. as_fn_error $? "$CC doesn't support CET" "$LINENO" 5
  158. fi
  159. fi
  160. if test $enable_cet != no; then
  161. # Check if assembler supports CET.
  162. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether assembler supports CET" >&5
  163. printf %s "checking whether assembler supports CET... " >&6; }
  164. if test ${libc_cv_x86_cet_as+y}
  165. then :
  166. printf %s "(cached) " >&6
  167. else case e in #(
  168. e) cat > conftest.s <<EOF
  169. incsspd %ecx
  170. EOF
  171. if { ac_try='${CC-cc} -c $CFLAGS conftest.s -o conftest.o 1>&5'
  172. { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
  173. (eval $ac_try) 2>&5
  174. ac_status=$?
  175. printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  176. test $ac_status = 0; }; }; then
  177. libc_cv_x86_cet_as=yes
  178. else
  179. libc_cv_x86_cet_as=no
  180. fi
  181. rm -rf conftest* ;;
  182. esac
  183. fi
  184. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_x86_cet_as" >&5
  185. printf "%s\n" "$libc_cv_x86_cet_as" >&6; }
  186. if test $libc_cv_x86_cet_as = no; then
  187. as_fn_error $? "$AS doesn't support CET" "$LINENO" 5
  188. fi
  189. fi
  190. if test $enable_cet = yes; then
  191. printf "%s\n" "#define DEFAULT_DL_X86_CET_CONTROL cet_elf_property" >>confdefs.h
  192. elif test $enable_cet = permissive; then
  193. printf "%s\n" "#define DEFAULT_DL_X86_CET_CONTROL cet_permissive" >>confdefs.h
  194. fi
  195. config_vars="$config_vars
  196. enable-cet = $enable_cet"
  197. # Check if -mamx-tile works properly.
  198. cat > conftest.c <<EOF
  199. #include <x86intrin.h>
  200. EOF
  201. saved_CC="$CC"
  202. CC="$TEST_CC"
  203. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -mamx-tile works properly in testing" >&5
  204. printf %s "checking whether -mamx-tile works properly in testing... " >&6; }
  205. if test ${libc_cv_test_x86_have_amx_tile+y}
  206. then :
  207. printf %s "(cached) " >&6
  208. else case e in #(
  209. e) if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -E -mamx-tile conftest.c -o conftest 1>&5'
  210. { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
  211. (eval $ac_try) 2>&5
  212. ac_status=$?
  213. printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  214. test $ac_status = 0; }; }
  215. then
  216. if test $libc_cv_test_clang = yes; then
  217. libc_cv_test_x86_have_amx_tile=yes
  218. else
  219. if grep -q __builtin_ia32_ldtilecfg conftest; then
  220. libc_cv_test_x86_have_amx_tile=yes
  221. else
  222. libc_cv_test_x86_have_amx_tile=no
  223. fi
  224. fi
  225. else
  226. libc_cv_test_x86_have_amx_tile=no
  227. fi ;;
  228. esac
  229. fi
  230. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_test_x86_have_amx_tile" >&5
  231. printf "%s\n" "$libc_cv_test_x86_have_amx_tile" >&6; }
  232. CC="$saved_CC"
  233. rm -f conftest*
  234. config_vars="$config_vars
  235. have-mamx-tile = $libc_cv_test_x86_have_amx_tile"
  236. # Check if -mapxf is enabled.
  237. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -mapxf is enabled" >&5
  238. printf %s "checking whether -mapxf is enabled... " >&6; }
  239. if test ${libc_cv_x86_have_apx+y}
  240. then :
  241. printf %s "(cached) " >&6
  242. else case e in #(
  243. e) cat > conftest.c <<EOF
  244. #ifndef __APX_F__
  245. # error APX isn't enabled
  246. #endif
  247. EOF
  248. libc_cv_x86_have_apx=no
  249. if { ac_try='${CC-cc} -c $CFLAGS conftest.c -o conftest.o 1>&5'
  250. { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
  251. (eval $ac_try) 2>&5
  252. ac_status=$?
  253. printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  254. test $ac_status = 0; }; }; then
  255. libc_cv_x86_have_apx=yes
  256. fi
  257. rm -rf conftest* ;;
  258. esac
  259. fi
  260. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_x86_have_apx" >&5
  261. printf "%s\n" "$libc_cv_x86_have_apx" >&6; }
  262. if test $libc_cv_x86_have_apx = yes; then
  263. printf "%s\n" "#define HAVE_X86_APX 1" >>confdefs.h
  264. fi
  265. config_vars="$config_vars
  266. have-x86-apx = $libc_cv_x86_have_apx"
  267. libc_cv_support_sframe=yes
  268. test -n "$critic_missing" && as_fn_error $? "
  269. *** $critic_missing" "$LINENO" 5