runc: 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>
This commit is contained in:
Thomas Petazzoni 2016-07-24 16:43:47 +02:00
parent 80634e3061
commit 9101ce5800

View File

@ -19,8 +19,11 @@ RUNC_MAKE_ENV = $(HOST_GO_TARGET_ENV) \
PATH=$(BR_PATH) PATH=$(BR_PATH)
RUNC_GLDFLAGS = \ RUNC_GLDFLAGS = \
-X main.gitCommit=$(RUNC_VERSION) \ -X main.gitCommit=$(RUNC_VERSION)
-extldflags '-static'
ifeq ($(BR2_STATIC_LIBS),y)
FLANNEL_GLDFLAGS += -extldflags '-static'
endif
RUNC_GOTAGS = cgo static_build RUNC_GOTAGS = cgo static_build