From bec14dfead2251b6f89c6bc5a3a8d53e4acdde17 Mon Sep 17 00:00:00 2001
From: Jan Chaloupka <jchaloup@redhat.com>
Date: Thu, 14 May 2015 11:08:56 +0200
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 9bd64c9..127bf8b 100644
--- a/hack/lib/golang.sh
+++ b/hack/lib/golang.sh
@@ -324,12 +324,12 @@ kube::golang::build_binaries_for_platform() {
if kube::golang::is_statically_linked_library "${binary}"; then
CGO_ENABLED=0 go build -o "${output_path}/${bin}" \
"${goflags[@]:+${goflags[@]}}" \
- -ldflags "${version_ldflags}" \
+ -ldflags "-B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n') ${version_ldflags}" \
"${binary}"
else
go build -o "${output_path}/${bin}" \
"${goflags[@]:+${goflags[@]}}" \
- -ldflags "${version_ldflags}" \
+ -ldflags "-B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n') ${version_ldflags}" \
"${binary}"
fi
kube::log::progress "*"
--
1.9.3