]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
goarch: disable dynamic linking globally
authorJose Quaresma <quaresma.jose@gmail.com>
Wed, 28 Feb 2024 18:30:07 +0000 (18:30 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 3 Mar 2024 16:28:17 +0000 (16:28 +0000)
With go-1.21 dynamic linking cause a runtime panic:

| root@qemux86-64:~# go-helloworld
| panic: runtime error: index out of range [0] with length 0
|
| goroutine 1 [running]:
| flag.init()
|         /usr/lib/go/src/flag/flag.go:1199 +0xf9

In my opinion, this would be a good trade-off so that we can update and
leave the version 1.20 for the next LTS 5.0 since we are already quite
behind on the version available upstream which already has the 1.22 available.

Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes-recipe/goarch.bbclass

index 1ebe03864fe2ff214d62057d4f8bdb5196da6c46..6899ec28e4b967f9a27ee8a8d4dd862c935feb1b 100644 (file)
@@ -38,13 +38,13 @@ 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:arm = ""
+GO_DYNLINK:aarch64 = ""
+GO_DYNLINK:x86 = ""
+GO_DYNLINK:x86-64 = ""
+GO_DYNLINK:powerpc64 = ""
+GO_DYNLINK:powerpc64le = ""
+GO_DYNLINK:class-native = ""
 GO_DYNLINK:class-nativesdk = ""
 
 # define here because everybody inherits this class