You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

43 lines
1.5 KiB

From ed6bae772c83e5bc73daec3bf9031ca235ce67e9 Mon Sep 17 00:00:00 2001
From: Jan Chaloupka <jchaloup@redhat.com>
Date: Thu, 11 Apr 2019 14:22:03 +0200
Subject: [PATCH] build with debug info
---
hack/lib/golang.sh | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/hack/lib/golang.sh b/hack/lib/golang.sh
index 7ddc0bb..e00f26b 100755
--- a/hack/lib/golang.sh
+++ b/hack/lib/golang.sh
@@ -601,7 +601,7 @@ kube::golang::build_binaries_for_platform() {
${goflags:+"${goflags[@]}"}
-gcflags "${gogcflags:-}"
-asmflags "${goasmflags:-}"
- -ldflags "${goldflags:-}"
+ -ldflags "-B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n') ${goldflags:-}"
)
CGO_ENABLED=0 kube::golang::build_some_binaries "${statics[@]}"
fi
@@ -611,7 +611,7 @@ kube::golang::build_binaries_for_platform() {
${goflags:+"${goflags[@]}"}
-gcflags "${gogcflags:-}"
-asmflags "${goasmflags:-}"
- -ldflags "${goldflags:-}"
+ -ldflags "-B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n') ${goldflags:-}"
)
kube::golang::build_some_binaries "${nonstatics[@]}"
fi
@@ -625,7 +625,7 @@ kube::golang::build_binaries_for_platform() {
${goflags:+"${goflags[@]}"} \
-gcflags "${gogcflags:-}" \
-asmflags "${goasmflags:-}" \
- -ldflags "${goldflags:-}" \
+ -ldflags "-B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n') ${goldflags:-}" \
-o "${outfile}" \
"${testpkg}"
done
--
2.7.5