summaryrefslogtreecommitdiffstats
path: root/recipes-containers/docker/files/0001-dynbinary-use-go-cross-compiler.patch
diff options
context:
space:
mode:
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.patch14
1 files changed, 6 insertions, 8 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 160a3bca..9079d81e 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
@@ -48,7 +48,7 @@ Index: import/hack/make/.binary
48 echo -n '.exe' 48 echo -n '.exe'
49 fi 49 fi
50 } 50 }
51@@ -16,33 +16,12 @@ 51@@ -16,31 +16,10 @@
52 ( 52 (
53 export GOGC=${DOCKER_BUILD_GOGC:-1000} 53 export GOGC=${DOCKER_BUILD_GOGC:-1000}
54 54
@@ -73,17 +73,15 @@ Index: import/hack/make/.binary
73- fi 73- fi
74- fi 74- fi
75- 75-
76 # -buildmode=pie is not supported on Windows arm64 and Linux mips*, ppc64be
77 # https://github.com/golang/go/blob/go1.19.4/src/cmd/internal/sys/supported.go#L125-L132
78 if ! [ "$DOCKER_STATIC" = "1" ]; then 76 if ! [ "$DOCKER_STATIC" = "1" ]; then
79 # -buildmode=pie not supported when -race is enabled 77 # -buildmode=pie not supported when -race is enabled
80 if [[ " $BUILDFLAGS " != *" -race "* ]]; then 78 if [[ " $BUILDFLAGS " != *" -race "* ]]; then
81- case "$(go env GOOS)/$(go env GOARCH)" in 79- case "$(go env GOOS)/$(go env GOARCH)" in
82+ case "$(${GO} env GOOS)/$(${GO} env GOARCH)" in 80+ case "$(${GO} env GOOS)/$(${GO} env GOARCH)" in
83 windows/arm64 | linux/mips* | linux/ppc64) ;; 81 linux/mips* | linux/ppc64)
84 *) 82 # -buildmode=pie is not supported on Linux mips*, ppc64be
85 BUILDFLAGS+=("-buildmode=pie") 83 # https://github.com/golang/go/blob/go1.23.0/src/internal/platform/supported.go#L189-L197
86@@ -66,11 +45,11 @@ 84@@ -67,11 +46,11 @@
87 # only necessary for non-sandboxed invocation where TARGETPLATFORM is empty 85 # only necessary for non-sandboxed invocation where TARGETPLATFORM is empty
88 PLATFORM_NAME=$TARGETPLATFORM 86 PLATFORM_NAME=$TARGETPLATFORM
89 if [ -z "$PLATFORM_NAME" ]; then 87 if [ -z "$PLATFORM_NAME" ]; then
@@ -100,7 +98,7 @@ Index: import/hack/make/.binary
100 fi 98 fi
101 fi 99 fi
102 100
103@@ -82,7 +61,7 @@ 101@@ -95,7 +74,7 @@
104 if [ -n "$DOCKER_DEBUG" ]; then 102 if [ -n "$DOCKER_DEBUG" ]; then
105 set -x 103 set -x
106 fi 104 fi