mirror of
https://github.com/golang/go
synced 2024-11-25 01:47:56 -07:00
build: do not build all C compilers
In order to allow buildscript.sh to generate buildscripts for all $GOOS/$GOARCH combinations, we have to generate dummy files for cmd/go. Fixes #2586. R=rsc, golang-dev CC=golang-dev https://golang.org/cl/5557050
This commit is contained in:
parent
37d2f8190d
commit
0ae6084fef
@ -8,12 +8,9 @@ all: install
|
||||
|
||||
# Only build tools for current architecture, and only tools written in C.
|
||||
# The tools written in Go are managed by ../pkg/Makefile.
|
||||
# We need all the C compilers for rebuilding generated files in runtime.
|
||||
DIRS=\
|
||||
$(O)a\
|
||||
5c\
|
||||
6c\
|
||||
8c\
|
||||
$(O)c\
|
||||
$(O)g\
|
||||
$(O)l\
|
||||
cc\
|
||||
|
@ -29,6 +29,10 @@ cat <<'EOF'
|
||||
// AUTO-GENERATED by autogen.sh; DO NOT EDIT
|
||||
|
||||
EOF
|
||||
if [ ! -x "${GOBIN:=$GOROOT/bin}/$CC" ]; then
|
||||
echo "// dummy file for cmd/go to correctly generate buildscript"
|
||||
exit
|
||||
fi
|
||||
|
||||
case "$GOARCH" in
|
||||
386)
|
||||
@ -110,7 +114,7 @@ arm)
|
||||
esac
|
||||
echo
|
||||
|
||||
$CC $CFLAGS -a proc.c |
|
||||
$GOBIN/$CC $CFLAGS -a proc.c |
|
||||
awk '
|
||||
{ gsub(/\r/, ""); }
|
||||
/^aggr G$/ { aggr="g" }
|
||||
|
@ -27,7 +27,14 @@ cp signals_$GOOS.h signals_GOOS.h
|
||||
cat <<EOF
|
||||
// Go definitions for C variables and types.
|
||||
// AUTO-GENERATED by autogen.sh; DO NOT EDIT
|
||||
EOF
|
||||
if [ ! -x "${GOBIN:=$GOROOT/bin}/$CC" ]; then
|
||||
echo "// dummy file for cmd/go to correctly generate buildscript"
|
||||
echo "package runtime"
|
||||
exit
|
||||
fi
|
||||
|
||||
cat <<EOF
|
||||
package runtime
|
||||
import "unsafe"
|
||||
var _ unsafe.Pointer
|
||||
@ -35,7 +42,7 @@ var _ unsafe.Pointer
|
||||
EOF
|
||||
|
||||
for i in "$@"; do
|
||||
$CC $CFLAGS -q $i
|
||||
$GOBIN/$CC $CFLAGS -q $i
|
||||
done | awk '
|
||||
/^func/ { next }
|
||||
/^const/ { next }
|
||||
|
Loading…
Reference in New Issue
Block a user