aboutsummaryrefslogtreecommitdiff
path: root/libgfortran
diff options
context:
space:
mode:
authoritsimbal <itsimbal@138bc75d-0d04-0410-961f-82ee72b054a4>2018-02-19 16:25:49 +0000
committeritsimbal <itsimbal@138bc75d-0d04-0410-961f-82ee72b054a4>2018-02-19 16:25:49 +0000
commit5611e648542e5fdbb5a839ec21179ab979338839 (patch)
tree5439816d0ec4a7a72c403e59851b0b78e2d23c88 /libgfortran
parentc12ddda48feb239c92cdfea4c24f44c15647593b (diff)
CET shouldn't be enabled in 32-bit run-time libraries by defualt
ENDBR32 and RDSSPD are multi-byte NOPs on x86-64 processors and newer x86 processors, starting Pentium Pro. They are UD on older 32-bit processors. Detect this at configure time and adjust the default value for enable_cet. GCC will enable CET in 32-bit run-time libraries in any case if --enable-cet is used to configure GCC. PR target/84148 * config/cet.m4: Check if target support multi-byte NOPS (SSE). * libatomic/configure: Regenerate. * libbacktrace/configure: Likewise. * libgcc/configure: Likewise. * libgfortran/configure: Likewise. * libgomp/configure: Likewise. * libitm/configure: Likewise. * libmpx/configure: Likewise. * libobjc/configure: Likewise. * libquadmath/configure: Likewise. * libsanitizer/configure: Likewise. * libssp/configure: Likewise. * libstdc++-v3/configure: Likewise. * libvtv/configure: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257809 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgfortran')
-rw-r--r--libgfortran/ChangeLog5
-rwxr-xr-xlibgfortran/configure21
2 files changed, 23 insertions, 3 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog
index 20a13e46a4f..c992a6051c1 100644
--- a/libgfortran/ChangeLog
+++ b/libgfortran/ChangeLog
@@ -1,3 +1,8 @@
+2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
+
+ PR target/84148
+ * configure: Regenerate.
+
2018-02-18 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libgfortran/84412
diff --git a/libgfortran/configure b/libgfortran/configure
index 60e18a7b3e8..86904ef7eea 100755
--- a/libgfortran/configure
+++ b/libgfortran/configure
@@ -5804,18 +5804,28 @@ else
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CET support" >&5
+$as_echo_n "checking for CET support... " >&6; }
+
case "$host" in
i[34567]86-*-linux* | x86_64-*-linux*)
case "$enable_cet" in
default)
- # Check if assembler supports CET.
+ # Check if target supports multi-byte NOPs
+ # and if assembler supports CET insn.
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
main ()
{
+
+#if !defined(__SSE2__)
+#error target does not support multi-byte NOPs
+#else
asm ("setssbsy");
+#endif
+
;
return 0;
}
@@ -5855,6 +5865,11 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
esac
if test x$enable_cet = xyes; then
CET_FLAGS="-fcf-protection -mcet"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
fi
AM_FCFLAGS="$AM_FCFLAGS $CET_FLAGS"
@@ -12498,7 +12513,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 12501 "configure"
+#line 12516 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -12604,7 +12619,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 12607 "configure"
+#line 12622 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H