Skip to contentSkip to conversation

goarch.bbclass: Replace logic for setting GOARM

PATCH Applied Will Newton 3 participants 5 messages Sep 18, 2017 – Oct 19, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 goarch.bbclass: Replace logic for setting GOARM

From: Will Newton <[email protected]>

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.

(From OE-Core rev: 07b60c15e9ef650940afdde37bf3f3b9c50a336d)

---
 meta/classes/goarch.bbclass | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
meta/classes/goarch.bbclass +5 -2
index 4a5b2ec787..12df88f8c4 100644
@@ -38,8 +38,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):
Signature · 1 line
2.13.5
#1 lore raw

Hi,

Is this change ok for the stable branch?

Quoted 38 lines · Will Newton

From: Will Newton <[email protected]>

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.

(From OE-Core rev: 07b60c15e9ef650940afdde37bf3f3b9c50a336d)

---
 meta/classes/goarch.bbclass | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
meta/classes/goarch.bbclass +5 -3
index 4a5b2ec787..12df88f8c4 100644
@@ -38,8 +38,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):
--

2.13.5

#2 lore raw
Quoted 1 line · Will Newton

Is this change ok for the stable branch?

Fine with me.

Signature · 3 lines
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750
Applied
#3 lore raw
In reply to Will Newton
Quoted 3 lines · Will Newton

Hi,

Is this change ok for the stable branch?

merged into staging.
thanks,
Armin

Quoted 40 lines · Will Newton
Quoted 38 lines

From: Will Newton <[email protected]>

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.

(From OE-Core rev: 07b60c15e9ef650940afdde37bf3f3b9c50a336d)

---
 meta/classes/goarch.bbclass | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
meta/classes/goarch.bbclass +5 -3
index 4a5b2ec787..12df88f8c4 100644
@@ -38,8 +38,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):
--

2.13.5

#4 lore raw

On Wed, Sep 27, 2017 at 4:08 AM, akuster808 <[email protected]> wrote:

Hi Armin,

Quoted 5 lines · Will Newton
Quoted 3 lines

Hi,

Is this change ok for the stable branch?

merged into staging.

Do you have a feel for when these changes might make their way to the pyro branch?

Thanks,

Quoted 40 lines
Quoted 39 lines · Will Newton
Quoted 38 lines

From: Will Newton <[email protected]>

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.

(From OE-Core rev: 07b60c15e9ef650940afdde37bf3f3b9c50a336d)

---
 meta/classes/goarch.bbclass | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
meta/classes/goarch.bbclass +5 -3
index 4a5b2ec787..12df88f8c4 100644
@@ -38,8 +38,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):
--

2.13.5