[OE-core] [v2][PATCH 2/2] goarch.bbclass: set TARGET_GOARM as '7' for valid cortexa* targets
Mark Asselstine
mark.asselstine at windriver.com
Thu Mar 14 20:04:14 UTC 2019
Per https://github.com/golang/go/wiki/GoArm we need to set GOARM when
building for ARMv5, ARMv6 and ARMv7. The current code in go_map_arm()
does not account for the Cortex* TUNINGs and as such misses several
Cortex variants which implement ARMv7. Here we add an additional check
that will include Cortex-A5 through Cortex-A17 as ARMv7 variants
(ie. GOARM='7'). The Cortex-R and Cortex-M variants are also captured
even though there are no tunings for these currently (lack MMU support
so not supported).
Signed-off-by: Mark Asselstine <mark.asselstine at windriver.com>
---
V2
* Cover all ARMv7 Cortex* variants
meta/classes/goarch.bbclass | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/meta/classes/goarch.bbclass b/meta/classes/goarch.bbclass
index 39fea5e..84977a5 100644
--- a/meta/classes/goarch.bbclass
+++ b/meta/classes/goarch.bbclass
@@ -74,6 +74,10 @@ def go_map_arch(a, d):
def go_map_arm(a, f, d):
import re
if re.match('arm.*', a):
+ for el in f.split():
+ m = re.match("cortex[arm](\d.*)", el)
+ if m and int(m.group(1)) < 32:
+ return '7'
if 'armv7' in f:
return '7'
elif 'armv6' in f:
--
2.7.4
More information about the Openembedded-core
mailing list