Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] goarch.bbclass: Disable GO_DYNLINK by default
@ 2021-08-21 20:09 Oliver Kranz
  2021-08-21 20:26 ` [OE-core] " Konrad Weihmann
  0 siblings, 1 reply; 4+ messages in thread
From: Oliver Kranz @ 2021-08-21 20:09 UTC (permalink / raw)
  To: openembedded-core; +Cc: raj.khem, Oliver Kranz

Static linking has the following benefits:
 - go-md2man (-> podman) compiles
 - imagesize reduces, combined linking overhead needs
    to be > 37643776 (go-runtime) for dynamic linking
    to be beneficial
 - reflects the default golang setup

User can still enable it, if they needs to.
docker-ce, k3s, skopeo are ignoring the flag anyways.

Signed-off-by: Oliver Kranz <o.kranz.88@gmail.com>
---
 meta/classes/goarch.bbclass | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/meta/classes/goarch.bbclass b/meta/classes/goarch.bbclass
index 92fec16b82..6e9128e44a 100644
--- a/meta/classes/goarch.bbclass
+++ b/meta/classes/goarch.bbclass
@@ -31,15 +31,7 @@ BASE_GOARM:armv5 = '5'
 
 # Go supports dynamic linking on a limited set of architectures.
 # See the supportsDynlink function in go/src/cmd/compile/internal/gc/main.go
-GO_DYNLINK = ""
-GO_DYNLINK:arm ?= "1"
-GO_DYNLINK:aarch64 ?= "1"
-GO_DYNLINK:x86 ?= "1"
-GO_DYNLINK:x86-64 ?= "1"
-GO_DYNLINK:powerpc64 ?= "1"
-GO_DYNLINK:powerpc64le ?= "1"
-GO_DYNLINK:class-native ?= ""
-GO_DYNLINK:class-nativesdk = ""
+GO_DYNLINK ?= ""
 
 # define here because everybody inherits this class
 #
-- 
2.32.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-08-22 10:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-08-21 20:09 [PATCH] goarch.bbclass: Disable GO_DYNLINK by default Oliver Kranz
2021-08-21 20:26 ` [OE-core] " Konrad Weihmann
2021-08-21 22:31   ` Oliver Kranz
2021-08-22 10:31     ` Robert Berger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox