diff mbox

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

Message ID 1469371427-25201-3-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/runc/runc.mk | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

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/runc/runc.mk b/package/runc/runc.mk
index 1396e0c..7ebba57 100644
--- a/package/runc/runc.mk
+++ b/package/runc/runc.mk
@@ -19,8 +19,11 @@  RUNC_MAKE_ENV = $(HOST_GO_TARGET_ENV) \
 	PATH=$(BR_PATH)
 
 RUNC_GLDFLAGS = \
-	-X main.gitCommit=$(RUNC_VERSION) \
-	-extldflags '-static'
+	-X main.gitCommit=$(RUNC_VERSION)
+
+ifeq ($(BR2_STATIC_LIBS),y)
+FLANNEL_GLDFLAGS += -extldflags '-static'
+endif
 
 RUNC_GOTAGS = cgo static_build