From ff5b9b4f5b28a73f99a25c9fa4f89fb0b0831e0e Mon Sep 17 00:00:00 2001 From: ian Date: Sat, 10 Jan 2015 00:23:48 +0000 Subject: * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@219418 138bc75d-0d04-0410-961f-82ee72b054a4 --- gotools/Makefile.am | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'gotools/Makefile.am') diff --git a/gotools/Makefile.am b/gotools/Makefile.am index 248bed4b82c..8a564ff3fa3 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 -- cgit v1.2.1