aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2012-02-14 18:58:48 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2012-02-14 18:58:48 +0000
commit4b386d4d6a3aafa96a50990ac36422848eef3219 (patch)
treea3c4704c6271f0c64907c0f0e7f34066d1f62748 /gcc
parent1f319dbad617f941249fd9bed3f3d05a0f8c1b93 (diff)
downloadgcc-4b386d4d6a3aafa96a50990ac36422848eef3219.zip
gcc-4b386d4d6a3aafa96a50990ac36422848eef3219.tar.gz
gcc-4b386d4d6a3aafa96a50990ac36422848eef3219.tar.bz2
re PR go/48411 (Bogusly canonicalized $target-gccgo)
PR go/48411 * Make-lang.in (gccgo-cross$(exeext)): New target. (go.all.cross): Depend on gccgo-cross$(exeext) instead of gccgo$(exeext). (go.install-common): Only install GCCGO_TARGET_INSTALL_NAME if gccgo-cross$(exeext) does not exist. From-SVN: r184221
Diffstat (limited to 'gcc')
-rw-r--r--gcc/go/ChangeLog9
-rw-r--r--gcc/go/Make-lang.in23
2 files changed, 25 insertions, 7 deletions
diff --git a/gcc/go/ChangeLog b/gcc/go/ChangeLog
index 40afb84..255b3f5 100644
--- a/gcc/go/ChangeLog
+++ b/gcc/go/ChangeLog
@@ -1,3 +1,12 @@
+2012-02-14 Ian Lance Taylor <iant@google.com>
+
+ PR go/48411
+ * Make-lang.in (gccgo-cross$(exeext)): New target.
+ (go.all.cross): Depend on gccgo-cross$(exeext) instead of
+ gccgo$(exeext).
+ (go.install-common): Only install GCCGO_TARGET_INSTALL_NAME if
+ gccgo-cross$(exeext) does not exist.
+
2012-02-07 Ian Lance Taylor <iant@google.com>
* gccgo.texi (Function Names): Document //extern instead of
diff --git a/gcc/go/Make-lang.in b/gcc/go/Make-lang.in
index 08aaafb..2994fe1 100644
--- a/gcc/go/Make-lang.in
+++ b/gcc/go/Make-lang.in
@@ -42,6 +42,13 @@ gccgo$(exeext): $(GCCGO_OBJS) $(EXTRA_GCC_OBJS) libcommon-target.a $(LIBDEPS)
$(GCCGO_OBJS) $(EXTRA_GCC_OBJS) libcommon-target.a \
$(EXTRA_GCC_LIBS) $(LIBS)
+# The cross-compiler version. This is built mainly as a signal to the
+# go.install-common target. If this executable exists, it means that
+# go.all.cross was run.
+gccgo-cross$(exeext): gccgo$(exeext)
+ -rm -f gccgo-cross$(exeext)
+ cp gccgo$(exeext) gccgo-cross$(exeext)
+
# Use strict warnings.
go-warn = $(STRICT_WARN)
@@ -107,7 +114,7 @@ gccgo.pod: go/gccgo.texi
# Build hooks.
-go.all.cross: gccgo$(exeext)
+go.all.cross: gccgo-cross$(exeext)
go.start.encap: gccgo$(exeext)
go.rest.encap:
go.info: doc/gccgo.info
@@ -136,13 +143,15 @@ check_go_parallelize = go-test.exp=*/test/\[0-57-9a-bd-hj-zA-Z\]* \
go.install-common: installdirs
-rm -f $(DESTDIR)$(bindir)/$(GCCGO_INSTALL_NAME)$(exeext)
- -rm -f $(DESTDIR)$(bindir)/$(GCCGO_TARGET_INSTALL_NAME)$(exeext)
$(INSTALL_PROGRAM) gccgo$(exeext) $(DESTDIR)$(bindir)/$(GCCGO_INSTALL_NAME)$(exeext)
- if test -f $(DESTDIR)$(bindir)$(GCCGO_TARGET_INSTALL_NAME)$(exeext); then \
- :; \
- else \
- cd $(DESTDIR)$(bindir) && \
- $(LN) $(GCCGO_INSTALL_NAME)$(exeext) $(GCCGO_TARGET_INSTALL_NAME)$(exeext); \
+ -if test -f go1$(exeext); then \
+ if test -f gccgo-cross$(exeext); then \
+ :; \
+ else \
+ rm -f $(DESTDIR)$(bindir)/$(GCCGO_TARGET_INSTALL_NAME)$(exeext); \
+ ( cd $(DESTDIR)$(bindir) && \
+ $(LN) $(GCCGO_INSTALL_NAME)$(exeext) $(GCCGO_TARGET_INSTALL_NAME)$(exeext) ); \
+ fi; \
fi
go.install-plugin: