[Buildroot] [PATCH 2/3] flannel: pass -extldflags '-static' on when BR2_STATIC_LIBS=y
Thomas Petazzoni
thomas.petazzoni at free-electrons.com
Sun Jul 24 14:43:46 UTC 2016
There is no reason to link Go binaries statically, unless when
BR2_STATIC_LIBS=y.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni at free-electrons.com>
---
package/flannel/flannel.mk | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/package/flannel/flannel.mk b/package/flannel/flannel.mk
index b5f61a0..18c0af1 100644
--- a/package/flannel/flannel.mk
+++ b/package/flannel/flannel.mk
@@ -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.
--
2.7.4
More information about the buildroot
mailing list