flannel: pass -extldflags '-static' on when BR2_STATIC_LIBS=y
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sun, 24 Jul 2016 14:43:46 +0000 (16:43 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sun, 24 Jul 2016 19:59:24 +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/flannel/flannel.mk

index b5f61a01b946259abe1a73bb1e9c7944aad20ab3..18c0af1605f96d3a9610402ea50ed4d4d1c3e330 100644 (file)
@@ -21,7 +21,10 @@ FLANNEL_MAKE_ENV = \
 
 FLANNEL_GLDFLAGS = \
        -X github.com/coreos/flannel/version.Version=$(FLANNEL_VERSION) \
-       -extldflags '-static'
+
+ifeq ($(BR2_STATIC_LIBS),y)
+FLANNEL_GLDFLAGS += -extldflags '-static'
+endif
 
 define FLANNEL_CONFIGURE_CMDS
        # Put sources at prescribed GOPATH location.