<div dir="ltr">Hi, Burton:<div><br></div><div>I also agree with you, your suggestion is better.</div><div><br></div><div>Hi, Khem:</div><div><br></div><div>But is this a bug of binutils? Or musl libc? Since I had only observed this error with musl libc only, it did not occur with glibc.</div><div><br></div><div>//Ming Liu</div></div><div class="gmail_extra"><br><div class="gmail_quote">2017-07-24 15:39 GMT+02:00 Khem Raj <span dir="ltr">&lt;<a href="mailto:raj.khem@gmail.com" target="_blank">raj.khem@gmail.com</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Mon, Jul 24, 2017 at 6:18 AM, Burton, Ross &lt;<a href="mailto:ross.burton@intel.com">ross.burton@intel.com</a>&gt; wrote:<br>
&gt; If we&#39;re going to silently change the linker to bfd under musl if ld-is-gold<br>
&gt; is selected, wouldn&#39;t it be better just to throw an exception if both musl<br>
&gt; and ld-is-gold are selected?  Better to tell the user so they can not do<br>
&gt; that than silently ignore what they asked.<br>
<br>
</span>yes, that would be better but I am skeptical of disabling it<br>
completely, we should<br>
create testcase and report it to binutils bugzilla<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
&gt;<br>
&gt; Ross<br>
&gt;<br>
&gt; On 22 July 2017 at 14:30, &lt;<a href="mailto:liu.ming50@gmail.com">liu.ming50@gmail.com</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; From: Ming Liu &lt;<a href="mailto:peter.x.liu@external.atlascopco.com">peter.x.liu@external.<wbr>atlascopco.com</a>&gt;<br>
&gt;&gt;<br>
&gt;&gt; Quite a few such compiling issues were found when I was building with<br>
&gt;&gt; following configs:<br>
&gt;&gt; ...<br>
&gt;&gt; MACHINE = &quot;beaglebone&quot;<br>
&gt;&gt; TCLIBC = &quot;musl&quot;<br>
&gt;&gt; DISTRO_FEATURES_append = &quot; ld-is-gold&quot;<br>
&gt;&gt; ...<br>
&gt;&gt;<br>
&gt;&gt; fixed by adding bfd binding now ldflags.<br>
&gt;&gt;<br>
&gt;&gt; Signed-off-by: Ming Liu &lt;<a href="mailto:peter.x.liu@external.atlascopco.com">peter.x.liu@external.<wbr>atlascopco.com</a>&gt;<br>
&gt;&gt; ---<br>
&gt;&gt;  meta/conf/distro/include/<wbr>tclibc-musl.inc | 4 ++++<br>
&gt;&gt;  1 file changed, 4 insertions(+)<br>
&gt;&gt;<br>
&gt;&gt; diff --git a/meta/conf/distro/include/<wbr>tclibc-musl.inc<br>
&gt;&gt; b/meta/conf/distro/include/<wbr>tclibc-musl.inc<br>
&gt;&gt; index 3d3f6ac..99d52a1 100644<br>
&gt;&gt; --- a/meta/conf/distro/include/<wbr>tclibc-musl.inc<br>
&gt;&gt; +++ b/meta/conf/distro/include/<wbr>tclibc-musl.inc<br>
&gt;&gt; @@ -18,6 +18,10 @@ PREFERRED_PROVIDER_virtual/<wbr>nativesdk-libiconv ?=<br>
&gt;&gt; &quot;nativesdk-glibc&quot;<br>
&gt;&gt;<br>
&gt;&gt;  CXXFLAGS += &quot;-fvisibility-inlines-hidden&quot;<br>
&gt;&gt;<br>
&gt;&gt; +# Workaround for musl libc does not support bfd lazy binding well<br>
&gt;&gt; +# Refer to: <a href="https://bugzilla.yoctoproject.org/show_bug.cgi?id=11679" rel="noreferrer" target="_blank">https://bugzilla.yoctoproject.<wbr>org/show_bug.cgi?id=11679</a><br>
&gt;&gt; +LDFLAGS += &quot;${@bb.utils.contains(&#39;DISTRO_<wbr>FEATURES&#39;, &#39;ld-is-gold&#39;,<br>
&gt;&gt; &#39;-Wl,-z,relro,-z,now -fuse-ld=bfd&#39;, &#39;&#39;, d)}&quot;<br>
&gt;&gt; +<br>
&gt;&gt;  IMAGE_LINGUAS = &quot;&quot;<br>
&gt;&gt;<br>
&gt;&gt;  LIBC_DEPENDENCIES = &quot;\<br>
&gt;&gt; --<br>
&gt;&gt; 2.7.4<br>
&gt;&gt;<br>
&gt;<br>
&gt;<br>
</div></div><span class="HOEnZb"><font color="#888888">&gt; --<br>
&gt; ______________________________<wbr>_________________<br>
&gt; Openembedded-core mailing list<br>
&gt; <a href="mailto:Openembedded-core@lists.openembedded.org">Openembedded-core@lists.<wbr>openembedded.org</a><br>
&gt; <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>
&gt;<br>
</font></span></blockquote></div><br></div>