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
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)