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