forked from pool/docker
aeedf36a58
- Fix build for ppc64le: use static libgo for dockerd and docker-proxy as in docker build. OBS-URL: https://build.opensuse.org/request/show/423771 OBS-URL: https://build.opensuse.org/package/show/Virtualization:containers/docker?expand=0&rev=137
48 lines
1015 B
Diff
48 lines
1015 B
Diff
diff --git a/hack/make/gccgo b/hack/make/gccgo
|
|
index 54c983e..1c11bbf 100644
|
|
--- a/hack/make/gccgo
|
|
+++ b/hack/make/gccgo
|
|
@@ -1,5 +1,5 @@
|
|
#!/bin/bash
|
|
-set -e
|
|
+set -ex
|
|
|
|
BINARY_NAME="dockerd-$VERSION"
|
|
BINARY_EXTENSION="$(binary_extension)"
|
|
@@ -22,9 +22,11 @@ go build -compiler=gccgo \
|
|
"${BUILDFLAGS[@]}" \
|
|
-gccgoflags "
|
|
-g
|
|
+ -Wl,--add-needed -Wl,--no-as-needed
|
|
$EXTLDFLAGS_STATIC
|
|
+ -static-libgo
|
|
-Wl,--no-export-dynamic
|
|
- -ldl
|
|
+ -ldl -lselinux -lsystemd
|
|
-pthread
|
|
" \
|
|
./cmd/dockerd
|
|
@@ -37,7 +39,9 @@ go build -compiler=gccgo \
|
|
"${BUILDFLAGS[@]}" \
|
|
-gccgoflags "
|
|
-g
|
|
+ -Wl,--add-needed -Wl,--no-as-needed
|
|
$EXTLDFLAGS_STATIC
|
|
+ -static-libgo
|
|
-Wl,--no-export-dynamic
|
|
-ldl
|
|
-pthread
|
|
@@ -55,9 +59,11 @@ go build -compiler=gccgo \
|
|
"${BUILDFLAGS[@]}" \
|
|
-gccgoflags "
|
|
-g
|
|
+ -Wl,--add-needed -Wl,--no-as-needed
|
|
$EXTLDFLAGS_STATIC
|
|
+ -static-libgo
|
|
-Wl,--no-export-dynamic
|
|
- -ldl
|
|
+ -ldl -lselinux -lsystemd
|
|
-pthread
|
|
" \
|
|
./cmd/docker
|