1
0
mirror of https://github.com/golang/go synced 2024-11-12 10:20:27 -07:00

cmd/dist, make.bash: pass -mmacosx-version-min=10.6 to gcc on Darwin

Fixes #5261.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/8798044
This commit is contained in:
Shenghou Ma 2013-04-16 13:30:52 -07:00 committed by Rob Pike
parent 9ad236ab72
commit a5fe79ef78
2 changed files with 8 additions and 0 deletions

View File

@ -622,6 +622,10 @@ install(char *dir)
// clang is too smart about unused command-line arguments // clang is too smart about unused command-line arguments
vadd(&gccargs, "-Qunused-arguments"); vadd(&gccargs, "-Qunused-arguments");
} }
if(streq(gohostos, "darwin")) {
// golang.org/issue/5261
vadd(&gccargs, "-mmacosx-version-min=10.6");
}
} }
islib = hasprefix(dir, "lib") || streq(dir, "cmd/cc") || streq(dir, "cmd/gc"); islib = hasprefix(dir, "lib") || streq(dir, "cmd/cc") || streq(dir, "cmd/gc");

View File

@ -111,6 +111,10 @@ case "$GOHOSTARCH" in
386) mflag=-m32;; 386) mflag=-m32;;
amd64) mflag=-m64;; amd64) mflag=-m64;;
esac esac
if [ "$(uname)" == "Darwin" ]; then
# golang.org/issue/5261
mflag="$mflag -mmacosx-version-min=10.6"
fi
${CC:-gcc} $mflag -O2 -Wall -Werror -o cmd/dist/dist -Icmd/dist "$DEFGOROOT" cmd/dist/*.c ${CC:-gcc} $mflag -O2 -Wall -Werror -o cmd/dist/dist -Icmd/dist "$DEFGOROOT" cmd/dist/*.c
eval $(./cmd/dist/dist env -p) eval $(./cmd/dist/dist env -p)