aboutsummaryrefslogtreecommitdiff
path: root/config/cet.m4
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2018-01-10 15:29:21 +0000
committerNick Clifton <nickc@redhat.com>2018-01-10 15:29:21 +0000
commitbf41f30dde0f2ad09c2b7a9894fd7992e4b36a16 (patch)
treebe4f62c520eb0b0652899b45cac10b2d9e92db0f /config/cet.m4
parent2a8ae7146cacb006105e2e9c6f4635aca543e7ec (diff)
downloadgdb-bf41f30dde0f2ad09c2b7a9894fd7992e4b36a16.zip
gdb-bf41f30dde0f2ad09c2b7a9894fd7992e4b36a16.tar.gz
gdb-bf41f30dde0f2ad09c2b7a9894fd7992e4b36a16.tar.bz2
Update top level configure files by synchronizing them with gcc.
. * config-ml.in: Sync with gcc sources. * config.guess: Likewise. * config.sub: Likewise. * configure.ac: Likewise. * configure: Regenerate. config * Sync with GCC sources: 2017-11-14 Boris Kolpackov <boris@codesynthesis.com> * gcc-plugin.m4: Add support for MinGW. 2017-11-17 Igor Tsimbalist <igor.v.tsimbalist@intel.com> * cet.m4: New file. 2017-11-15 Alexandre Oliva <aoliva@redhat.com> * bootstrap-debug-lean.mk (do-compare): Use the contrib/compare-debug script. 2017-10-24 H.J. Lu <hongjiu.lu@intel.com> * bootstrap-cet.mk: New file. 2017-06-19 Martin Liska <mliska@suse.cz> * bootstrap-lto-noplugin.mk: Enable -flto in all PGO stages. * bootstrap-lto.mk: Likewise. 2017-06-03 Eric Botcazou <ebotcazou@adacore.com> * mt-android: New file. 2017-02-13 Richard Biener <rguenther@suse.de> * isl.m4: Remove support for ISL 0.14. 2017-01-19 Uros Bizjak <ubizjak@gmail.com> PR target/78478 * ax_check_define.m4: New file. 2017-01-17 Jakub Jelinek <jakub@redhat.com> PR other/79046 * acx.m4 (GCC_BASE_VER): New m4 function. (ACX_TOOL_DIRS): Require GCC_BASE_VER, for --with-gcc-major-version-only use just major number from BASE-VER. 2017-01-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> PR go/78978 * hwcaps.m4 (GCC_CHECK_ASSEMBLER_HWCAP): New macro.
Diffstat (limited to 'config/cet.m4')
-rw-r--r--config/cet.m438
1 files changed, 38 insertions, 0 deletions
diff --git a/config/cet.m4 b/config/cet.m4
new file mode 100644
index 0000000..715f4bd
--- /dev/null
+++ b/config/cet.m4
@@ -0,0 +1,38 @@
+dnl
+dnl GCC_CET_FLAGS
+dnl (SHELL-CODE_HANDLER)
+dnl
+AC_DEFUN([GCC_CET_FLAGS],[dnl
+GCC_ENABLE(cet, default, ,[enable Intel CET in target libraries],
+ permit yes|no|default)
+case "$host" in
+ i[[34567]]86-*-linux* | x86_64-*-linux*)
+ case "$enable_cet" in
+ default)
+ # Check if assembler supports CET.
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [],
+ [asm ("setssbsy");])],
+ [enable_cet=yes],
+ [enable_cet=no])
+ ;;
+ yes)
+ # Check if assembler supports CET.
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [],
+ [asm ("setssbsy");])],
+ [],
+ [AC_MSG_ERROR([assembler with CET support is required for --enable-cet])])
+ ;;
+ esac
+ ;;
+ *)
+ enable_cet=no
+ ;;
+esac
+if test x$enable_cet = xyes; then
+ $1="-fcf-protection -mcet"
+fi
+])