aboutsummaryrefslogtreecommitdiffstats
path: root/testing/kubernetes/build-with-debug-info.patch
blob: 866c640fd6484f93d7449b4353a2857ade30736a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
From 7e07ff7120f2c5ed1030ed603f9bd2714c709ed6 Mon Sep 17 00:00:00 2001
From: Jan Chaloupka <jchaloup@redhat.com>
Date: Mon, 31 Oct 2016 09:02:37 +0100
Subject: [PATCH] build with debug info

---
 hack/lib/golang.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hack/lib/golang.sh b/hack/lib/golang.sh
index ccd6c0a..c29bf85 100755
--- a/hack/lib/golang.sh
+++ b/hack/lib/golang.sh
@@ -484,7 +484,7 @@ kube::golang::build_binaries_for_platform() {
       CGO_ENABLED=0 go build -o "${outfile}" \
         "${goflags[@]:+${goflags[@]}}" \
         -gcflags "${gogcflags}" \
-        -ldflags "${goldflags}" \
+        -ldflags "-B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n') ${goldflags}" \
         "${binary}"
       kube::log::progress "*"
     done
@@ -493,7 +493,7 @@ kube::golang::build_binaries_for_platform() {
       go build -o "${outfile}" \
         "${goflags[@]:+${goflags[@]}}" \
         -gcflags "${gogcflags}" \
-        -ldflags "${goldflags}" \
+        -ldflags "-B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n') ${goldflags}" \
         "${binary}"
       kube::log::progress "*"
     done
-- 
1.9.3