From: Will Newton Date: Fri, 8 Sep 2017 21:04:34 +0000 (-0300) Subject: goarch.bbclass: Replace logic for setting GOARM X-Git-Tag: lucaceresoli/bug-15201-perf-libtraceevent-missing~20068 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=07b60c15e9ef650940afdde37bf3f3b9c50a336d;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git goarch.bbclass: Replace logic for setting GOARM The previous logic applied a regex to TUNE_FEATURES which could set the GOARM value to 7 incorrectly, for example when dealing with an arm1176 core. Simplify to check for the presence of "armv7" instead. At the same time add a check for "armv6" and set GOARM to 6 in that case. Signed-off-by: Will Newton Signed-off-by: Otavio Salvador Signed-off-by: Richard Purdie --- diff --git a/meta/classes/goarch.bbclass b/meta/classes/goarch.bbclass index 7960ac5f9e3..0f0d8b6a60e 100644 --- a/meta/classes/goarch.bbclass +++ b/meta/classes/goarch.bbclass @@ -45,8 +45,11 @@ def go_map_arch(a, d): def go_map_arm(a, f, d): import re - if re.match('arm.*', a) and re.match('arm.*7.*', f): - return '7' + if re.match('arm.*', a): + if 'armv7' in f: + return '7' + elif 'armv6' in f: + return '6' return '' def go_map_os(o, d):