# DP: PR go/66368, build libgo with -fno-stack-protector

--- a/src/libgo/Makefile.am
+++ b/src/libgo/Makefile.am
@@ -47,6 +47,7 @@ AM_CPPFLAGS = -I $(srcdir)/runtime $(LIB
 ACLOCAL_AMFLAGS = -I ./config -I ../config
 
 AM_CFLAGS = -fexceptions -fnon-call-exceptions \
+	-fno-stack-protector \
 	$(SPLIT_STACK) $(WARN_CFLAGS) \
 	$(STRINGOPS_FLAG) $(HWCAP_CFLAGS) $(OSCFLAGS) \
 	-I $(srcdir)/../libgcc -I $(srcdir)/../libbacktrace \
--- a/src/libgo/Makefile.in
+++ b/src/libgo/Makefile.in
@@ -547,6 +547,7 @@ WARN_CFLAGS = $(WARN_FLAGS) $(WERROR)
 AM_CPPFLAGS = -I $(srcdir)/runtime $(LIBFFIINCS) $(PTHREAD_CFLAGS)
 ACLOCAL_AMFLAGS = -I ./config -I ../config
 AM_CFLAGS = -fexceptions -fnon-call-exceptions \
+	-fno-stack-protector \
 	$(SPLIT_STACK) $(WARN_CFLAGS) \
 	$(STRINGOPS_FLAG) $(HWCAP_CFLAGS) $(OSCFLAGS) \
 	-I $(srcdir)/../libgcc -I $(srcdir)/../libbacktrace \
