Patchwork libgo patch committed: Always use $(AM_LDFLAGS)

login
register
mail settings
Submitter Ian Taylor
Date April 6, 2011, 6:01 a.m.
Message ID <mcrfwpvc3ze.fsf@google.com>
Download mbox | patch
Permalink /patch/89986/
State New
Headers show

Comments

Ian Taylor - April 6, 2011, 6:01 a.m.
This patch to the libgo Makefile ensures that we always use
$(AM_LDFLAGS) when linking libgo.la.  This is required so that we pass
-fsplit-stack to the link command, which tells the gcc driver to wrap
pthread_create.  Without this, most Go tests failed when not using
gold.  Bootstrapped and ran Go testsuite on x86_64-unknown-linux-gnu.
Committed to mainline.

Ian

Patch

diff -r 7faca938d612 libgo/Makefile.am
--- a/libgo/Makefile.am	Tue Apr 05 14:09:53 2011 -0700
+++ b/libgo/Makefile.am	Tue Apr 05 22:52:32 2011 -0700
@@ -1511,7 +1511,7 @@ 
 
 libgo_la_SOURCES = $(runtime_files)
 
-libgo_la_LDFLAGS = $(PTHREAD_CFLAGS)
+libgo_la_LDFLAGS = $(PTHREAD_CFLAGS) $(AM_LDFLAGS)
 
 libgo_la_LIBADD = \
 	$(libgo_go_objs) $(LIBFFI) $(PTHREAD_LIBS) $(MATH_LIBS) $(NET_LIBS)