<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Apr 10, 2014 at 9:15 AM, Mike Crowe <span dir="ltr">&lt;<a href="mailto:mac@mcrowe.com" target="_blank">mac@mcrowe.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div class="">On Monday 07 April 2014 at 17:49:51 +0100, Mike Crowe wrote:<br>
&gt; On Monday 07 April 2014 at 09:17:38 -0700, Chris Larson wrote:<br>
&gt; &gt; On Mon, Apr 7, 2014 at 8:53 AM, Mike Crowe &lt;<a href="mailto:mac@mcrowe.com">mac@mcrowe.com</a>&gt; wrote:<br>
&gt; &gt;<br>
&gt; &gt; &gt; We&#39;re building for both ARM and MIPS-based MACHINEs in a single source<br>
&gt; &gt; &gt; tree. This seems to result in us compiling (or luckily most of the time<br>
&gt; &gt; &gt; resurrecting from sstate-cache) two different versions of all -native<br>
&gt; &gt; &gt; packages due to different base hashes.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; It seems that this difference in base hashes is due to the exported<br>
&gt; &gt; &gt; variable TARGET_LDFLAGS being different between the two CPUs:<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; &lt; export TARGET_LDFLAGS=&quot;-Wl,-O1  -Wl,--as-needed&quot;<br>
&gt; &gt; &gt; ---<br>
&gt; &gt; &gt; &gt; export TARGET_LDFLAGS=&quot;-Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed&quot;<br>
&gt; &gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; Heh, this i another case of a likely completely unnecessary export.<br>
&gt; &gt; Software we build expects LDFLAGS to be used, not TARGET_LDFLAGS, so I<br>
&gt; &gt; can&#39;t imagine that anything is using this export. Of course, it&#39;s<br>
&gt; &gt; non-trivial to confirm that this is the case :)<br>
<br>
</div>My git archaeology shows that this dates from the very first import from<br>
svn back in 2005. Back then it looks like it was necessary for<br>
wpa_supplicant which used it in its defconfig file. This is no longer the<br>
case.<br>
<br>
I didn&#39;t look at any other layers.<br>
<div class=""><br>
&gt; It did strike me as an odd thing to be exporting. Given the name I assumed<br>
&gt; it had something to do with building the toolchain. I notice though that<br>
&gt; the gcc recipes explicitly export LDFLAGS_FOR_TARGET inside tasks based on<br>
&gt; TARGET_LDFLAGS anyway so the toolchain &quot;should be fine&quot;. :)<br>
&gt;<br>
&gt; I&#39;m happy to try our complete build without exporting TARGET_LDFLAGS as a<br>
&gt; first step but I realise that probably wouldn&#39;t be enough proof.<br>
<br>
</div>I&#39;ve tested our build without the &quot;export&quot; in front of TARGET_LDFLAGS in<br>
bitbake.conf and saw no problems at all so I&#39;m in favour of doing that.<br>
<br>
Would a patch for this be acceptable? It does cause the world to be<br>
rebuilt. :(</blockquote></div><br>I&#39;m a fan of this, personally, but you&#39;ll likely need to check with folks like Richard Purdie for a final call, and this particular fix would have to go in post-1.6, into the 1.7 timeframe (1.6 isn&#39;t branched yet) since we&#39;re in the release candidate phase, and this has inherent risk. So, it might be worth pursuing the merge of the workaround with alters TARGET_LDFLAGS in native.bbclass to improve sstate reuse for 1.6, then pursue the unexport of TARGET_LDFLAGS for 1.7.<br>

-- <br>Christopher Larson<br>clarson at kergoth dot com<br>Founder - BitBake, OpenEmbedded, OpenZaurus<br>Maintainer - Tslib<br>Senior Software Engineer, Mentor Graphics
</div></div>