diff options
-rw-r--r-- | meta/classes/goarch.bbclass | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/meta/classes/goarch.bbclass b/meta/classes/goarch.bbclass index 659b26a09e..653f035739 100644 --- a/meta/classes/goarch.bbclass +++ b/meta/classes/goarch.bbclass | |||
@@ -4,10 +4,12 @@ BUILD_GOTUPLE = "${BUILD_GOOS}_${BUILD_GOARCH}" | |||
4 | HOST_GOOS = "${@go_map_os(d.getVar('HOST_OS'), d)}" | 4 | HOST_GOOS = "${@go_map_os(d.getVar('HOST_OS'), d)}" |
5 | HOST_GOARCH = "${@go_map_arch(d.getVar('HOST_ARCH'), d)}" | 5 | HOST_GOARCH = "${@go_map_arch(d.getVar('HOST_ARCH'), d)}" |
6 | HOST_GOARM = "${@go_map_arm(d.getVar('HOST_ARCH'), d.getVar('TUNE_FEATURES'), d)}" | 6 | HOST_GOARM = "${@go_map_arm(d.getVar('HOST_ARCH'), d.getVar('TUNE_FEATURES'), d)}" |
7 | HOST_GO386 = "${@go_map_386(d.getVar('HOST_ARCH'), d.getVar('TUNE_FEATURES'), d)}" | ||
7 | HOST_GOTUPLE = "${HOST_GOOS}_${HOST_GOARCH}" | 8 | HOST_GOTUPLE = "${HOST_GOOS}_${HOST_GOARCH}" |
8 | TARGET_GOOS = "${@go_map_os(d.getVar('TARGET_OS'), d)}" | 9 | TARGET_GOOS = "${@go_map_os(d.getVar('TARGET_OS'), d)}" |
9 | TARGET_GOARCH = "${@go_map_arch(d.getVar('TARGET_ARCH'), d)}" | 10 | TARGET_GOARCH = "${@go_map_arch(d.getVar('TARGET_ARCH'), d)}" |
10 | TARGET_GOARM = "${@go_map_arm(d.getVar('TARGET_ARCH'), d.getVar('TUNE_FEATURES'), d)}" | 11 | TARGET_GOARM = "${@go_map_arm(d.getVar('TARGET_ARCH'), d.getVar('TUNE_FEATURES'), d)}" |
12 | TARGET_GO386 = "${@go_map_386(d.getVar('TARGET_ARCH'), d.getVar('TUNE_FEATURES'), d)}" | ||
11 | TARGET_GOTUPLE = "${TARGET_GOOS}_${TARGET_GOARCH}" | 13 | TARGET_GOTUPLE = "${TARGET_GOOS}_${TARGET_GOARCH}" |
12 | GO_BUILD_BINDIR = "${@['bin/${HOST_GOTUPLE}','bin'][d.getVar('BUILD_GOTUPLE') == d.getVar('HOST_GOTUPLE')]}" | 14 | GO_BUILD_BINDIR = "${@['bin/${HOST_GOTUPLE}','bin'][d.getVar('BUILD_GOTUPLE') == d.getVar('HOST_GOTUPLE')]}" |
13 | 15 | ||
@@ -66,6 +68,15 @@ def go_map_arm(a, f, d): | |||
66 | return '5' | 68 | return '5' |
67 | return '' | 69 | return '' |
68 | 70 | ||
71 | def go_map_386(a, f, d): | ||
72 | import re | ||
73 | if re.match('i.86', a): | ||
74 | if ('core2' in f) or ('corei7' in f): | ||
75 | return 'sse2' | ||
76 | else: | ||
77 | return '387' | ||
78 | return '' | ||
79 | |||
69 | def go_map_os(o, d): | 80 | def go_map_os(o, d): |
70 | if o.startswith('linux'): | 81 | if o.startswith('linux'): |
71 | return 'linux' | 82 | return 'linux' |