From 4c1a5d8b71e29b71e0bc1004480c12c5fc427cb7 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Fri, 15 May 2020 09:06:50 -0700 Subject: x86: Also check if -fcf-protection works When defaulting CET run-time support to auto, check if -fcf-protection works. Even if the stage1 GCC doesn't support -fcf-protection, since the final GCC does, CET run-time support will be enabled by default if binutils support CET. config/ PR bootstrap/95147 * cet.m4 (GCC_CET_FLAGS): Also check if -fcf-protection works when defaulting to auto. libatomic/ PR bootstrap/95147 * configure: Regenerated. libbacktrace/ PR bootstrap/95147 * configure: Regenerated. libgcc/ PR bootstrap/95147 * configure: Regenerated. libgfortran/ PR bootstrap/95147 * configure: Regenerated. libgomp/ PR bootstrap/95147 * configure: Regenerated. libitm/ PR bootstrap/95147 * configure: Regenerated. libobjc/ PR bootstrap/95147 * configure: Regenerated. libphobos/ PR bootstrap/95147 * configure: Regenerated. libquadmath/ PR bootstrap/95147 * configure: Regenerated. libsanitizer/ PR bootstrap/95147 * configure: Regenerated. libssp/ PR bootstrap/95147 * configure: Regenerated. libstdc++-v3/ PR bootstrap/95147 * configure: Regenerated. libvtv/ PR bootstrap/95147 * configure: Regenerated. zlib/ PR bootstrap/95147 * configure: Regenerated. --- libphobos/ChangeLog | 5 +++++ libphobos/configure | 11 +++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) (limited to 'libphobos') diff --git a/libphobos/ChangeLog b/libphobos/ChangeLog index c885d92..e5422ec 100644 --- a/libphobos/ChangeLog +++ b/libphobos/ChangeLog @@ -1,3 +1,8 @@ +2020-05-15 H.J. Lu + + PR bootstrap/95147 + * configure: Regenerated. + 2020-05-08 H.J. Lu * libdruntime/config/x86/switchcontext.S: Include if diff --git a/libphobos/configure b/libphobos/configure index c8137d4..4551e9f 100755 --- a/libphobos/configure +++ b/libphobos/configure @@ -1478,7 +1478,7 @@ Optional Features: --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer - --enable-cet enable Intel CET in target libraries [default=no] + --enable-cet enable Intel CET in target libraries [default=auto] --enable-shared[=PKGS] build shared libraries [default=yes] --enable-static[=PKGS] build static libraries [default=yes] --enable-fast-install[=PKGS] @@ -5573,7 +5573,7 @@ if test "${enable_cet+set}" = set; then : esac else - enable_cet=no + enable_cet=auto fi @@ -5586,6 +5586,8 @@ case "$host" in auto) # Check if target supports multi-byte NOPs # and if assembler supports CET insn. + save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -fcf-protection" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -5609,6 +5611,7 @@ else enable_cet=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS="$save_CFLAGS" ;; yes) # Check if assembler supports CET. @@ -11734,7 +11737,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11737 "configure" +#line 11740 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11840,7 +11843,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11843 "configure" +#line 11846 "configure" #include "confdefs.h" #if HAVE_DLFCN_H -- cgit v1.1