Merge pull request #18197 from nalind/workaround-go-libgcc
Work around a linking problem on 32-bit arches
This commit is contained in:
commit
2ea48e9fc0
|
@ -1,4 +1,4 @@
|
||||||
// +build linux,!arm
|
// +build linux
|
||||||
|
|
||||||
// Package journald provides the log driver for forwarding server logs
|
// Package journald provides the log driver for forwarding server logs
|
||||||
// to endpoints that receive the systemd format.
|
// to endpoints that receive the systemd format.
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
// +build !linux linux,arm
|
// +build !linux
|
||||||
|
|
||||||
package journald
|
package journald
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
// +build linux,cgo,!static_build,journald,!arm
|
// +build linux,cgo,!static_build,journald
|
||||||
|
|
||||||
package journald
|
package journald
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
// +build !linux !cgo static_build !journald linux,arm
|
// +build !linux !cgo static_build !journald
|
||||||
|
|
||||||
package journald
|
package journald
|
||||||
|
|
||||||
|
|
|
@ -25,6 +25,22 @@ if [ "$(go env GOHOSTOS)/$(go env GOHOSTARCH)" == "windows/amd64" ] && [ "$(go e
|
||||||
export LDFLAGS_STATIC_DOCKER="$LDFLAGS_STATIC_DOCKER -linkmode=internal"
|
export LDFLAGS_STATIC_DOCKER="$LDFLAGS_STATIC_DOCKER -linkmode=internal"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "$(go env GOOS)" == "linux" ] ; then
|
||||||
|
case "$(go env GOARCH)" in
|
||||||
|
arm*|386)
|
||||||
|
# linking for Linux on arm or x86 needs external linking to avoid
|
||||||
|
# https://github.com/golang/go/issues/9510 until we move to Go 1.6
|
||||||
|
if [ "$IAMSTATIC" == "true" ] ; then
|
||||||
|
export EXTLDFLAGS_STATIC="$EXTLDFLAGS_STATIC -zmuldefs"
|
||||||
|
export LDFLAGS_STATIC_DOCKER="$LDFLAGS_STATIC -extldflags \"$EXTLDFLAGS_STATIC\""
|
||||||
|
|
||||||
|
else
|
||||||
|
export LDFLAGS="$LDFLAGS -extldflags -zmuldefs"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$IAMSTATIC" == "true" ] && [ "$(go env GOHOSTOS)" == "linux" ] && [ "$DOCKER_EXPERIMENTAL" ]; then
|
if [ "$IAMSTATIC" == "true" ] && [ "$(go env GOHOSTOS)" == "linux" ] && [ "$DOCKER_EXPERIMENTAL" ]; then
|
||||||
if [ "${GOOS}/${GOARCH}" == "darwin/amd64" ]; then
|
if [ "${GOOS}/${GOARCH}" == "darwin/amd64" ]; then
|
||||||
export CGO_ENABLED=1
|
export CGO_ENABLED=1
|
||||||
|
|
Loading…
Reference in New Issue