[gnome-continuous-yocto/gnomeostree-3.28-rocko: 7966/8267] goarch.bbclass: rework mips architecture checks



commit b2646b5cf7850716e24ad18da1f6c27f369cb16d
Author: Matt Madison <matt@madison.systems>
Date:   Thu Sep 28 10:34:42 2017 -0700

    goarch.bbclass: rework mips architecture checks
    
    Remove the TUNE_FEATURES references from go_map_arch,
    to avoid an unwanted variable dependency.  Direct
    comparisons of the architecture name are sufficient
    for covering what Go currently supports, and using
    TUNE_CCARGS_remove adequately handles the conflict
    with the cgo-supplied flags for mips.
    
    (From OE-Core rev: 1bc4c1d880096083d1891a74024fb225a6340b9b)
    
    Signed-off-by: Matt Madison <matt@madison.systems>
    Signed-off-by: Ross Burton <ross burton intel com>
    Signed-off-by: Richard Purdie <richard purdie linuxfoundation org>

 meta/classes/goarch.bbclass |   17 +++++++----------
 1 files changed, 7 insertions(+), 10 deletions(-)
---
diff --git a/meta/classes/goarch.bbclass b/meta/classes/goarch.bbclass
index 9ed562d..659b26a 100644
--- a/meta/classes/goarch.bbclass
+++ b/meta/classes/goarch.bbclass
@@ -28,6 +28,7 @@ COMPATIBLE_HOST_linux-muslx32 = "null"
 COMPATIBLE_HOST_powerpc = "null"
 COMPATIBLE_HOST_powerpc64 = "null"
 ARM_INSTRUCTION_SET = "arm"
+TUNE_CCARGS_remove = "-march=mips32r2"
 
 def go_map_arch(a, d):
     import re
@@ -39,18 +40,14 @@ def go_map_arch(a, d):
         return 'arm'
     elif re.match('aarch64.*', a):
         return 'arm64'
-    elif re.match('mips64el*', a):
+    elif re.match('mips64el.*', a):
         return 'mips64le'
-    elif re.match('mips64*', a):
+    elif re.match('mips64.*', a):
         return 'mips64'
-    elif re.match('mips.*', a):
-        tf = d.getVar('TUNE_FEATURES').split()
-        if 'fpu-hard' in tf and 'n32' not in tf:
-            if 'mips32r2' in tf:
-                newtf = [t for t in tf if t != 'mips32r2']
-                newtf.append('mips32')
-                d.setVar('TUNE_FEATURES', ' '.join(newtf))
-            return 'mips' if 'bigendian' in tf else 'mipsle'
+    elif a == 'mips':
+        return 'mips'
+    elif a == 'mipsel':
+        return 'mipsle'
     elif re.match('p(pc|owerpc)(64)', a):
         return 'ppc64'
     elif re.match('p(pc|owerpc)(64el)', a):


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]