<div dir="ltr">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.</div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Sep 27, 2017 at 5:01 AM, Matt Madison <span dir="ltr"><<a href="mailto:matt@madison.systems" target="_blank">matt@madison.systems</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Move the mips32r2->mips32 rewrite to an anonymous<br>
python function, and change the GOARCH setting to<br>
use just the passed-in architecture string, to<br>
avoid an unwanted variable dependency.<br>
<br>
Signed-off-by: Matt Madison <matt@madison.systems><br>
---<br>
meta/classes/goarch.bbclass | 20 +++++++++++---------<br>
1 file changed, 11 insertions(+), 9 deletions(-)<br>
<br>
diff --git a/meta/classes/goarch.bbclass b/meta/classes/goarch.bbclass<br>
index 9ed562d..7553987 100644<br>
--- a/meta/classes/goarch.bbclass<br>
+++ b/meta/classes/goarch.bbclass<br>
@@ -43,14 +43,10 @@ def go_map_arch(a, d):<br>
return 'mips64le'<br>
elif re.match('mips64*', a):<br>
return 'mips64'<br>
- elif re.match('mips.*', a):<br>
- tf = d.getVar('TUNE_FEATURES').<wbr>split()<br>
- if 'fpu-hard' in tf and 'n32' not in tf:<br>
- if 'mips32r2' in tf:<br>
- newtf = [t for t in tf if t != 'mips32r2']<br>
- newtf.append('mips32')<br>
- d.setVar('TUNE_FEATURES', ' '.join(newtf))<br>
- return 'mips' if 'bigendian' in tf else 'mipsle'<br>
+ elif re.match('mipsel.*', a) and 'r6' not in a and '-nf' not in a and '-n32' not in a:<br>
+ return 'mipsle'<br>
+ elif re.match('mips', a) and 'r6' not in a and '-nf' not in a and '-n32' not in a:<br>
+ return 'mipsle'<br>
elif re.match('p(pc|owerpc)(64)', a):<br>
return 'ppc64'<br>
elif re.match('p(pc|owerpc)(64el)', a):<br>
@@ -74,4 +70,10 @@ def go_map_os(o, d):<br>
return 'linux'<br>
return o<br>
<br>
-<br>
+python __anonymous () {<br>
+ tf = d.getVar('TUNE_FEATURES').<wbr>split()<br>
+ if 'mips32r2' in tf:<br>
+ newtf = [t for t in tf if t != 'mips32r2']<br>
+ newtf.append('mips32')<br>
+ d.setVar('TUNE_FEATURES', ' '.join(newtf))<br>
+}<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.7.4<br>
<br>
--<br>
______________________________<wbr>_________________<br>
Openembedded-core mailing list<br>
<a href="mailto:Openembedded-core@lists.openembedded.org">Openembedded-core@lists.<wbr>openembedded.org</a><br>
<a href="http://lists.openembedded.org/mailman/listinfo/openembedded-core" rel="noreferrer" target="_blank">http://lists.openembedded.org/<wbr>mailman/listinfo/openembedded-<wbr>core</a><br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr">Christopher Larson<br>kergoth at gmail dot com<br>Founder - BitBake, OpenEmbedded, OpenZaurus<br>Senior Software Engineer, Mentor Graphics</div></div></div></div>
</div>