docker-containerd: pass -extldflags '-static' on when BR2_STATIC_LIBS=y
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sun, 24 Jul 2016 14:43:45 +0000 (16:43 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sun, 24 Jul 2016 19:59:23 +0000 (21:59 +0200)
There is no reason to link Go binaries statically, unless when
BR2_STATIC_LIBS=y.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tested-by: Christian Stewart <christian@paral.in>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/docker-containerd/docker-containerd.mk

index b1acd441058701ae826a0a4f48b8fd77d6f30e7b..06432e9ac982df193655554e4de48392df48bf5c 100644 (file)
@@ -18,8 +18,11 @@ DOCKER_CONTAINERD_MAKE_ENV = $(HOST_GO_TARGET_ENV) \
        GOPATH="$(DOCKER_CONTAINERD_GOPATH)"
 
 DOCKER_CONTAINERD_GLDFLAGS = \
-       -X github.com/docker/containerd.GitCommit=$(DOCKER_CONTAINERD_VERSION) \
-       -extldflags '-static'
+       -X github.com/docker/containerd.GitCommit=$(DOCKER_CONTAINERD_VERSION)
+
+ifeq ($(BR2_STATIC_LIBS),y)
+DOCKER_CONTAINERD_GLDFLAGS += -extldflags '-static'
+endif
 
 define DOCKER_CONTAINERD_CONFIGURE_CMDS
        mkdir -p $(DOCKER_CONTAINERD_GOPATH)/src/github.com/docker