1 GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
2 # Local configure fragment for sysdeps/x86_64.
4 dnl Check if -mprefer-vector-width=128 works.
5 AC_CACHE_CHECK(-mprefer-vector-width=128, libc_cv_cc_mprefer_vector_width, [dnl
6 LIBC_TRY_CC_OPTION([-mprefer-vector-width=128],
7 [libc_cv_cc_mprefer_vector_width=yes],
8 [libc_cv_cc_mprefer_vector_width=no])
10 LIBC_CONFIG_VAR([config-cflags-mprefer-vector-width],
11 [$libc_cv_cc_mprefer_vector_width])
13 LIBC_LINKER_FEATURE([-z mark-plt], [-Wl,-z,mark-plt],
14 [libc_cv_z_mark_plt=yes], [libc_cv_z_mark_plt=no])
15 LIBC_CONFIG_VAR([have-z-mark-plt], [$libc_cv_z_mark_plt])
17 if test x"$build_mathvec" = xnotset; then
21 if test $enable_cet != no; then
22 # Check if CET can be enabled.
23 AC_CACHE_CHECK(whether CET can be enabled,
24 libc_cv_x86_cet_available, [dnl
25 cat > conftest.c <<EOF
26 #if !defined __CET__ || __CET__ != 3
27 # error CET isn't available.
30 if AC_TRY_COMMAND(${CC-cc} -c $CFLAGS -fcf-protection -include cet.h conftest.c 1>&AS_MESSAGE_LOG_FD); then
31 libc_cv_x86_cet_available=yes
33 libc_cv_x86_cet_available=no
36 if test $libc_cv_x86_cet_available != yes; then
37 AC_MSG_ERROR([$CC doesn't support CET])
40 if test $enable_cet != no; then
41 # Check if assembler supports CET.
42 AC_CACHE_CHECK(whether assembler supports CET,
43 libc_cv_x86_cet_as, [dnl
44 cat > conftest.s <<EOF
47 if AC_TRY_COMMAND(${CC-cc} -c $CFLAGS conftest.s -o conftest.o 1>&AS_MESSAGE_LOG_FD); then
48 libc_cv_x86_cet_as=yes
53 if test $libc_cv_x86_cet_as = no; then
54 AC_MSG_ERROR([$AS doesn't support CET])
57 if test $enable_cet = yes; then
58 AC_DEFINE(DEFAULT_DL_X86_CET_CONTROL, cet_elf_property)
59 elif test $enable_cet = permissive; then
60 AC_DEFINE(DEFAULT_DL_X86_CET_CONTROL, cet_permissive)
62 LIBC_CONFIG_VAR([enable-cet], [$enable_cet])
64 # Check if -mamx-tile works properly.
65 AC_CACHE_CHECK(whether -mamx-tile works properly,
66 libc_cv_x86_have_amx_tile, [dnl
67 cat > conftest.c <<EOF
68 #include <x86intrin.h>
70 libc_cv_x86_have_amx_tile=no
71 if AC_TRY_COMMAND(${CC-cc} -E $CFLAGS -mamx-tile conftest.c > conftest.i); then
72 if grep -q __builtin_ia32_ldtilecfg conftest.i; then
73 libc_cv_x86_have_amx_tile=yes
77 LIBC_CONFIG_VAR([have-mamx-tile], [$libc_cv_x86_have_amx_tile])
79 # Check if -mapxf is enabled.
80 AC_CACHE_CHECK(whether -mapxf is enabled,
81 libc_cv_x86_have_apx, [dnl
82 cat > conftest.c <<EOF
84 # error APX isn't enabled
87 libc_cv_x86_have_apx=no
88 if AC_TRY_COMMAND(${CC-cc} -c $CFLAGS conftest.c -o conftest.o 1>&AS_MESSAGE_LOG_FD); then
89 libc_cv_x86_have_apx=yes
92 if test $libc_cv_x86_have_apx = yes; then
93 AC_DEFINE(HAVE_X86_APX)
95 LIBC_CONFIG_VAR([have-x86-apx], [$libc_cv_x86_have_apx])
97 test -n "$critic_missing" && AC_MSG_ERROR([