PATCH COMMITTED: Only put split stack support in libgcc.a

Message ID
State New
Headers show

Commit Message

Ian Taylor Oct. 1, 2010, 7:33 p.m.
Jakub pointed out that since the split stack support uses TLS variables,
putting it in meant that every executable had a larger TLS
segment.  Since the split stack code intentionally has private
visibility, there is no real reason to put it in  This
patch changes it to only be in libgcc.a.  Bootstrapped and tested on
x86_64-unknown-linux-gnu.  Committed to mainline.


2010-10-01  Ian Lance Taylor  <>

	* config/t-stack(LIB2ADD_ST): Set instead of LIB2ADD.
	* config/i386/t-stack-i386 (LIB2ADD_ST): Likewise.


Index: config/i386/t-stack-i386
--- config/i386/t-stack-i386	(revision 164892)
+++ config/i386/t-stack-i386	(working copy)
@@ -1,2 +1,2 @@ 
 # Makefile fragment to support -fsplit-stack for x86.
-LIB2ADD += $(srcdir)/config/i386/morestack.S
+LIB2ADD_ST += $(srcdir)/config/i386/morestack.S
Index: config/t-stack
--- config/t-stack	(revision 164892)
+++ config/t-stack	(working copy)
@@ -1,4 +1,4 @@ 
 # Makefile fragment to provide generic support for -fsplit-stack.
 # This should be used in for any host which supports
 # -fsplit-stack.
-LIB2ADD += $(srcdir)/generic-morestack.c $(srcdir)/generic-morestack-thread.c
+LIB2ADD_ST += $(srcdir)/generic-morestack.c $(srcdir)/generic-morestack-thread.c