Commit 84f67eb8 authored by Ian Lance Taylor's avatar Ian Lance Taylor

Build libcgo.so with $(CC), not the gcc on PATH.

Change make.bash to make sure that $(CC) is defined to match
the compiler used to build the tools.

R=rsc
CC=golang-dev
https://golang.org/cl/1853041
parent 5958fd7f
......@@ -26,13 +26,13 @@ LDFLAGS_freebsd=-pthread -shared -lm
LDFLAGS_windows=-shared -lm -mthreads
%.o: %.c
gcc $(CFLAGS_$(GOARCH)) -O2 -fPIC -o $@ -c $*.c
$(CC) $(CFLAGS_$(GOARCH)) -O2 -fPIC -o $@ -c $*.c
%.o: %.S
gcc $(CFLAGS_$(GOARCH)) -O2 -fPIC -o $@ -c $*.S
$(CC) $(CFLAGS_$(GOARCH)) -O2 -fPIC -o $@ -c $*.S
libcgo.so: $(OFILES)
gcc $(CFLAGS_$(GOARCH)) -o libcgo.so $(OFILES) $(LDFLAGS_$(GOOS))
$(CC) $(CFLAGS_$(GOARCH)) -o libcgo.so $(OFILES) $(LDFLAGS_$(GOOS))
$(QUOTED_GOROOT)/pkg/$(GOOS)_$(GOARCH)/libcgo.so: libcgo.so
cp libcgo.so $(QUOTED_GOROOT)/pkg/$(GOOS)_$(GOARCH)
......
......@@ -12,6 +12,7 @@ unset CDPATH # in case user has it set
rm -f "$GOBIN"/quietgcc
CC=${CC:-gcc}
export CC
sed -e "s|@CC@|$CC|" < "$GOROOT"/src/quietgcc.bash > "$GOBIN"/quietgcc
chmod +x "$GOBIN"/quietgcc
......
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