Commit a5fe79ef authored by Shenghou Ma's avatar Shenghou Ma Committed by Rob Pike

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
parent 9ad236ab
......@@ -622,6 +622,10 @@ install(char *dir)
// clang is too smart about unused command-line 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");
......
......@@ -111,6 +111,10 @@ case "$GOHOSTARCH" in
386) mflag=-m32;;
amd64) mflag=-m64;;
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
eval $(./cmd/dist/dist env -p)
......
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