aboutsummaryrefslogtreecommitdiff
path: root/gotools/Makefile.am
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2015-01-10 00:23:48 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2015-01-10 00:23:48 +0000
commit6b3762e4c2a27525a07b4917a55c87136b0fade3 (patch)
tree64bdda18667613c3fe28c23182d7b95993aca9a0 /gotools/Makefile.am
parenta36ce096c32224dcb712dc7a7edeabf25a4f94bf (diff)
downloadgcc-6b3762e4c2a27525a07b4917a55c87136b0fade3.zip
gcc-6b3762e4c2a27525a07b4917a55c87136b0fade3.tar.gz
gcc-6b3762e4c2a27525a07b4917a55c87136b0fade3.tar.bz2
Makefile.am (GOCOMPILER): Set to GOC or GOC_FOR_TARGET depending on whether this is a native build or not.
* Makefile.am (GOCOMPILER): Set to GOC or GOC_FOR_TARGET depending on whether this is a native build or not. (GOCOMPILE, GOLINK): Use $(GOCOMPILER) instead of $(GOC). (MOSTLYCLEANFILES): Define. * Makefile.in: Rebuild. From-SVN: r219418
Diffstat (limited to 'gotools/Makefile.am')
-rw-r--r--gotools/Makefile.am13
1 files changed, 11 insertions, 2 deletions
diff --git a/gotools/Makefile.am b/gotools/Makefile.am
index 248bed4..8a564ff 100644
--- a/gotools/Makefile.am
+++ b/gotools/Makefile.am
@@ -28,11 +28,18 @@ STAMP = echo timestamp >
libgodir = ../$(target_noncanonical)/libgo
LIBGODEP = $(libgodir)/libgo.la
+if NATIVE
+# Use the compiler we just built.
+GOCOMPILER = $(GOC_FOR_TARGET)
+else
+GOCOMPILER = $(GOC)
+endif
+
GOCFLAGS = $(CFLAGS_FOR_TARGET)
-GOCOMPILE = $(GOC) $(GOCFLAGS)
+GOCOMPILE = $(GOCOMPILER) $(GOCFLAGS)
AM_LDFLAGS = -L $(libgodir) -L $(libgodir)/.libs -static-libgo
-GOLINK = $(GOC) $(AM_GOCFLAGS) $(LDFLAGS) $(AM_LDFLAGS) -o $@
+GOLINK = $(GOCOMPILER) $(AM_GOCFLAGS) $(LDFLAGS) $(AM_LDFLAGS) -o $@
cmdsrcdir = $(srcdir)/../libgo/go/cmd
@@ -89,6 +96,8 @@ s-zdefaultcc: Makefile
$(SHELL) $(srcdir)/../move-if-change zdefaultcc.go.tmp zdefaultcc.go
$(STAMP) $@
+MOSTLYCLEANFILES = zdefaultcc.go s-zdefaultcc
+
if NATIVE
# For a native build we build the programs using the newly built libgo