]> code.ossystems Code Review - openembedded-core.git/commitdiff
goarch.bbclass: identify archs with Go dynamic linking support
authorMatt Madison <matt@madison.systems>
Wed, 13 Sep 2017 17:54:03 +0000 (14:54 -0300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 13 Sep 2017 21:12:19 +0000 (22:12 +0100)
Go only supports shared libraries for some architectures, so
add a variable for use elsewhere that gets a non-null value
only for those architectures.

Signed-off-by: Matt Madison <matt@madison.systems>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/goarch.bbclass

index 0c22f805183407338ea2e04a2474d11642bc086d..bfba3c97230d9bf9e35f009b4abe33e9f6b19ba8 100644 (file)
@@ -11,6 +11,16 @@ TARGET_GOARM = "${@go_map_arm(d.getVar('TARGET_ARCH'), d.getVar('TUNE_FEATURES')
 TARGET_GOTUPLE = "${TARGET_GOOS}_${TARGET_GOARCH}"
 GO_BUILD_BINDIR = "${@['bin/${HOST_GOTUPLE}','bin'][d.getVar('BUILD_GOTUPLE') == d.getVar('HOST_GOTUPLE')]}"
 
+# 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_class-native = ""
+
 # define here because everybody inherits this class
 #
 COMPATIBLE_HOST_linux-gnux32 = "null"