<div dir="ltr">If we&#39;re going to silently change the linker to bfd under musl if ld-is-gold is selected, wouldn&#39;t it be better just to throw an exception if both musl and ld-is-gold are selected?  Better to tell the user so they can not do that than silently ignore what they asked.<div><br></div><div>Ross</div></div><div class="gmail_extra"><br><div class="gmail_quote">On 22 July 2017 at 14:30,  <span dir="ltr">&lt;<a href="mailto:liu.ming50@gmail.com" target="_blank">liu.ming50@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">From: Ming Liu &lt;<a href="mailto:peter.x.liu@external.atlascopco.com">peter.x.liu@external.<wbr>atlascopco.com</a>&gt;<br>
<br>
Quite a few such compiling issues were found when I was building with<br>
following configs:<br>
...<br>
MACHINE = &quot;beaglebone&quot;<br>
TCLIBC = &quot;musl&quot;<br>
DISTRO_FEATURES_append = &quot; ld-is-gold&quot;<br>
...<br>
<br>
fixed by adding bfd binding now ldflags.<br>
<br>
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>
---<br>
 meta/conf/distro/include/<wbr>tclibc-musl.inc | 4 ++++<br>
 1 file changed, 4 insertions(+)<br>
<br>
diff --git a/meta/conf/distro/include/<wbr>tclibc-musl.inc b/meta/conf/distro/include/<wbr>tclibc-musl.inc<br>
index 3d3f6ac..99d52a1 100644<br>
--- a/meta/conf/distro/include/<wbr>tclibc-musl.inc<br>
+++ b/meta/conf/distro/include/<wbr>tclibc-musl.inc<br>
@@ -18,6 +18,10 @@ PREFERRED_PROVIDER_virtual/<wbr>nativesdk-libiconv ?= &quot;nativesdk-glibc&quot;<br>
<br>
 CXXFLAGS += &quot;-fvisibility-inlines-hidden&quot;<br>
<br>
+# Workaround for musl libc does not support bfd lazy binding well<br>
+# 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>
+LDFLAGS += &quot;${@bb.utils.contains(&#39;DISTRO_<wbr>FEATURES&#39;, &#39;ld-is-gold&#39;, &#39;-Wl,-z,relro,-z,now -fuse-ld=bfd&#39;, &#39;&#39;, d)}&quot;<br>
+<br>
 IMAGE_LINGUAS = &quot;&quot;<br>
<br>
 LIBC_DEPENDENCIES = &quot;\<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.7.4<br>
<br>
</font></span></blockquote></div><br></div>