Patchwork [gccgo] Fix Make-lang.in

login
register
mail settings
Submitter Ian Taylor
Date Nov. 16, 2010, 7:01 p.m.
Message ID <mcr1v6l853w.fsf@google.com>
Download mbox | patch
Permalink /patch/71441/
State New
Headers show

Comments

Ian Taylor - Nov. 16, 2010, 7:01 p.m.
This patch makes various fixes to go/Make-lang.in based on a review by
Joseph Myers:

* Use $(LINKER) to link gccgo.
* Don't build gccgo-cross.
* Add dummy install-html target.
* Don't ignore errors for $(INSTALL_PROGRAM).
* Don't bother to chmod installed gccgo.

Committed to gccgo branch.

Ian

Patch

Index: Make-lang.in
===================================================================
--- Make-lang.in	(revision 166813)
+++ Make-lang.in	(working copy)
@@ -38,14 +38,9 @@  gospec.o: $(srcdir)/go/gospec.c $(SYSTEM
 
 GCCGO_OBJS = $(GCC_OBJS) gospec.o intl.o prefix.o version.o
 gccgo$(exeext): $(GCCGO_OBJS) $(EXTRA_GCC_OBJS) $(LIBDEPS)
-	$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ \
+	$(LINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ \
 	  $(GCCGO_OBJS) $(EXTRA_GCC_OBJS) $(LIBS)
 
-# Create a version of the g++ driver which calls the cross-compiler.
-gccgo-cross$(exeext): gccgo$(exeext)
-	-rm -f gccgo-cross$(exeext)
-	cp gccgo$(exeext) gccgo-cross$(exeext)
-
 # Use strict warnings.
 go-warn = $(STRICT_WARN)
 
@@ -72,7 +67,7 @@  go1$(exeext): $(GO_OBJS) attribs.o $(BAC
 
 # Build hooks.
 
-go.all.cross: gccgo-cross$(exeext)
+go.all.cross: gccgo$(exeext)
 go.start.encap: gccgo$(exeext)
 go.rest.encap:
 go.info:
@@ -81,6 +76,7 @@  go.dvi:
 go.pdf:
 go.install-pdf:
 go.html:
+go.install-html:
 go.srcinfo:
 go.srcextra:
 go.tags:
@@ -94,8 +90,7 @@  lang_checks += check-go
 
 go.install-common: installdirs
 	-rm -f $(DESTDIR)$(bindir)/$(GCCGO_INSTALL_NAME)$(exeext)
-	-$(INSTALL_PROGRAM) gccgo$(exeext) $(DESTDIR)$(bindir)/$(GCCGO_INSTALL_NAME)$(exeext)
-	-chmod a+x $(DESTDIR)$(bindir)/$(GCCGO_INSTALL_NAME)$(exeext)
+	$(INSTALL_PROGRAM) gccgo$(exeext) $(DESTDIR)$(bindir)/$(GCCGO_INSTALL_NAME)$(exeext)
 
 go.install-plugin:
 go.install-man: