aboutsummaryrefslogtreecommitdiffstats
path: root/community/docker/configurable_buildmode.patch
diff options
context:
space:
mode:
Diffstat (limited to 'community/docker/configurable_buildmode.patch')
-rw-r--r--community/docker/configurable_buildmode.patch12
1 files changed, 12 insertions, 0 deletions
diff --git a/community/docker/configurable_buildmode.patch b/community/docker/configurable_buildmode.patch
new file mode 100644
index 00000000000..bc902ba4c26
--- /dev/null
+++ b/community/docker/configurable_buildmode.patch
@@ -0,0 +1,12 @@
+diff --git a/components/cli/scripts/build/dynbinary b/components/cli/scripts/build/dynbinary
+index 4feb7e7..46d910b 100755
+--- a/components/cli/scripts/build/dynbinary
++++ b/components/cli/scripts/build/dynbinary
+@@ -9,6 +9,6 @@ source ./scripts/build/.variables
+
+ echo "Building dynamically linked $TARGET"
+ export CGO_ENABLED=1
+-go build -o "${TARGET}" -tags pkcs11 --ldflags "${LDFLAGS}" -buildmode=pie "${SOURCE}"
++go build -o "${TARGET}" -tags pkcs11 --ldflags "${LDFLAGS}" -buildmode=${BUILDMODE:=pie} "${SOURCE}"
+
+ ln -sf "$(basename "${TARGET}")" build/docker