diff mbox series

Add split_stack support for GNU/Hurd

Message ID c0a4f72c972de9840b56cb583d0501080912e0e3.camel@gmail.com
State New
Headers show
Series Add split_stack support for GNU/Hurd | expand

Commit Message

Svante Signell Jan. 12, 2019, 7:19 p.m. UTC
Hello,

I order to prepare for inclusion of gccgo to GNU/Hurd split stack support has
been proposed, and in reality this patch has been applied to Debian since gcc-6.

Please commit this patch. Late on updated patches for gccgo in gcc-8 and gcc-9?
will be reviewed and committed with the aid of Ian Lance Taylor and Matthis
Klose.

Thanks!

Comments

Ian Lance Taylor Jan. 12, 2019, 9:18 p.m. UTC | #1
On Sat, Jan 12, 2019 at 11:18 AM Svante Signell
<svante.signell@gmail.com> wrote:
>
> I order to prepare for inclusion of gccgo to GNU/Hurd split stack support has
> been proposed, and in reality this patch has been applied to Debian since gcc-6.
>
> Please commit this patch. Late on updated patches for gccgo in gcc-8 and gcc-9?
> will be reviewed and committed with the aid of Ian Lance Taylor and Matthis
> Klose.

Committed to trunk.

Thanks.

Ian
diff mbox series

Patch

gcc/config/ChangeLog

2018-10-10  Svante Signell <svante.signell@gmail.com>
  * gcc/config/i386/gnu.h: Enable split-stack support

Index: gcc-snapshot-20181019-1.1/src/gcc/config/i386/gnu.h
===================================================================
--- gcc-snapshot-20181019-1.1.orig/src/gcc/config/i386/gnu.h
+++ gcc-snapshot-20181019-1.1/src/gcc/config/i386/gnu.h
@@ -37,11 +37,14 @@  along with GCC.  If not, see <http://www
 
 #ifdef TARGET_LIBC_PROVIDES_SSP
 
-/* Not supported yet.  */
-# undef TARGET_THREAD_SSP_OFFSET
-
-/* Not supported yet.  */
-# undef TARGET_CAN_SPLIT_STACK
-# undef TARGET_THREAD_SPLIT_STACK_OFFSET
+/* i386 glibc provides __stack_chk_guard in %gs:0x14.  */
+#define TARGET_THREAD_SSP_OFFSET        0x14
 
+/* We only build the -fsplit-stack support in libgcc if the
+   assembler has full support for the CFI directives.  */
+#if HAVE_GAS_CFI_PERSONALITY_DIRECTIVE
+#define TARGET_CAN_SPLIT_STACK
+#endif
+/* We steal the last transactional memory word.  */
+#define TARGET_THREAD_SPLIT_STACK_OFFSET 0x30
 #endif