summaryrefslogtreecommitdiff
path: root/src/run.bash
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2013-03-29 16:33:35 -0700
committerIan Lance Taylor <iant@golang.org>2013-03-29 16:33:35 -0700
commit9a03bbb22c842fae25af564b1942eb9917d06148 (patch)
tree4068ac17b90b308053d6cc8c8585d71f505ecfe2 /src/run.bash
parentb59f45ec21700f49dd2d0f8fbf7ec1d4a758f6fc (diff)
downloadgo-9a03bbb22c842fae25af564b1942eb9917d06148.tar.gz
cmd/dist, cmd/ld: GO_EXTLINK_ENABLED=0 defaults to -linkmode=internal
Change build system to set GO_EXTLINK_ENABLED=0 by default for OS X 10.6, since the system linker has a bug and can not handle the object files generated by 6l. Fixes issue 5130. R=golang-dev, r CC=golang-dev https://codereview.appspot.com/8183043
Diffstat (limited to 'src/run.bash')
-rwxr-xr-xsrc/run.bash10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/run.bash b/src/run.bash
index df5b95b0e..b197844fe 100755
--- a/src/run.bash
+++ b/src/run.bash
@@ -83,10 +83,18 @@ set -e
go test -ldflags '-linkmode=auto'
go test -ldflags '-linkmode=internal'
case "$GOHOSTOS-$GOARCH" in
-darwin-386 | darwin-amd64 | openbsd-386 | openbsd-amd64)
+openbsd-386 | openbsd-amd64)
# test linkmode=external, but __thread not supported, so skip testtls.
go test -ldflags '-linkmode=external'
;;
+darwin-386 | darwin-amd64)
+ # linkmode=external fails on OS X 10.6 and earlier == Darwin
+ # 10.8 and earlier.
+ case $(uname -r) in
+ [0-9].* | 10.*) ;;
+ *) go test -ldflags '-linkmode=external' ;;
+ esac
+ ;;
freebsd-386 | freebsd-amd64 | linux-386 | linux-amd64 | netbsd-386 | netbsd-amd64)
go test -ldflags '-linkmode=external'
go test -ldflags '-linkmode=auto' ../testtls