diff options
-rw-r--r-- | classes/go-osarchmap.bbclass | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/classes/go-osarchmap.bbclass b/classes/go-osarchmap.bbclass index 4e00c7bf..303b30ba 100644 --- a/classes/go-osarchmap.bbclass +++ b/classes/go-osarchmap.bbclass | |||
@@ -11,6 +11,11 @@ TARGET_GOARM = "${@go_map_arm(d.getVar('TARGET_ARCH', True), d.getVar('TUNE_FEAT | |||
11 | TARGET_GOTUPLE = "${TARGET_GOOS}_${TARGET_GOARCH}" | 11 | TARGET_GOTUPLE = "${TARGET_GOOS}_${TARGET_GOARCH}" |
12 | GO_BUILD_BINDIR = "${@['bin/${HOST_GOTUPLE}','bin'][d.getVar('BUILD_GOTUPLE',True) == d.getVar('HOST_GOTUPLE',True)]}" | 12 | GO_BUILD_BINDIR = "${@['bin/${HOST_GOTUPLE}','bin'][d.getVar('BUILD_GOTUPLE',True) == d.getVar('HOST_GOTUPLE',True)]}" |
13 | 13 | ||
14 | python() { | ||
15 | if d.getVar('TARGET_GOARCH') == 'INVALID': | ||
16 | raise bb.parse.SkipPackage('Cannot map `%s` to a go architecture' % d.getVar('TARGET_ARCH', True)) | ||
17 | } | ||
18 | |||
14 | def go_map_arch(a, d): | 19 | def go_map_arch(a, d): |
15 | import re | 20 | import re |
16 | if re.match('i.86', a): | 21 | if re.match('i.86', a): |
@@ -24,7 +29,7 @@ def go_map_arch(a, d): | |||
24 | elif re.match('p(pc|owerpc)(|64)', a): | 29 | elif re.match('p(pc|owerpc)(|64)', a): |
25 | return 'powerpc' | 30 | return 'powerpc' |
26 | else: | 31 | else: |
27 | bb.error("cannot map '%s' to a Go architecture" % a) | 32 | return 'INVALID' |
28 | 33 | ||
29 | def go_map_arm(a, f, d): | 34 | def go_map_arm(a, f, d): |
30 | import re | 35 | import re |