x86: Default CET run-time support to auto

Message ID 20200508134447.284202-1-hjl.tools@gmail.com
State New
Headers show
Series
  • x86: Default CET run-time support to auto
Related show

Commit Message

Christophe Lyon via Gcc-patches May 8, 2020, 1:44 p.m.
CET has been added since GCC 8.  This patch defaults CET run-time support
to auto.  It enables CET run-time support if asssembler supports CET
instructions and multi-byte NOPs are enabled via SSE2.

OK for master?

Thanks.

H.J.
---
config/

	* cet.m4 (GCC_CET_FLAGS): Change default to auto.

libatomic/

	* configure: Regenerated.

libbacktrace/

	* configure: Regenerated.

libgcc/

	* configure: Regenerated.

libgfortran/

	* configure: Regenerated.

libgomp/

	* configure: Regenerated.

libitm/

	* configure: Regenerated.

libobjc/

	* configure: Regenerated.

libquadmath/

	* configure: Regenerated.

libsanitizer/

	* configure: Regenerated.

libssp/

	* configure: Regenerated.

libstdc++-v3/

	* configure: Regenerated.

libvtv/

	* configure: Regenerated.
---
 config/cet.m4          | 2 +-
 libatomic/configure    | 4 ++--
 libbacktrace/configure | 4 ++--
 libgcc/configure       | 4 ++--
 libgfortran/configure  | 4 ++--
 libgomp/configure      | 4 ++--
 libitm/configure       | 4 ++--
 libobjc/configure      | 4 ++--
 libquadmath/configure  | 4 ++--
 libsanitizer/configure | 4 ++--
 libssp/configure       | 4 ++--
 libstdc++-v3/configure | 4 ++--
 libvtv/configure       | 4 ++--
 13 files changed, 25 insertions(+), 25 deletions(-)

-- 
2.26.2

Comments

Christophe Lyon via Gcc-patches May 14, 2020, 2:29 p.m. | #1
On Fri, 2020-05-08 at 06:44 -0700, H.J. Lu wrote:
> CET has been added since GCC 8.  This patch defaults CET run-time support

> to auto.  It enables CET run-time support if asssembler supports CET

> instructions and multi-byte NOPs are enabled via SSE2.

> 

> OK for master?

> 

> Thanks.

> 

> H.J.

> ---

> config/

> 

> 	* cet.m4 (GCC_CET_FLAGS): Change default to auto.

> 

> libatomic/

> 

> 	* configure: Regenerated.

> 

> libbacktrace/

> 

> 	* configure: Regenerated.

> 

> libgcc/

> 

> 	* configure: Regenerated.

> 

> libgfortran/

> 

> 	* configure: Regenerated.

> 

> libgomp/

> 

> 	* configure: Regenerated.

> 

> libitm/

> 

> 	* configure: Regenerated.

> 

> libobjc/

> 

> 	* configure: Regenerated.

> 

> libquadmath/

> 

> 	* configure: Regenerated.

> 

> libsanitizer/

> 

> 	* configure: Regenerated.

> 

> libssp/

> 

> 	* configure: Regenerated.

> 

> libstdc++-v3/

> 

> 	* configure: Regenerated.

> 

> libvtv/

> 

> 	* configure: Regenerated.

OK
jeff
>
Richard Biener May 15, 2020, 7:45 a.m. | #2
On Thu, 14 May 2020, Jeff Law wrote:

> On Fri, 2020-05-08 at 06:44 -0700, H.J. Lu wrote:

> > CET has been added since GCC 8.  This patch defaults CET run-time support

> > to auto.  It enables CET run-time support if asssembler supports CET

> > instructions and multi-byte NOPs are enabled via SSE2.

> > 

> > OK for master?

> > 

> > Thanks.

> > 

> > H.J.

> > ---

> > config/

> > 

> > 	* cet.m4 (GCC_CET_FLAGS): Change default to auto.

> > 

> > libatomic/

> > 

> > 	* configure: Regenerated.

> > 

> > libbacktrace/

> > 

> > 	* configure: Regenerated.

> > 

> > libgcc/

> > 

> > 	* configure: Regenerated.

> > 

> > libgfortran/

> > 

> > 	* configure: Regenerated.

> > 

> > libgomp/

> > 

> > 	* configure: Regenerated.

> > 

> > libitm/

> > 

> > 	* configure: Regenerated.

> > 

> > libobjc/

> > 

> > 	* configure: Regenerated.

> > 

> > libquadmath/

> > 

> > 	* configure: Regenerated.

> > 

> > libsanitizer/

> > 

> > 	* configure: Regenerated.

> > 

> > libssp/

> > 

> > 	* configure: Regenerated.

> > 

> > libstdc++-v3/

> > 

> > 	* configure: Regenerated.

> > 

> > libvtv/

> > 

> > 	* configure: Regenerated.

> OK


This caused https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95147

Richard.

> jeff

> > 

> 

> 


-- 
Richard Biener <rguenther@suse.de>
SUSE Software Solutions Germany GmbH, Maxfeldstrasse 5, 90409 Nuernberg,
Germany; GF: Felix Imendörffer; HRB 36809 (AG Nuernberg)

Patch

diff --git a/config/cet.m4 b/config/cet.m4
index d9608699cd5..63c6ea9ee02 100644
--- a/config/cet.m4
+++ b/config/cet.m4
@@ -3,7 +3,7 @@  dnl GCC_CET_FLAGS
 dnl    (SHELL-CODE_HANDLER)
 dnl
 AC_DEFUN([GCC_CET_FLAGS],[dnl
-GCC_ENABLE(cet, no, ,[enable Intel CET in target libraries],
+GCC_ENABLE(cet, auto, ,[enable Intel CET in target libraries],
 	   permit yes|no|auto)
 AC_MSG_CHECKING([for CET support])
 
diff --git a/libatomic/configure b/libatomic/configure
index 3e2f2ff4f20..c4b4714abc0 100755
--- a/libatomic/configure
+++ b/libatomic/configure
@@ -1455,7 +1455,7 @@  Optional Features:
                           sometimes confusing) to the casual installer
   --enable-symvers=STYLE  enables symbol versioning of the shared library
                           [default=yes]
-  --enable-cet            enable Intel CET in target libraries [default=no]
+  --enable-cet            enable Intel CET in target libraries [default=auto]
 
 Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
@@ -15582,7 +15582,7 @@  if test "${enable_cet+set}" = set; then :
                           esac
 
 else
-  enable_cet=no
+  enable_cet=auto
 fi
 
 
diff --git a/libbacktrace/configure b/libbacktrace/configure
index 676adb89224..d523c6348fa 100755
--- a/libbacktrace/configure
+++ b/libbacktrace/configure
@@ -1432,7 +1432,7 @@  Optional Features:
                           optimize for fast installation [default=yes]
   --disable-libtool-lock  avoid locking (might break parallel builds)
   --disable-largefile     omit support for large files
-  --enable-cet            enable Intel CET in target libraries [default=no]
+  --enable-cet            enable Intel CET in target libraries [default=auto]
   --enable-host-shared    build host code as shared libraries
 
 Optional Packages:
@@ -12150,7 +12150,7 @@  if test "${enable_cet+set}" = set; then :
                           esac
 
 else
-  enable_cet=no
+  enable_cet=auto
 fi
 
 
diff --git a/libgcc/configure b/libgcc/configure
index 26bf75789e0..a5d5ab84607 100755
--- a/libgcc/configure
+++ b/libgcc/configure
@@ -1353,7 +1353,7 @@  Optional Features:
 			enable decimal float extension to C.  Selecting 'bid'
 			or 'dpd' choses which decimal floating point format
 			to use
-  --enable-cet            enable Intel CET in target libraries [default=no]
+  --enable-cet            enable Intel CET in target libraries [default=auto]
   --enable-explicit-exception-frame-registration
                           register exception tables explicitly at module
                           start, for use e.g. for compatibility with
@@ -4900,7 +4900,7 @@  if test "${enable_cet+set}" = set; then :
                           esac
 
 else
-  enable_cet=no
+  enable_cet=auto
 fi
 
 
diff --git a/libgfortran/configure b/libgfortran/configure
index b4cf854ddb3..3c8be061ede 100755
--- a/libgfortran/configure
+++ b/libgfortran/configure
@@ -1466,7 +1466,7 @@  Optional Features:
                           do not reject slow dependency extractors
   --disable-dependency-tracking
                           speeds up one-time build
-  --enable-cet            enable Intel CET in target libraries [default=no]
+  --enable-cet            enable Intel CET in target libraries [default=auto]
   --disable-symvers       disable symbol versioning for libgfortran
   --enable-shared[=PKGS]  build shared libraries [default=yes]
   --enable-static[=PKGS]  build static libraries [default=yes]
@@ -6001,7 +6001,7 @@  if test "${enable_cet+set}" = set; then :
                           esac
 
 else
-  enable_cet=no
+  enable_cet=auto
 fi
 
 
diff --git a/libgomp/configure b/libgomp/configure
index d8d98f182d4..4a0e1498415 100755
--- a/libgomp/configure
+++ b/libgomp/configure
@@ -1501,7 +1501,7 @@  Optional Features:
   --enable-tls            Use thread-local storage [default=yes]
   --enable-symvers=STYLE  enables symbol versioning of the shared library
                           [default=yes]
-  --enable-cet            enable Intel CET in target libraries [default=no]
+  --enable-cet            enable Intel CET in target libraries [default=auto]
 
 Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
@@ -16740,7 +16740,7 @@  if test "${enable_cet+set}" = set; then :
                           esac
 
 else
-  enable_cet=no
+  enable_cet=auto
 fi
 
 
diff --git a/libitm/configure b/libitm/configure
index 97db1bc8845..2c451fb0a98 100755
--- a/libitm/configure
+++ b/libitm/configure
@@ -1468,7 +1468,7 @@  Optional Features:
   --enable-tls            Use thread-local storage [default=yes]
   --enable-symvers=STYLE  enables symbol versioning of the shared library
                           [default=yes]
-  --enable-cet            enable Intel CET in target libraries [default=no]
+  --enable-cet            enable Intel CET in target libraries [default=auto]
 
 Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
@@ -17877,7 +17877,7 @@  if test "${enable_cet+set}" = set; then :
                           esac
 
 else
-  enable_cet=no
+  enable_cet=auto
 fi
 
 
diff --git a/libobjc/configure b/libobjc/configure
index 2f8924e5042..018c9db76e8 100755
--- a/libobjc/configure
+++ b/libobjc/configure
@@ -1383,7 +1383,7 @@  Optional Features:
   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
   --enable-version-specific-runtime-libs    Specify that runtime libraries should be installed in a compiler-specific directory
   --enable-multilib       build many library versions (default)
-  --enable-cet            enable Intel CET in target libraries [default=no]
+  --enable-cet            enable Intel CET in target libraries [default=auto]
   --enable-maintainer-mode
                           enable make rules and dependencies not useful (and
                           sometimes confusing) to the casual installer
@@ -3453,7 +3453,7 @@  if test "${enable_cet+set}" = set; then :
                           esac
 
 else
-  enable_cet=no
+  enable_cet=auto
 fi
 
 
diff --git a/libquadmath/configure b/libquadmath/configure
index 7b45eb7e805..d995a2cfd25 100755
--- a/libquadmath/configure
+++ b/libquadmath/configure
@@ -1439,7 +1439,7 @@  Optional Features:
                           enable make rules and dependencies not useful (and
                           sometimes confusing) to the casual installer
   --disable-symvers       disable symbol versioning for libquadmath
-  --enable-cet            enable Intel CET in target libraries [default=no]
+  --enable-cet            enable Intel CET in target libraries [default=auto]
   --enable-generated-files-in-srcdir
                           put copies of generated files in source dir intended
                           for creating source tarballs for users without
@@ -13026,7 +13026,7 @@  if test "${enable_cet+set}" = set; then :
                           esac
 
 else
-  enable_cet=no
+  enable_cet=auto
 fi
 
 
diff --git a/libsanitizer/configure b/libsanitizer/configure
index 0c56bdf2d7d..8d1aa6db492 100755
--- a/libsanitizer/configure
+++ b/libsanitizer/configure
@@ -1466,7 +1466,7 @@  Optional Features:
   --enable-fast-install[=PKGS]
                           optimize for fast installation [default=yes]
   --disable-libtool-lock  avoid locking (might break parallel builds)
-  --enable-cet            enable Intel CET in target libraries [default=no]
+  --enable-cet            enable Intel CET in target libraries [default=auto]
 
 Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
@@ -16849,7 +16849,7 @@  if test "${enable_cet+set}" = set; then :
                           esac
 
 else
-  enable_cet=no
+  enable_cet=auto
 fi
 
 
diff --git a/libssp/configure b/libssp/configure
index dd3b41da0f6..7e54b16bfaf 100755
--- a/libssp/configure
+++ b/libssp/configure
@@ -1419,7 +1419,7 @@  Optional Features:
                           do not reject slow dependency extractors
   --disable-dependency-tracking
                           speeds up one-time build
-  --enable-cet            enable Intel CET in target libraries [default=no]
+  --enable-cet            enable Intel CET in target libraries [default=auto]
   --disable-symvers       disable symbol versioning for libssp
   --enable-shared[=PKGS]  build shared libraries [default=yes]
   --enable-static[=PKGS]  build static libraries [default=yes]
@@ -4325,7 +4325,7 @@  if test "${enable_cet+set}" = set; then :
                           esac
 
 else
-  enable_cet=no
+  enable_cet=auto
 fi
 
 
diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
index 9f9c5a2419a..24cc51c8bef 100755
--- a/libstdc++-v3/configure
+++ b/libstdc++-v3/configure
@@ -1643,7 +1643,7 @@  Optional Features:
                           enable C++11 threads support [default=auto]
   --enable-libstdcxx-filesystem-ts
                           turns on ISO/IEC TS 18822 support [default=auto]
-  --enable-cet            enable Intel CET in target libraries [default=no]
+  --enable-cet            enable Intel CET in target libraries [default=auto]
   --enable-version-specific-runtime-libs
                           Specify that runtime libraries should be installed
                           in a compiler-specific directory
@@ -77475,7 +77475,7 @@  if test "${enable_cet+set}" = set; then :
                           esac
 
 else
-  enable_cet=no
+  enable_cet=auto
 fi
 
 
diff --git a/libvtv/configure b/libvtv/configure
index fc969525da0..9d42cb88fb2 100755
--- a/libvtv/configure
+++ b/libvtv/configure
@@ -1446,7 +1446,7 @@  Optional Features:
   --enable-fast-install[=PKGS]
                           optimize for fast installation [default=yes]
   --disable-libtool-lock  avoid locking (might break parallel builds)
-  --enable-cet            enable Intel CET in target libraries [default=no]
+  --enable-cet            enable Intel CET in target libraries [default=auto]
 
 Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
@@ -15667,7 +15667,7 @@  if test "${enable_cet+set}" = set; then :
                           esac
 
 else
-  enable_cet=no
+  enable_cet=auto
 fi