<div><br><div class="gmail_quote"><div dir="auto">On Wed, Sep 27, 2017 at 8:52 AM Christopher Larson <<a href="mailto:kergoth@gmail.com">kergoth@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>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></blockquote><div dir="auto"><br></div><div dir="auto">This approach seems better than anon python</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div></div><div class="gmail_extra"><br><div class="gmail_quote"></div></div><div class="gmail_extra"><div class="gmail_quote">On Wed, Sep 27, 2017 at 5:01 AM, Matt Madison <span><<a href="mailto:matt@madison.systems" target="_blank">matt@madison.systems</a>></span> wrote:<br></div></div><div class="gmail_extra"><div class="gmail_quote"><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').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').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>
</blockquote></div></div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="m_-2383841123682171792HOEnZb"><font color="#888888">--<br>
2.7.4<br>
<br>
--<br>
_______________________________________________<br>
Openembedded-core mailing list<br>
<a href="mailto:Openembedded-core@lists.openembedded.org" target="_blank">Openembedded-core@lists.openembedded.org</a><br>
<a href="http://lists.openembedded.org/mailman/listinfo/openembedded-core" rel="noreferrer" target="_blank">http://lists.openembedded.org/mailman/listinfo/openembedded-core</a><br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="m_-2383841123682171792gmail_signature" data-smartmail="gmail_signature"><div><div><div>Christopher Larson<br>kergoth at gmail dot com<br>Founder - BitBake, OpenEmbedded, OpenZaurus<br>Senior Software Engineer, Mentor Graphics</div></div></div></div>
</div>
--<br>
_______________________________________________<br>
Openembedded-core mailing list<br>
<a href="mailto:Openembedded-core@lists.openembedded.org" target="_blank">Openembedded-core@lists.openembedded.org</a><br>
<a href="http://lists.openembedded.org/mailman/listinfo/openembedded-core" rel="noreferrer" target="_blank">http://lists.openembedded.org/mailman/listinfo/openembedded-core</a><br>
</blockquote></div></div>