Commit 6b3762e4 by Ian Lance Taylor Committed by Ian Lance Taylor

Makefile.am (GOCOMPILER): Set to GOC or GOC_FOR_TARGET depending on whether this…

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
parent a36ce096
2015-01-09 Ian Lance Taylor <iant@google.com> 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.
* Initial implementation. * Initial implementation.
...@@ -28,11 +28,18 @@ STAMP = echo timestamp > ...@@ -28,11 +28,18 @@ STAMP = echo timestamp >
libgodir = ../$(target_noncanonical)/libgo libgodir = ../$(target_noncanonical)/libgo
LIBGODEP = $(libgodir)/libgo.la LIBGODEP = $(libgodir)/libgo.la
if NATIVE
# Use the compiler we just built.
GOCOMPILER = $(GOC_FOR_TARGET)
else
GOCOMPILER = $(GOC)
endif
GOCFLAGS = $(CFLAGS_FOR_TARGET) GOCFLAGS = $(CFLAGS_FOR_TARGET)
GOCOMPILE = $(GOC) $(GOCFLAGS) GOCOMPILE = $(GOCOMPILER) $(GOCFLAGS)
AM_LDFLAGS = -L $(libgodir) -L $(libgodir)/.libs -static-libgo 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 cmdsrcdir = $(srcdir)/../libgo/go/cmd
...@@ -89,6 +96,8 @@ s-zdefaultcc: Makefile ...@@ -89,6 +96,8 @@ s-zdefaultcc: Makefile
$(SHELL) $(srcdir)/../move-if-change zdefaultcc.go.tmp zdefaultcc.go $(SHELL) $(srcdir)/../move-if-change zdefaultcc.go.tmp zdefaultcc.go
$(STAMP) $@ $(STAMP) $@
MOSTLYCLEANFILES = zdefaultcc.go s-zdefaultcc
if NATIVE if NATIVE
# For a native build we build the programs using the newly built libgo # For a native build we build the programs using the newly built libgo
......
...@@ -53,9 +53,10 @@ build_triplet = @build@ ...@@ -53,9 +53,10 @@ build_triplet = @build@
host_triplet = @host@ host_triplet = @host@
target_triplet = @target@ target_triplet = @target@
subdir = . subdir = .
DIST_COMMON = README $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ DIST_COMMON = README ChangeLog $(srcdir)/Makefile.in \
$(top_srcdir)/configure $(am__configure_deps) \ $(srcdir)/Makefile.am $(top_srcdir)/configure \
$(srcdir)/../mkinstalldirs $(srcdir)/../depcomp $(am__configure_deps) $(srcdir)/../mkinstalldirs \
$(srcdir)/../depcomp
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \ am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \
$(top_srcdir)/../config/depstand.m4 \ $(top_srcdir)/../config/depstand.m4 \
...@@ -199,9 +200,13 @@ PWD_COMMAND = $${PWDCMD-pwd} ...@@ -199,9 +200,13 @@ PWD_COMMAND = $${PWDCMD-pwd}
STAMP = echo timestamp > STAMP = echo timestamp >
libgodir = ../$(target_noncanonical)/libgo libgodir = ../$(target_noncanonical)/libgo
LIBGODEP = $(libgodir)/libgo.la LIBGODEP = $(libgodir)/libgo.la
GOCOMPILE = $(GOC) $(GOCFLAGS) @NATIVE_FALSE@GOCOMPILER = $(GOC)
# Use the compiler we just built.
@NATIVE_TRUE@GOCOMPILER = $(GOC_FOR_TARGET)
GOCOMPILE = $(GOCOMPILER) $(GOCFLAGS)
AM_LDFLAGS = -L $(libgodir) -L $(libgodir)/.libs -static-libgo 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 cmdsrcdir = $(srcdir)/../libgo/go/cmd
go_cmd_go_files = \ go_cmd_go_files = \
$(cmdsrcdir)/go/build.go \ $(cmdsrcdir)/go/build.go \
...@@ -246,6 +251,7 @@ go_cmd_cgo_files = \ ...@@ -246,6 +251,7 @@ go_cmd_cgo_files = \
GCCGO_INSTALL_NAME := $(shell echo gccgo|sed '$(program_transform_name)') GCCGO_INSTALL_NAME := $(shell echo gccgo|sed '$(program_transform_name)')
GCC_INSTALL_NAME := $(shell echo gcc|sed '$(program_transform_name)') GCC_INSTALL_NAME := $(shell echo gcc|sed '$(program_transform_name)')
GXX_INSTALL_NAME := $(shell echo g++|sed '$(program_transform_name)') GXX_INSTALL_NAME := $(shell echo g++|sed '$(program_transform_name)')
MOSTLYCLEANFILES = zdefaultcc.go s-zdefaultcc
# For a native build we build the programs using the newly built libgo # For a native build we build the programs using the newly built libgo
# and install them as regular programs. # and install them as regular programs.
...@@ -470,6 +476,7 @@ install-strip: ...@@ -470,6 +476,7 @@ install-strip:
`test -z '$(STRIP)' || \ `test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic: mostlyclean-generic:
-test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
clean-generic: clean-generic:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment