1
0
mirror of https://github.com/golang/go synced 2024-11-24 23:57:57 -07:00

build: build correct cmd/dist matching GOHOSTARCH

Fix for issue 3210 comment #1.

R=adg, rsc
CC=golang-dev
https://golang.org/cl/5794057
This commit is contained in:
Shenghou Ma 2012-03-13 03:34:22 +08:00
parent 0359621241
commit 72801291d6

View File

@ -86,7 +86,14 @@ echo cmd/dist
export GOROOT="$(cd .. && pwd)"
GOROOT_FINAL="${GOROOT_FINAL:-$GOROOT}"
DEFGOROOT='-DGOROOT_FINAL="'"$GOROOT_FINAL"'"'
gcc -O2 -Wall -Werror -ggdb -o cmd/dist/dist -Icmd/dist "$DEFGOROOT" cmd/dist/*.c
mflag=""
case "$GOHOSTARCH" in
386) mflag=-m32;;
amd64) mflag=-m64;;
esac
gcc $mflag -O2 -Wall -Werror -ggdb -o cmd/dist/dist -Icmd/dist "$DEFGOROOT" cmd/dist/*.c
eval $(./cmd/dist/dist env -p)
echo