[OE-core] [PATCH] goarch.bbclass: rework mips architecture checks
Matt Madison
matt at madison.systems
Wed Sep 27 19:38:54 UTC 2017
On Wed, Sep 27, 2017 at 11:02 AM, Andre McCurdy <armccurdy at gmail.com> wrote:
> On Wed, Sep 27, 2017 at 5:01 AM, Matt Madison <matt at madison.systems> wrote:
>> Move the mips32r2->mips32 rewrite to an anonymous
>> python function, and change the GOARCH setting to
>> use just the passed-in architecture string, to
>> avoid an unwanted variable dependency.
>>
>> Signed-off-by: Matt Madison <matt at madison.systems>
>> ---
>> meta/classes/goarch.bbclass | 20 +++++++++++---------
>> 1 file changed, 11 insertions(+), 9 deletions(-)
>>
>> diff --git a/meta/classes/goarch.bbclass b/meta/classes/goarch.bbclass
>> index 9ed562d..7553987 100644
>> --- a/meta/classes/goarch.bbclass
>> +++ b/meta/classes/goarch.bbclass
>> @@ -43,14 +43,10 @@ def go_map_arch(a, d):
>> return 'mips64le'
>> 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 re.match('mipsel.*', a) and 'r6' not in a and '-nf' not in a and '-n32' not in a:
>> + return 'mipsle'
>> + elif re.match('mips', a) and 'r6' not in a and '-nf' not in a and '-n32' not in a:
>> + return 'mipsle'
>
> Should that be "mips" rather than "mipsle" ?
Yep, thanks!
-Matt
>
>> elif re.match('p(pc|owerpc)(64)', a):
>> return 'ppc64'
>> elif re.match('p(pc|owerpc)(64el)', a):
>> @@ -74,4 +70,10 @@ def go_map_os(o, d):
>> return 'linux'
>> return o
>>
More information about the Openembedded-core
mailing list