diff options
author | Igor Tsimbalist <igor.v.tsimbalist@intel.com> | 2018-02-19 17:25:49 +0100 |
---|---|---|
committer | Igor Tsimbalist <itsimbal@gcc.gnu.org> | 2018-02-19 17:25:49 +0100 |
commit | 14e335edc8c5c2cd18779e4e242a3d81037b8b43 (patch) | |
tree | 5439816d0ec4a7a72c403e59851b0b78e2d23c88 /libquadmath | |
parent | 65e3761d451229338a22226e154cb7d0bed5fcd1 (diff) | |
download | gcc-14e335edc8c5c2cd18779e4e242a3d81037b8b43.zip gcc-14e335edc8c5c2cd18779e4e242a3d81037b8b43.tar.gz gcc-14e335edc8c5c2cd18779e4e242a3d81037b8b43.tar.bz2 |
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.
From-SVN: r257809
Diffstat (limited to 'libquadmath')
-rw-r--r-- | libquadmath/ChangeLog | 5 | ||||
-rwxr-xr-x | libquadmath/configure | 17 |
2 files changed, 21 insertions, 1 deletions
diff --git a/libquadmath/ChangeLog b/libquadmath/ChangeLog index a554923..33ca15f 100644 --- a/libquadmath/ChangeLog +++ b/libquadmath/ChangeLog @@ -1,3 +1,8 @@ +2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com> + + PR target/84148 + * configure: Regenerate. + 2018-01-03 Jakub Jelinek <jakub@redhat.com> * libquadmath.texi: Bump @copying's copyright year. diff --git a/libquadmath/configure b/libquadmath/configure index b32dcbc..2a69479 100755 --- a/libquadmath/configure +++ b/libquadmath/configure @@ -12837,18 +12837,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; } @@ -12888,6 +12898,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 XCFLAGS="$XCFLAGS $CET_FLAGS" |