]> Cypherpunks repositories - gostls13.git/commitdiff
Use the environment variable CC as the bootstrap compiler used
authorIan Lance Taylor <iant@golang.org>
Mon, 2 Nov 2009 00:13:37 +0000 (16:13 -0800)
committerIan Lance Taylor <iant@golang.org>
Mon, 2 Nov 2009 00:13:37 +0000 (16:13 -0800)
to build 6g, 6l, etc.

R=rsc
CC=go-dev
http://go/go-review/1018015

src/make.bash
src/quietgcc.bash

index 60e3f62dc8a92e1d060fdb8509dfc38e4e4a7d47..b223d23b7215b541a2cf7e2c9c220b49507c5db4 100755 (executable)
@@ -16,7 +16,8 @@ fi
 bash clean.bash
 
 rm -f $GOBIN/quietgcc
-cp quietgcc.bash $GOBIN/quietgcc
+CC=${CC:-gcc}
+sed -e "s|@CC@|$CC|" < quietgcc.bash > $GOBIN/quietgcc
 chmod +x $GOBIN/quietgcc
 
 for i in lib9 libbio libmach cmd pkg libcgo cmd/cgo cmd/ebnflint cmd/godoc cmd/gofmt
index d0476f34598f340b86d73f0d929f9eda5a47a2eb..29f22ee0ae112c90bf02e17da773f566a95a8cd1 100755 (executable)
@@ -16,15 +16,11 @@ ignore=$ignore'|: At top level: '
 ignore=$ignore'|In file included from'
 ignore=$ignore'|        from'
 
-# Figure out which cc to run.
-# Can use plain cc on real 64-bit machines
-# and on OS X, but have to use crosstool on
-# mixed64-32 machines like thresher.
-gcc=gcc
-case "`uname -a`" in
-*mixed64-32*)
-       gcc=/usr/crosstool/v10/gcc-4.2.1-glibc-2.3.2/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/bin/gcc
-esac
+# Figure out which cc to run; this is set by make.bash.
+gcc=@CC@
+if test "$gcc" = "@C""C@"; then
+  gcc=gcc
+fi
 
 # If this is a 64-bit machine, compile 64-bit versions of
 # the host tools, to match the native ptrace.