<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, May 2, 2016 at 9:37 PM, Khem Raj <span dir="ltr">&lt;<a href="mailto:raj.khem@gmail.com" target="_blank">raj.khem@gmail.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 style="word-wrap:break-word"><br><div><span class=""><blockquote type="cite"><div>On May 2, 2016, at 1:37 PM, Christopher Larson &lt;<a href="mailto:kergoth@gmail.com" target="_blank">kergoth@gmail.com</a>&gt; wrote:</div><br><div><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, May 2, 2016 at 8:34 PM, Khem Raj <span dir="ltr">&lt;<a href="mailto:raj.khem@gmail.com" target="_blank">raj.khem@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span><br>
&gt; On May 2, 2016, at 1:09 PM, Christopher Larson &lt;<a href="mailto:kergoth@gmail.com" target="_blank">kergoth@gmail.com</a>&gt; wrote:<br>
&gt;<br>
&gt; From: Christopher Larson &lt;<a href="mailto:chris_larson@mentor.com" target="_blank">chris_larson@mentor.com</a>&gt;<br>
&gt;<br>
&gt; We explicitly set the hash style to gnu in our LDFLAGS. Setting the default to<br>
&gt; this in the toolchain, while convenient, actually hides bugs, as a failure to<br>
&gt; obey LDFLAGS isn&#39;t noticed. By removing this, it&#39;s not dissimilar to how we<br>
&gt; poison the sysroot -- rather than relying on the default, notice right away if<br>
&gt; somoeone isn&#39;t obeying the needed flags.<br>
&gt;<br>
&gt; This will result in a failure to obey LDFLAGS causing a GNU_HASH QA failure,<br>
&gt; which is what&#39;s often seen with external toolchains. This brings us all on the<br>
&gt; same page, and makes sure a failure to obey LDFLAGS is seen early.<br>
&gt;<br>
<br>
<br>
</span>Default or gnu linkers is to use sysv for legacy reasons and by passing this option<br>
to configuring the toolchain we want to make sure that components are using sane defaults<br>
even if they have not configured these options.<br></blockquote><div><br></div><div>But that&#39;s not what we want. We want to know when we&#39;re not passing arguments we need to be passing. For example, the sysroot is poisoned today, so we *know* when the user is trying to run it without --sysroot=.</div></div></div></div></div></blockquote><div><br></div></span><div>application makefiles can ignore environment e.g. CC, CXX, LD etc and get into same situations.</div><div>as an application writer I may not be interested in using cross compilation specific nuances.  We may not</div><div>be able to solve it completely </div></div></div></blockquote><div><br></div><div><br></div><div>I&#39;m not sure what you mean by that. This is only for gcc-cross and gcc-cross-canadian. Anyone using those needs to deal with cross issues regardless.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><span class=""><blockquote type="cite"><div><div dir="ltr"><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">
if you do not pass the right linker flags from compiler driver and also ignore<br>
the LDFLAGS then you now have a safe pass for the app to build without GNU hash<br>
while I understand it will spread the external toolchain’s pains into internal toolchain<br>
I fail to understand the benefit of doing this otherwise.</blockquote></div><br clear="all"><div>Silently ignoring the fact that recipes ignore LDFLAGS is not good default behavior, and this is precisely what oe-core is doing today. If you know of a better way to detect that in another QA check, I&#39;m certainly open to hearing it.</div></div></div></div></blockquote><div><br></div></span><div>linker would emit .hash for sysv and .gnu.hash section for gnu hash in final ELF, may be adding a QA check for that would be enough ?</div></div></div></blockquote><div><br></div><div>I don&#39;t understand what you mean by this. I don&#39;t see how you&#39;d be able to distinguish between a gnu.hash used because of the toolchain defaults and a gnu.hash used because it obeyed LDFLAGS, which is what you&#39;d need to be able to detect the lack of the latter without this patch.</div></div>-- <br><div class="gmail_signature"><div dir="ltr">Christopher Larson<br>kergoth at gmail dot com<br>Founder - BitBake, OpenEmbedded, OpenZaurus<br>Maintainer - Tslib<br>Senior Software Engineer, Mentor Graphics</div></div>
</div></div>