diff mbox

[2/3] flannel: pass -extldflags '-static' on when BR2_STATIC_LIBS=y

Message ID 1469371427-25201-2-git-send-email-thomas.petazzoni@free-electrons.com
State Accepted
Headers show

Commit Message

Thomas Petazzoni July 24, 2016, 2:43 p.m. UTC
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>
---
 package/flannel/flannel.mk | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Comments

Christian Stewart July 24, 2016, 7:37 p.m. UTC | #1
Thomas,

Works fine, tested on aarch64, arm, and x86-64.

Tested-by: Christian Stewart <christian@paral.in>

On Sun, Jul 24, 2016 at 7:43 AM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> There is no reason to link Go binaries statically, unless when
> BR2_STATIC_LIBS=y.

Best,
Christian
diff mbox

Patch

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.