From c0bda92b34ae9d769611b0dde5988cd22dfebe26 Mon Sep 17 00:00:00 2001 From: Armon Dadgar Date: Wed, 11 Jun 2014 10:07:38 -0700 Subject: [PATCH] scripts: Ensure OSX build works on older versions. Fixes #147. --- scripts/build.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/build.sh b/scripts/build.sh index 8e9b7b10ff..c8c3d31ebd 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -31,6 +31,12 @@ if [ "$(go env GOOS)" = "freebsd" ]; then export CGO_LDFLAGS="$CGO_LDFLAGS -extld clang" # Workaround for https://code.google.com/p/go/issues/detail?id=6845 fi +# On OSX, we need to use an older target to ensure binaries are +# compatible with older linkers +if [ "$(go env GOOS)" = "darwin" ]; then + export MACOSX_DEPLOYMENT_TARGET=10.6 +fi + # Install dependencies echo "--> Installing dependencies to speed up builds..." go get \