Blame sysdeps/x86/configure.ac
|
Packit |
6c4009 |
GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
|
|
Packit |
6c4009 |
# Local configure fragment for sysdeps/x86.
|
|
Packit |
6c4009 |
|
|
Packit Bot |
0c2104 |
if test x"$enable_cet" = xyes; then
|
|
Packit |
6c4009 |
# Check if CET can be enabled.
|
|
Packit |
6c4009 |
AC_CACHE_CHECK(whether CET can be enabled,
|
|
Packit |
6c4009 |
libc_cv_x86_cet_available, [dnl
|
|
Packit |
6c4009 |
cat > conftest.c <
|
|
Packit |
6c4009 |
#if !defined __CET__ || __CET__ != 3
|
|
Packit |
6c4009 |
# error CET isn't available.
|
|
Packit |
6c4009 |
#endif
|
|
Packit |
6c4009 |
EOF
|
|
Packit |
6c4009 |
if AC_TRY_COMMAND(${CC-cc} -c $CFLAGS -fcf-protection -include cet.h conftest.c 1>&AS_MESSAGE_LOG_FD); then
|
|
Packit |
6c4009 |
libc_cv_x86_cet_available=yes
|
|
Packit |
6c4009 |
else
|
|
Packit |
6c4009 |
libc_cv_x86_cet_available=no
|
|
Packit |
6c4009 |
fi
|
|
Packit |
6c4009 |
rm -rf conftest*])
|
|
Packit Bot |
0c2104 |
if test $libc_cv_x86_cet_available = yes; then
|
|
Packit Bot |
0c2104 |
enable_cet=yes
|
|
Packit Bot |
0c2104 |
else
|
|
Packit Bot |
0c2104 |
if test x"$enable_cet" = xdefault; then
|
|
Packit Bot |
0c2104 |
enable_cet=no
|
|
Packit Bot |
0c2104 |
else
|
|
Packit Bot |
0c2104 |
AC_MSG_ERROR([$CC doesn't support CET])
|
|
Packit Bot |
0c2104 |
fi
|
|
Packit |
6c4009 |
fi
|
|
Packit |
6c4009 |
fi
|
|
Packit Bot |
0c2104 |
if test $enable_cet = yes; then
|
|
Packit |
6c4009 |
# Check if assembler supports CET.
|
|
Packit |
6c4009 |
AC_CACHE_CHECK(whether $AS supports CET,
|
|
Packit |
6c4009 |
libc_cv_x86_cet_as, [dnl
|
|
Packit |
6c4009 |
cat > conftest.s <
|
|
Packit |
6c4009 |
incsspd %ecx
|
|
Packit |
6c4009 |
EOF
|
|
Packit |
6c4009 |
if AC_TRY_COMMAND(${CC-cc} -c $CFLAGS conftest.s -o conftest.o 1>&AS_MESSAGE_LOG_FD); then
|
|
Packit |
6c4009 |
libc_cv_x86_cet_as=yes
|
|
Packit |
6c4009 |
else
|
|
Packit |
6c4009 |
libc_cv_x86_cet_as=no
|
|
Packit |
6c4009 |
fi
|
|
Packit |
6c4009 |
rm -rf conftest*])
|
|
Packit |
6c4009 |
if test $libc_cv_x86_cet_as = no; then
|
|
Packit |
6c4009 |
AC_MSG_ERROR([$AS doesn't support CET])
|
|
Packit |
6c4009 |
fi
|
|
Packit |
6c4009 |
fi
|
|
Packit |
6c4009 |
LIBC_CONFIG_VAR([enable-cet], [$enable_cet])
|