summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/classes/goarch.bbclass19
1 files changed, 11 insertions, 8 deletions
diff --git a/meta/classes/goarch.bbclass b/meta/classes/goarch.bbclass
index 7aaf26aed1..909646b8d4 100644
--- a/meta/classes/goarch.bbclass
+++ b/meta/classes/goarch.bbclass
@@ -3,18 +3,26 @@ BUILD_GOARCH = "${@go_map_arch(d.getVar('BUILD_ARCH'), d)}"
3BUILD_GOTUPLE = "${BUILD_GOOS}_${BUILD_GOARCH}" 3BUILD_GOTUPLE = "${BUILD_GOOS}_${BUILD_GOARCH}"
4HOST_GOOS = "${@go_map_os(d.getVar('HOST_OS'), d)}" 4HOST_GOOS = "${@go_map_os(d.getVar('HOST_OS'), d)}"
5HOST_GOARCH = "${@go_map_arch(d.getVar('HOST_ARCH'), d)}" 5HOST_GOARCH = "${@go_map_arch(d.getVar('HOST_ARCH'), d)}"
6HOST_GOARM = "${@go_map_arm(d.getVar('HOST_ARCH'), d.getVar('TUNE_FEATURES'), d)}" 6HOST_GOARM = "${@go_map_arm(d.getVar('HOST_ARCH'), d.getVar('BASE_GOARM'), d)}"
7HOST_GO386 = "${@go_map_386(d.getVar('HOST_ARCH'), d.getVar('TUNE_FEATURES'), d)}" 7HOST_GO386 = "${@go_map_386(d.getVar('HOST_ARCH'), d.getVar('TUNE_FEATURES'), d)}"
8HOST_GOMIPS = "${@go_map_mips(d.getVar('HOST_ARCH'), d.getVar('TUNE_FEATURES'), d)}" 8HOST_GOMIPS = "${@go_map_mips(d.getVar('HOST_ARCH'), d.getVar('TUNE_FEATURES'), d)}"
9HOST_GOTUPLE = "${HOST_GOOS}_${HOST_GOARCH}" 9HOST_GOTUPLE = "${HOST_GOOS}_${HOST_GOARCH}"
10TARGET_GOOS = "${@go_map_os(d.getVar('TARGET_OS'), d)}" 10TARGET_GOOS = "${@go_map_os(d.getVar('TARGET_OS'), d)}"
11TARGET_GOARCH = "${@go_map_arch(d.getVar('TARGET_ARCH'), d)}" 11TARGET_GOARCH = "${@go_map_arch(d.getVar('TARGET_ARCH'), d)}"
12TARGET_GOARM = "${@go_map_arm(d.getVar('TARGET_ARCH'), d.getVar('TUNE_FEATURES'), d)}" 12TARGET_GOARM = "${@go_map_arm(d.getVar('TARGET_ARCH'), d.getVar('BASE_GOARM'), d)}"
13TARGET_GO386 = "${@go_map_386(d.getVar('TARGET_ARCH'), d.getVar('TUNE_FEATURES'), d)}" 13TARGET_GO386 = "${@go_map_386(d.getVar('TARGET_ARCH'), d.getVar('TUNE_FEATURES'), d)}"
14TARGET_GOMIPS = "${@go_map_mips(d.getVar('TARGET_ARCH'), d.getVar('TUNE_FEATURES'), d)}" 14TARGET_GOMIPS = "${@go_map_mips(d.getVar('TARGET_ARCH'), d.getVar('TUNE_FEATURES'), d)}"
15TARGET_GOTUPLE = "${TARGET_GOOS}_${TARGET_GOARCH}" 15TARGET_GOTUPLE = "${TARGET_GOOS}_${TARGET_GOARCH}"
16GO_BUILD_BINDIR = "${@['bin/${HOST_GOTUPLE}','bin'][d.getVar('BUILD_GOTUPLE') == d.getVar('HOST_GOTUPLE')]}" 16GO_BUILD_BINDIR = "${@['bin/${HOST_GOTUPLE}','bin'][d.getVar('BUILD_GOTUPLE') == d.getVar('HOST_GOTUPLE')]}"
17 17
18# Use the MACHINEOVERRIDES to map ARM CPU architecture passed to GO via GOARM.
19# This is combined with *_ARCH to set HOST_GOARM and TARGET_GOARM.
20BASE_GOARM = ''
21BASE_GOARM_armv7ve = '7'
22BASE_GOARM_armv7a = '7'
23BASE_GOARM_armv6 = '6'
24BASE_GOARM_armv5 = '5'
25
18# Go supports dynamic linking on a limited set of architectures. 26# Go supports dynamic linking on a limited set of architectures.
19# See the supportsDynlink function in go/src/cmd/compile/internal/gc/main.go 27# See the supportsDynlink function in go/src/cmd/compile/internal/gc/main.go
20GO_DYNLINK = "" 28GO_DYNLINK = ""
@@ -76,12 +84,7 @@ def go_map_arch(a, d):
76def go_map_arm(a, f, d): 84def go_map_arm(a, f, d):
77 import re 85 import re
78 if re.match('arm.*', a): 86 if re.match('arm.*', a):
79 if 'armv7' in f: 87 return f
80 return '7'
81 elif 'armv6' in f:
82 return '6'
83 elif 'armv5' in f:
84 return '5'
85 return '' 88 return ''
86 89
87def go_map_386(a, f, d): 90def go_map_386(a, f, d):