File build-with-debug-info.patch of Package kubernetes
Index: kubernetes-1.7.0/hack/lib/golang.sh
===================================================================
--- kubernetes-1.7.0.orig/hack/lib/golang.sh
+++ kubernetes-1.7.0/hack/lib/golang.sh
@@ -505,7 +505,7 @@ kube::golang::build_binaries_for_platfor
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
@@ -514,7 +514,7 @@ kube::golang::build_binaries_for_platfor
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