Skip to content

Commit 0a53813

Browse files
committed
Fix static builds in go1.4
golang/go#9344
1 parent f90ad57 commit 0a53813

File tree

7 files changed

+7
-7
lines changed

7 files changed

+7
-7
lines changed

build/hello-kubernetes/prepare.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@
1717
set -e
1818
set -x
1919

20-
CGO_ENABLED=0 go build -a -ldflags '-extldflags "-static" -s' hello.go
20+
CGO_ENABLED=0 go build -a -installsuffix cgo -ldflags '-extldflags "-static" -s' hello.go

cluster/addons/dns/kube2sky/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
all: kube2sky
22

33
kube2sky: kube2sky.go
4-
CGO_ENABLED=0 go build -a --ldflags '-w' ./kube2sky.go
4+
CGO_ENABLED=0 go build -a -installsuffix cgo --ldflags '-w' ./kube2sky.go
55

66
container: kube2sky
77
sudo docker build -t kubernetes/kube2sky .

cluster/addons/dns/skydns/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
all: skydns
22

33
skydns:
4-
CGO_ENABLED=0 go build -a --ldflags '-w' github.com/skynetservices/skydns
4+
CGO_ENABLED=0 go build -a -installsuffix cgo --ldflags '-w' github.com/skynetservices/skydns
55

66
container: skydns
77
sudo docker build -t kubernetes/skydns .

contrib/for-demos/serve_hostname/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
all: serve_hostname
22

33
serve_hostname: serve_hostname.go
4-
CGO_ENABLED=0 go build -a --ldflags '-w' ./serve_hostname.go
4+
CGO_ENABLED=0 go build -a -installsuffix cgo --ldflags '-w' ./serve_hostname.go
55

66
container: serve_hostname
77
sudo docker build -t kubernetes/serve_hostname .

contrib/for-demos/test-webserver/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
all: push
22

33
test-webserver: test-webserver.go
4-
CGO_ENABLED=0 GOOS=linux go build -a -tags netgo -ldflags '-w' ./test-webserver.go
4+
CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -ldflags '-w' ./test-webserver.go
55

66
container: test-webserver
77
sudo docker build -t kubernetes/test-webserver .

contrib/for-tests/network-tester/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
all: push
22

33
webserver: webserver.go
4-
CGO_ENABLED=0 GOOS=linux go build -a -tags netgo -ldflags '-w' ./webserver.go
4+
CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -ldflags '-w' ./webserver.go
55

66
container: webserver
77
sudo docker build -t kubernetes/nettest .

examples/liveness/image/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
all: push
22

33
server: server.go
4-
CGO_ENABLED=0 GOOS=linux go build -a -tags netgo -ldflags '-w' ./server.go
4+
CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -ldflags '-w' ./server.go
55

66
container: server
77
docker build -t kubernetes/liveness .

0 commit comments

Comments
 (0)