From cceec1556eea9b83f494104ceb70a11ea20cb481 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Fri, 4 May 2018 16:23:51 +0000 Subject: [PATCH] re PR go/85630 (GCC 8.1.0: Filesystem pollution during build: .cache dir in $HOME) PR go/85630 * Makefile.am (CHECK_ENV): Set GOCACHE. (ECHO_ENV): Update for setting of GOCACHE. * Makefile.in: Rebuild. From-SVN: r259937 --- gotools/ChangeLog | 7 +++++++ gotools/Makefile.am | 4 +++- gotools/Makefile.in | 6 ++++-- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/gotools/ChangeLog b/gotools/ChangeLog index e96be448f42..cac11df05ac 100644 --- a/gotools/ChangeLog +++ b/gotools/ChangeLog @@ -1,3 +1,10 @@ +2018-05-04 Ian Lance Taylor + + PR go/85630 + * Makefile.am (CHECK_ENV): Set GOCACHE. + (ECHO_ENV): Update for setting of GOCACHE. + * Makefile.in: Rebuild. + 2018-21-03 Uros Bizjak * Makefile.am (check-runtime): Pass -test.timeout diff --git a/gotools/Makefile.am b/gotools/Makefile.am index fb5db639ef8..ba5f283e33f 100644 --- a/gotools/Makefile.am +++ b/gotools/Makefile.am @@ -218,11 +218,13 @@ CHECK_ENV = \ export LD_LIBRARY_PATH; \ GOROOT=$${abs_libgodir}; \ export GOROOT; \ + GOCACHE=$(abs_builddir)/gocache-test; \ + export GOCACHE; \ fl1="FA"; fl2="IL"; fl="$${fl1}$${fl2}"; # ECHO_ENV is a variant of CHECK_ENV to put into a testlog file. # It assumes that abs_libgodir is set. -ECHO_ENV = PATH=`echo $(abs_builddir):$${PATH} | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'` GCCGO='$(abs_builddir)/check-gccgo' CC='$(abs_builddir)/check-gcc' GCCGOTOOLDIR='$(abs_builddir)' GO_TESTING_GOTOOLS=yes LD_LIBRARY_PATH=`echo $${abs_libgodir}/.libs:$${LD_LIBRARY_PATH} | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'` GOROOT=`echo $${abs_libgodir}` +ECHO_ENV = PATH=`echo $(abs_builddir):$${PATH} | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'` GCCGO='$(abs_builddir)/check-gccgo' CC='$(abs_builddir)/check-gcc' GCCGOTOOLDIR='$(abs_builddir)' GO_TESTING_GOTOOLS=yes LD_LIBRARY_PATH=`echo $${abs_libgodir}/.libs:$${LD_LIBRARY_PATH} | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'` GOROOT=`echo $${abs_libgodir} GOCACHE='$(abs_builddir)/gocache-test'` # check-go-tool runs `go test cmd/go` in our environment. check-go-tool: go$(EXEEXT) $(noinst_PROGRAMS) check-head check-gccgo check-gcc diff --git a/gotools/Makefile.in b/gotools/Makefile.in index 13b13eed286..8e60e9f26ef 100644 --- a/gotools/Makefile.in +++ b/gotools/Makefile.in @@ -370,12 +370,14 @@ MOSTLYCLEANFILES = \ @NATIVE_TRUE@ export LD_LIBRARY_PATH; \ @NATIVE_TRUE@ GOROOT=$${abs_libgodir}; \ @NATIVE_TRUE@ export GOROOT; \ +@NATIVE_TRUE@ GOCACHE=$(abs_builddir)/gocache-test; \ +@NATIVE_TRUE@ export GOCACHE; \ @NATIVE_TRUE@ fl1="FA"; fl2="IL"; fl="$${fl1}$${fl2}"; # ECHO_ENV is a variant of CHECK_ENV to put into a testlog file. # It assumes that abs_libgodir is set. -@NATIVE_TRUE@ECHO_ENV = PATH=`echo $(abs_builddir):$${PATH} | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'` GCCGO='$(abs_builddir)/check-gccgo' CC='$(abs_builddir)/check-gcc' GCCGOTOOLDIR='$(abs_builddir)' GO_TESTING_GOTOOLS=yes LD_LIBRARY_PATH=`echo $${abs_libgodir}/.libs:$${LD_LIBRARY_PATH} | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'` GOROOT=`echo $${abs_libgodir}` +@NATIVE_TRUE@ECHO_ENV = PATH=`echo $(abs_builddir):$${PATH} | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'` GCCGO='$(abs_builddir)/check-gccgo' CC='$(abs_builddir)/check-gcc' GCCGOTOOLDIR='$(abs_builddir)' GO_TESTING_GOTOOLS=yes LD_LIBRARY_PATH=`echo $${abs_libgodir}/.libs:$${LD_LIBRARY_PATH} | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'` GOROOT=`echo $${abs_libgodir} GOCACHE='$(abs_builddir)/gocache-test'` all: all-am .SUFFIXES: @@ -635,8 +637,8 @@ distclean-generic: maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -@NATIVE_FALSE@uninstall-local: @NATIVE_FALSE@install-exec-local: +@NATIVE_FALSE@uninstall-local: clean: clean-am clean-am: clean-binPROGRAMS clean-generic clean-noinstPROGRAMS \ -- 2.30.2