* gotools patch committed: Fix for non-bootstrap case
@ 2015-01-10 1:01 Ian Lance Taylor
0 siblings, 0 replies; only message in thread
From: Ian Lance Taylor @ 2015-01-10 1:01 UTC (permalink / raw)
To: gcc-patches, gofrontend-dev
[-- Attachment #1: Type: text/plain, Size: 549 bytes --]
When not bootstrapping, the newly built Go compiler is not passed down
to the Go tools as GOC. This patch changes the gotools Makefile to
use GOC_FOR_TARGET for a native build. I also set MOSTLYCLEANFILES.
Bootstrapped on x86_64-unknown-linux-gnu. Committed to mainline.
Ian
2015-01-09 Ian Lance Taylor <iant@google.com>
* 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.
[-- Attachment #2: foo.txt --]
[-- Type: text/plain, Size: 999 bytes --]
Index: Makefile.am
===================================================================
--- Makefile.am (revision 219408)
+++ Makefile.am (working copy)
@@ -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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-01-10 0:23 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-10 1:01 gotools patch committed: Fix for non-bootstrap case Ian Lance Taylor
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).