aboutsummaryrefslogtreecommitdiff
path: root/gcc/config
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2022-01-21 13:24:00 -0800
committerH.J. Lu <hjl.tools@gmail.com>2022-01-21 14:36:02 -0800
commit60953a23d57b13a672f751bec0c6eefc059eb1ab (patch)
tree43740b618f6644672350784b252291128ef78fb8 /gcc/config
parentf36efe71bef8ddf72306aca313d28759434cf97a (diff)
downloadgcc-60953a23d57b13a672f751bec0c6eefc059eb1ab.zip
gcc-60953a23d57b13a672f751bec0c6eefc059eb1ab.tar.gz
gcc-60953a23d57b13a672f751bec0c6eefc059eb1ab.tar.bz2
x86: Properly disable -fsplit-stack support on non-glibc targets
Revert x86 changes in commit c163647ffbc9a20c8feb6e079dbecccfe016c82e Author: Soren Tempel <soeren@soeren-tempel.net> Date: Fri Jan 21 19:22:46 2022 +0000 Disable -fsplit-stack support on non-glibc targets and change ix86_supports_split_stack to return true only on glibc. PR bootstrap/104170 * common/config/i386/i386-common.cc (ix86_supports_split_stack): Return true only on glibc. * config/i386/gnu-user-common.h (STACK_CHECK_STATIC_BUILTIN): Revert commit c163647ffbc. * config/i386/gnu.h (TARGET_LIBC_PROVIDES_SSP): Likewise.
Diffstat (limited to 'gcc/config')
-rw-r--r--gcc/config/i386/gnu-user-common.h5
-rw-r--r--gcc/config/i386/gnu.h5
2 files changed, 3 insertions, 7 deletions
diff --git a/gcc/config/i386/gnu-user-common.h b/gcc/config/i386/gnu-user-common.h
index 7525f78..23b54c5 100644
--- a/gcc/config/i386/gnu-user-common.h
+++ b/gcc/config/i386/gnu-user-common.h
@@ -66,8 +66,7 @@ along with GCC; see the file COPYING3. If not see
#define STACK_CHECK_STATIC_BUILTIN 1
/* We only build the -fsplit-stack support in libgcc if the
- assembler has full support for the CFI directives and
- targets glibc. */
-#if HAVE_GAS_CFI_PERSONALITY_DIRECTIVE && OPTION_GLIBC
+ assembler has full support for the CFI directives. */
+#if HAVE_GAS_CFI_PERSONALITY_DIRECTIVE
#define TARGET_CAN_SPLIT_STACK
#endif
diff --git a/gcc/config/i386/gnu.h b/gcc/config/i386/gnu.h
index daa505a..401e60c 100644
--- a/gcc/config/i386/gnu.h
+++ b/gcc/config/i386/gnu.h
@@ -35,10 +35,7 @@ along with GCC. If not, see <http://www.gnu.org/licenses/>.
crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s}"
#endif
-/* -fsplit-stack uses a field in the TCB at a fixed offset. This
- field is only available for glibc. Disable -fsplit-stack for
- other libc implementations to avoid silent TCB corruptions. */
-#if defined (TARGET_LIBC_PROVIDES_SSP) && OPTION_GLIBC
+#ifdef TARGET_LIBC_PROVIDES_SSP
/* i386 glibc provides __stack_chk_guard in %gs:0x14. */
#define TARGET_THREAD_SSP_OFFSET 0x14