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 asm supports AVX512DQ.
5 AC_CACHE_CHECK(for AVX512DQ support in assembler, libc_cv_asm_avx512dq, [dnl
6 cat > conftest.s <<\EOF
7 vandpd (%rax), %zmm6, %zmm1
9 if AC_TRY_COMMAND(${CC-cc} -c $ASFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD); then
10 libc_cv_asm_avx512dq=yes
12 libc_cv_asm_avx512dq=no
15 if test $libc_cv_asm_avx512dq = yes; then
16 AC_DEFINE(HAVE_AVX512DQ_ASM_SUPPORT)
19 dnl Check if -mavx512f works.
20 AC_CACHE_CHECK(for AVX512 support, libc_cv_cc_avx512, [dnl
21 LIBC_TRY_CC_OPTION([-mavx512f], [libc_cv_cc_avx512=$libc_cv_asm_avx512dq], [libc_cv_cc_avx512=no])
23 if test $libc_cv_cc_avx512 = yes; then
24 AC_DEFINE(HAVE_AVX512_SUPPORT)
26 LIBC_CONFIG_VAR([config-cflags-avx512], [$libc_cv_cc_avx512])
28 dnl Check whether asm supports Intel MPX
29 AC_CACHE_CHECK(for Intel MPX support, libc_cv_asm_mpx, [dnl
30 cat > conftest.s <<\EOF
33 if AC_TRY_COMMAND(${CC-cc} -c $ASFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD); then
39 if test $libc_cv_asm_mpx = yes; then
40 AC_DEFINE(HAVE_MPX_SUPPORT)
43 if test x"$build_mathvec" = xnotset; then
47 dnl Check if linker supports static PIE with the fix for
49 dnl https://sourceware.org/bugzilla/show_bug.cgi?id=21782
51 if test "$static_pie" = yes; then
52 AC_CACHE_CHECK(for linker static PIE support, libc_cv_ld_static_pie, [dnl
53 cat > conftest.s <<\EOF
60 libc_cv_pie_option="-Wl,-pie"
61 if AC_TRY_COMMAND(${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS -nostartfiles -nostdlib $no_ssp $libc_cv_pie_option -o conftest conftest.s 1>&AS_MESSAGE_LOG_FD); then
62 libc_cv_ld_static_pie=yes
64 libc_cv_ld_static_pie=no
67 if test "$libc_cv_ld_static_pie" != yes; then
68 AC_MSG_ERROR([linker support for static PIE needed])
72 dnl It is always possible to access static and hidden symbols in an
73 dnl position independent way.
74 AC_DEFINE(PI_STATIC_AND_HIDDEN)
76 test -n "$critic_missing" && AC_MSG_ERROR([