finally, use code generation for INITSHA1 & INITPATH too

Signed-off-by: Michael Hudson-Doyle <michael.hudson@linaro.org>
Upstream-commit: c7c620dd9fce0e7b437ee185c7a58341f3b8e3aa
Component: engine
This commit is contained in:
Michael Hudson-Doyle
2014-10-08 15:31:43 +13:00
parent c15381784d
commit e41a8afa7b
5 changed files with 30 additions and 8 deletions

View File

@ -47,7 +47,16 @@ fi
# exported so that "dyntest" can easily access it later without recalculating it
(
export LDFLAGS_STATIC_DOCKER="-X $DOCKER_PKG/dockerversion.INITSHA1 \"$DOCKER_INITSHA1\" -X $DOCKER_PKG/dockerversion.INITPATH \"$DOCKER_INITPATH\""
export LDFLAGS_STATIC_DOCKER=""
cat > dockerversion/init.go <<EOF
// AUTOGENERATED FILE; see hack/make/dynbinary, hack/make/dyntest-integration and dyntest-unit
package dockerversion
func init() {
INITSHA1 = "$DOCKER_INITSHA1"
INITPATH = "$DOCKER_INITPATH"
}
EOF
export IAMSTATIC=false
export BUILDFLAGS=( "${BUILDFLAGS[@]/netgo /}" ) # disable netgo, since we don't need it for a dynamic binary
source "$(dirname "$BASH_SOURCE")/binary"