aboutsummaryrefslogtreecommitdiff
path: root/package/docker-containerd
diff options
context:
space:
mode:
authorGravatar Thomas Petazzoni <thomas.petazzoni@free-electrons.com>2016-07-24 16:43:45 +0200
committerGravatar Thomas Petazzoni <thomas.petazzoni@free-electrons.com>2016-07-24 21:59:23 +0200
commit98cc1cbeb69e894723c59ac6d510d5e66d525ea4 (patch)
tree23c53487568898e5a3b9847fbb605ec56eccbf64 /package/docker-containerd
parentaf127a6ddd48b7126701a98e1ebf2b40ebc6b1d8 (diff)
downloadbuildroot-98cc1cbeb69e894723c59ac6d510d5e66d525ea4.tar.gz
buildroot-98cc1cbeb69e894723c59ac6d510d5e66d525ea4.tar.bz2
docker-containerd: pass -extldflags '-static' on when BR2_STATIC_LIBS=y
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>
Diffstat (limited to 'package/docker-containerd')
-rw-r--r--package/docker-containerd/docker-containerd.mk7
1 files changed, 5 insertions, 2 deletions
diff --git a/package/docker-containerd/docker-containerd.mk b/package/docker-containerd/docker-containerd.mk
index b1acd44105..06432e9ac9 100644
--- a/package/docker-containerd/docker-containerd.mk
+++ b/package/docker-containerd/docker-containerd.mk
@@ -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