libgo: fix makefile buglet

Fix a small bug in the libgo Makefile recipe that constructs the
directory from which to pick up libgcc_s.so ; the gccgo invocation
with -print-libgcc-file-name was missing the flags, which meant that
for -m32 builds we'd see the 64-bit libgcc dir.

Change-Id: I0ec85d977e2b1a5ab13149456b5d0666d714c3ee
Reviewed-on: https://go-review.googlesource.com/78836
Reviewed-by: Ian Lance Taylor <iant@golang.org>
diff --git a/libgo/Makefile.am b/libgo/Makefile.am
index f0ecf92..7be4997 100644
--- a/libgo/Makefile.am
+++ b/libgo/Makefile.am
@@ -1001,7 +1001,7 @@
 	export MAKE; \
 	NM="$(NM)"; \
 	export NM; \
-	libgccdir=`${GOC} -print-libgcc-file-name | sed -e 's|/[^/]*$$||'`; \
+	libgccdir=`${GOC} ${GOCFLAGS} -print-libgcc-file-name | sed -e 's|/[^/]*$$||'`; \
 	LD_LIBRARY_PATH="`${PWD_COMMAND}`/.libs:$${libgccdir}:${LD_LIBRARY_PATH}"; \
 	LD_LIBRARY_PATH=`echo $${LD_LIBRARY_PATH} | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; \
 	export LD_LIBRARY_PATH; \
diff --git a/libgo/Makefile.in b/libgo/Makefile.in
index 794c125..ac9f529 100644
--- a/libgo/Makefile.in
+++ b/libgo/Makefile.in
@@ -1135,7 +1135,7 @@
 	export MAKE; \
 	NM="$(NM)"; \
 	export NM; \
-	libgccdir=`${GOC} -print-libgcc-file-name | sed -e 's|/[^/]*$$||'`; \
+	libgccdir=`${GOC} ${GOCFLAGS} -print-libgcc-file-name | sed -e 's|/[^/]*$$||'`; \
 	LD_LIBRARY_PATH="`${PWD_COMMAND}`/.libs:$${libgccdir}:${LD_LIBRARY_PATH}"; \
 	LD_LIBRARY_PATH=`echo $${LD_LIBRARY_PATH} | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; \
 	export LD_LIBRARY_PATH; \