LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File build-with-debug-info.patch of Package kubernetes1.6 (Project home:jordimassaguerpla:test_k8s16)

diff --git a/hack/lib/golang.sh b/hack/lib/golang.sh
index c1259a4..9bf8243 100755
--- a/hack/lib/golang.sh
+++ b/hack/lib/golang.sh
@@ -508,7 +508,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
@@ -517,7 +517,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