[OE-core] [PATCH] goarch.bbclass: rework mips architecture checks
Khem Raj
raj.khem at gmail.com
Wed Sep 27 16:33:03 UTC 2017
On Wed, Sep 27, 2017 at 8:52 AM Christopher Larson <kergoth at gmail.com>
wrote:
> Another option is to use contains() for this. The signature generation
> code knows how to handle contains specially, only depending on the presence
> of the specified value in the list, rather than the entirety.
>
This approach seems better than anon python
>
> 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'
>> 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
>>
>> -
>> +python __anonymous () {
>> + tf = d.getVar('TUNE_FEATURES').split()
>> + if 'mips32r2' in tf:
>> + newtf = [t for t in tf if t != 'mips32r2']
>> + newtf.append('mips32')
>> + d.setVar('TUNE_FEATURES', ' '.join(newtf))
>> +}
>>
> --
>> 2.7.4
>>
>> --
>> _______________________________________________
>> Openembedded-core mailing list
>> Openembedded-core at lists.openembedded.org
>> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>>
>
>
>
> --
> Christopher Larson
> kergoth at gmail dot com
> Founder - BitBake, OpenEmbedded, OpenZaurus
> Senior Software Engineer, Mentor Graphics
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core at lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20170927/ac7bf812/attachment-0002.html>
More information about the Openembedded-core
mailing list