diff options
| author | Matt Madison <matt@madison.systems> | 2017-09-28 10:34:42 -0700 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-10-07 23:20:39 +0100 |
| commit | b2646b5cf7850716e24ad18da1f6c27f369cb16d (patch) | |
| tree | 3f72bc885fe728b988f45e349094f3dec2b521f2 | |
| parent | 748356ff34899ce74d3d682e13d05b8bc2bc05e3 (diff) | |
| download | poky-b2646b5cf7850716e24ad18da1f6c27f369cb16d.tar.gz | |
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>
| -rw-r--r-- | 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 9ed562d5ab..659b26a09e 100644 --- a/meta/classes/goarch.bbclass +++ b/meta/classes/goarch.bbclass | |||
| @@ -28,6 +28,7 @@ COMPATIBLE_HOST_linux-muslx32 = "null" | |||
| 28 | COMPATIBLE_HOST_powerpc = "null" | 28 | COMPATIBLE_HOST_powerpc = "null" |
| 29 | COMPATIBLE_HOST_powerpc64 = "null" | 29 | COMPATIBLE_HOST_powerpc64 = "null" |
| 30 | ARM_INSTRUCTION_SET = "arm" | 30 | ARM_INSTRUCTION_SET = "arm" |
| 31 | TUNE_CCARGS_remove = "-march=mips32r2" | ||
| 31 | 32 | ||
| 32 | def go_map_arch(a, d): | 33 | def go_map_arch(a, d): |
| 33 | import re | 34 | import re |
| @@ -39,18 +40,14 @@ def go_map_arch(a, d): | |||
| 39 | return 'arm' | 40 | return 'arm' |
| 40 | elif re.match('aarch64.*', a): | 41 | elif re.match('aarch64.*', a): |
| 41 | return 'arm64' | 42 | return 'arm64' |
| 42 | elif re.match('mips64el*', a): | 43 | elif re.match('mips64el.*', a): |
| 43 | return 'mips64le' | 44 | return 'mips64le' |
| 44 | elif re.match('mips64*', a): | 45 | elif re.match('mips64.*', a): |
| 45 | return 'mips64' | 46 | return 'mips64' |
| 46 | elif re.match('mips.*', a): | 47 | elif a == 'mips': |
| 47 | tf = d.getVar('TUNE_FEATURES').split() | 48 | return 'mips' |
| 48 | if 'fpu-hard' in tf and 'n32' not in tf: | 49 | elif a == 'mipsel': |
| 49 | if 'mips32r2' in tf: | 50 | return 'mipsle' |
| 50 | newtf = [t for t in tf if t != 'mips32r2'] | ||
| 51 | newtf.append('mips32') | ||
| 52 | d.setVar('TUNE_FEATURES', ' '.join(newtf)) | ||
| 53 | return 'mips' if 'bigendian' in tf else 'mipsle' | ||
| 54 | elif re.match('p(pc|owerpc)(64)', a): | 51 | elif re.match('p(pc|owerpc)(64)', a): |
| 55 | return 'ppc64' | 52 | return 'ppc64' |
| 56 | elif re.match('p(pc|owerpc)(64el)', a): | 53 | elif re.match('p(pc|owerpc)(64el)', a): |
