update for mac

Signed-off-by: Jessica Frazelle <acidburn@docker.com>
Upstream-commit: 6c818f3e5f1bb4966c8fb54aa0c412360c9094fe
Component: engine
This commit is contained in:
Jessica Frazelle
2015-11-08 17:59:09 -08:00
parent 08e6893ada
commit 2672323db9
2 changed files with 27 additions and 3 deletions

View File

@ -25,8 +25,15 @@ if [ "$(go env GOHOSTOS)/$(go env GOHOSTARCH)" == "windows/amd64" ] && [ "$(go e
export LDFLAGS_STATIC_DOCKER="$LDFLAGS_STATIC_DOCKER -linkmode=internal"
fi
if [ "$IAMSTATIC" == "true" ]; then
export BUILDFLAGS=( "${BUILDFLAGS[@]/pkcs11 /}" ) # we cannot dlopen in pkcs11 in a static binary
if [ "$IAMSTATIC" == "true" ] && [ "$(go env GOHOSTOS)" == "linux" ] && [ "$DOCKER_EXPERIMENTAL" ]; then
if [ "${GOOS}/${GOARCH}" == "darwin/amd64" ]; then
export CGO_ENABLED=1
export CC=o64-clang
export LDFLAGS='-linkmode external -s'
export LDFLAGS_STATIC_DOCKER='-extld='${CC}
else
export BUILDFLAGS=( "${BUILDFLAGS[@]/pkcs11 /}" ) # we cannot dlopen in pkcs11 in a static binary
fi
fi
echo "Building: $DEST/$BINARY_FULLNAME"