mirror of
https://github.com/godotengine/buildroot.git
synced 2026-01-05 14:09:53 +03:00
package/pkg-golang: do not set static linking for host target
The current logic will set the "-static" flag when building go
host packages if BR2_STATIC_LIBS is set, this will not work as
there is no support to link host packages statically.
Fix this by applying this logic only for target builds.
Signed-off-by: Mirza Krak <mirza.krak@northern.tech>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
(cherry picked from commit 60d455f20b)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
This commit is contained in:
committed by
Peter Korsgaard
parent
9f916d5505
commit
e29d015b35
@@ -58,10 +58,6 @@ define inner-golang-package
|
||||
|
||||
$(2)_WORKSPACE ?= _gopath
|
||||
|
||||
ifeq ($(BR2_STATIC_LIBS),y)
|
||||
$(2)_LDFLAGS += -extldflags '-static'
|
||||
endif
|
||||
|
||||
$(2)_BUILD_OPTS += \
|
||||
-ldflags "$$($(2)_LDFLAGS)" \
|
||||
-tags "$$($(2)_TAGS)" \
|
||||
@@ -106,6 +102,11 @@ endif
|
||||
# file.
|
||||
ifndef $(2)_BUILD_CMDS
|
||||
ifeq ($(4),target)
|
||||
|
||||
ifeq ($(BR2_STATIC_LIBS),y)
|
||||
$(2)_LDFLAGS += -extldflags '-static'
|
||||
endif
|
||||
|
||||
# Build package for target
|
||||
define $(2)_BUILD_CMDS
|
||||
$$(foreach d,$$($(2)_BUILD_TARGETS),\
|
||||
|
||||
Reference in New Issue
Block a user