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.
On Wed, Sep 27, 2017 at 5:01 AM, Matt Madison <[email protected]> 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 <[email protected]> > --- > 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 > [email protected] > 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 [email protected] http://lists.openembedded.org/mailman/listinfo/openembedded-core
