summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2019-04-11 21:41:37 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-04-12 09:27:47 +0100
commit9c333505897b2bf0d80737c855af31785d23435a (patch)
tree959528d3404c352e56729fef4f0e920baa6310ac
parent1658bf2dbdfe1a5b38efcc03359c9937506c120c (diff)
downloadopenembedded-core-9c333505897b2bf0d80737c855af31785d23435a.tar.gz
openembedded-core-9c333505897b2bf0d80737c855af31785d23435a.tar.bz2
openembedded-core-9c333505897b2bf0d80737c855af31785d23435a.zip
goarch.bbclass: Simplify logic
Further simplification of the go_map_arm() function. Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/goarch.bbclass11
1 files changed, 5 insertions, 6 deletions
diff --git a/meta/classes/goarch.bbclass b/meta/classes/goarch.bbclass
index 909646b8d4..166dea9dc6 100644
--- a/meta/classes/goarch.bbclass
+++ b/meta/classes/goarch.bbclass
@@ -3,13 +3,13 @@ BUILD_GOARCH = "${@go_map_arch(d.getVar('BUILD_ARCH'), d)}"
BUILD_GOTUPLE = "${BUILD_GOOS}_${BUILD_GOARCH}"
HOST_GOOS = "${@go_map_os(d.getVar('HOST_OS'), d)}"
HOST_GOARCH = "${@go_map_arch(d.getVar('HOST_ARCH'), d)}"
-HOST_GOARM = "${@go_map_arm(d.getVar('HOST_ARCH'), d.getVar('BASE_GOARM'), d)}"
+HOST_GOARM = "${@go_map_arm(d.getVar('HOST_ARCH'), d)}"
HOST_GO386 = "${@go_map_386(d.getVar('HOST_ARCH'), d.getVar('TUNE_FEATURES'), d)}"
HOST_GOMIPS = "${@go_map_mips(d.getVar('HOST_ARCH'), d.getVar('TUNE_FEATURES'), d)}"
HOST_GOTUPLE = "${HOST_GOOS}_${HOST_GOARCH}"
TARGET_GOOS = "${@go_map_os(d.getVar('TARGET_OS'), d)}"
TARGET_GOARCH = "${@go_map_arch(d.getVar('TARGET_ARCH'), d)}"
-TARGET_GOARM = "${@go_map_arm(d.getVar('TARGET_ARCH'), d.getVar('BASE_GOARM'), d)}"
+TARGET_GOARM = "${@go_map_arm(d.getVar('TARGET_ARCH'), d)}"
TARGET_GO386 = "${@go_map_386(d.getVar('TARGET_ARCH'), d.getVar('TUNE_FEATURES'), d)}"
TARGET_GOMIPS = "${@go_map_mips(d.getVar('TARGET_ARCH'), d.getVar('TUNE_FEATURES'), d)}"
TARGET_GOTUPLE = "${TARGET_GOOS}_${TARGET_GOARCH}"
@@ -81,10 +81,9 @@ def go_map_arch(a, d):
else:
raise bb.parse.SkipRecipe("Unsupported CPU architecture: %s" % a)
-def go_map_arm(a, f, d):
- import re
- if re.match('arm.*', a):
- return f
+def go_map_arm(a, d):
+ if a.startswith("arm"):
+ return d.getVar('BASE_GOARM')
return ''
def go_map_386(a, f, d):