diff --git a/Makefile b/Makefile index 23872ac41..0b22f62e4 100644 --- a/Makefile +++ b/Makefile @@ -16,7 +16,9 @@ EXECUTABLE_FILES=$(shell find . -type f -executable | egrep -v '^\./(website/[ve GIT_DIRTY=$(shell test -n "`git status --porcelain`" && echo "+CHANGES" || true) GIT_COMMIT=$(shell git rev-parse --short HEAD) GIT_IMPORT=github.com/hashicorp/packer/version -GOLDFLAGS=-X $(GIT_IMPORT).GitCommit=$(GIT_COMMIT)$(GIT_DIRTY) +UNAME_S := $(shell uname -s) +LDFLAGS=-s -w +GOLDFLAGS=-X $(GIT_IMPORT).GitCommit=$(GIT_COMMIT)$(GIT_DIRTY) $(LDFLAGS) export GOLDFLAGS diff --git a/scripts/build.sh b/scripts/build.sh index 5ff399039..3d38cd069 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -125,6 +125,7 @@ if [ -n "${PACKER_DEV+x}" ]; then XC_ARCH=$(go env GOARCH) fi +export CGO_ENABLED=0 set +e ${GOX:?command not found} \ -os="${XC_OS:-$ALL_XC_OS}" \