diff options
Diffstat (limited to 'recipes-containers/docker/files/0001-dynbinary-use-go-cross-compiler.patch')
-rw-r--r-- | recipes-containers/docker/files/0001-dynbinary-use-go-cross-compiler.patch | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/recipes-containers/docker/files/0001-dynbinary-use-go-cross-compiler.patch b/recipes-containers/docker/files/0001-dynbinary-use-go-cross-compiler.patch index ea8f4c5e..696eeaa7 100644 --- a/recipes-containers/docker/files/0001-dynbinary-use-go-cross-compiler.patch +++ b/recipes-containers/docker/files/0001-dynbinary-use-go-cross-compiler.patch | |||
@@ -35,11 +35,11 @@ Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> | |||
35 | hack/make/.binary | 37 ++++++++----------------------------- | 35 | hack/make/.binary | 37 ++++++++----------------------------- |
36 | 1 file changed, 8 insertions(+), 29 deletions(-) | 36 | 1 file changed, 8 insertions(+), 29 deletions(-) |
37 | 37 | ||
38 | diff --git a/hack/make/.binary b/hack/make/.binary | 38 | Index: import/hack/make/.binary |
39 | index 39c00cd50c..de32ad1cc7 100644 | 39 | =================================================================== |
40 | --- a/hack/make/.binary | 40 | --- import.orig/hack/make/.binary |
41 | +++ b/hack/make/.binary | 41 | +++ import/hack/make/.binary |
42 | @@ -3,7 +3,7 @@ set -e | 42 | @@ -3,7 +3,7 @@ |
43 | 43 | ||
44 | # a helper to provide ".exe" when it's appropriate | 44 | # a helper to provide ".exe" when it's appropriate |
45 | binary_extension() { | 45 | binary_extension() { |
@@ -48,7 +48,7 @@ index 39c00cd50c..de32ad1cc7 100644 | |||
48 | echo -n '.exe' | 48 | echo -n '.exe' |
49 | fi | 49 | fi |
50 | } | 50 | } |
51 | @@ -16,33 +16,12 @@ source "${MAKEDIR}/.go-autogen" | 51 | @@ -16,33 +16,12 @@ |
52 | ( | 52 | ( |
53 | export GOGC=${DOCKER_BUILD_GOGC:-1000} | 53 | export GOGC=${DOCKER_BUILD_GOGC:-1000} |
54 | 54 | ||
@@ -83,7 +83,7 @@ index 39c00cd50c..de32ad1cc7 100644 | |||
83 | windows/arm64 | linux/mips* | linux/ppc64) ;; | 83 | windows/arm64 | linux/mips* | linux/ppc64) ;; |
84 | *) | 84 | *) |
85 | BUILDFLAGS+=("-buildmode=pie") | 85 | BUILDFLAGS+=("-buildmode=pie") |
86 | @@ -54,11 +33,11 @@ source "${MAKEDIR}/.go-autogen" | 86 | @@ -66,11 +45,11 @@ |
87 | # only necessary for non-sandboxed invocation where TARGETPLATFORM is empty | 87 | # only necessary for non-sandboxed invocation where TARGETPLATFORM is empty |
88 | PLATFORM_NAME=$TARGETPLATFORM | 88 | PLATFORM_NAME=$TARGETPLATFORM |
89 | if [ -z "$PLATFORM_NAME" ]; then | 89 | if [ -z "$PLATFORM_NAME" ]; then |
@@ -100,12 +100,12 @@ index 39c00cd50c..de32ad1cc7 100644 | |||
100 | fi | 100 | fi |
101 | fi | 101 | fi |
102 | 102 | ||
103 | @@ -66,7 +45,7 @@ source "${MAKEDIR}/.go-autogen" | 103 | @@ -78,7 +57,7 @@ |
104 | if [ -n "$DOCKER_DEBUG" ]; then | 104 | if [ -n "$DOCKER_DEBUG" ]; then |
105 | set -x | 105 | set -x |
106 | fi | 106 | fi |
107 | - go build -o "$DEST/$BINARY_FULLNAME" "${BUILDFLAGS[@]}" -ldflags "$LDFLAGS $LDFLAGS_STATIC $DOCKER_LDFLAGS" ${GO_PACKAGE} | 107 | - ./hack/with-go-mod.sh go build -mod=vendor -modfile=vendor.mod -o "$DEST/$BINARY_FULLNAME" "${BUILDFLAGS[@]}" -ldflags "$LDFLAGS $LDFLAGS_STATIC $DOCKER_LDFLAGS" "$GO_PACKAGE" |
108 | + ${GO} build -trimpath -o "$DEST/$BINARY_FULLNAME" "${BUILDFLAGS[@]}" -ldflags "$LDFLAGS $LDFLAGS_STATIC $DOCKER_LDFLAGS" ${GO_PACKAGE} | 108 | + ./hack/with-go-mod.sh ${GO} build -trimpath -mod=vendor -modfile=vendor.mod -o "$DEST/$BINARY_FULLNAME" "${BUILDFLAGS[@]}" -ldflags "$LDFLAGS $LDFLAGS_STATIC $DOCKER_LDFLAGS" "$GO_PACKAGE" |
109 | ) | 109 | ) |
110 | 110 | ||
111 | echo "Created binary: $DEST/$BINARY_FULLNAME" | 111 | echo "Created binary: $DEST/$BINARY_FULLNAME" |