<div dir="ltr">Hi, Khem:<div><br></div><div><pre class="gmail-bz_comment_text" id="gmail-comment_text_5" style="white-space:pre-wrap;width:50em;color:rgb(0,0,0)">Just tried, but the error still could be observed with the patch applied, for instance:
| /home/peter-liu/opensource/poky-upstream/build/tmp/work/cortexa8hf-neon-poky-linux-musleabi/m4/1.4.18-r0/recipe-sysroot-native/usr/bin/arm-poky-linux-musleabi/../../libexec/arm-poky-linux-musleabi/gcc/arm-poky-linux-musleabi/7.1.0/ld: error: ../lib/libm4.a(progname.o): cannot make copy relocation for protected symbol 'program_invocation_name', defined in /home/peter-liu/opensource/poky-upstream/build/tmp/work/cortexa8hf-neon-poky-linux-musleabi/m4/1.4.18-r0/recipe-sysroot/usr/lib/libc.so
| collect2: error: ld returned 1 exit status
| Makefile:1554: recipe for target 'm4' failed</pre><pre class="gmail-bz_comment_text" id="gmail-comment_text_5" style="white-space:pre-wrap;width:50em;color:rgb(0,0,0)">//Ming Liu</pre></div><div class="gmail_extra"><br><div class="gmail_quote">2017-07-31 23:56 GMT+02:00 Khem Raj <span dir="ltr"><<a href="mailto:raj.khem@gmail.com" target="_blank">raj.khem@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Tue, Jul 25, 2017 at 1:07 AM, Ming Liu <<a href="mailto:liu.ming50@gmail.com">liu.ming50@gmail.com</a>> wrote:<br>
> Hi, Burton:<br>
><br>
> I also agree with you, your suggestion is better.<br>
><br>
> Hi, Khem:<br>
><br>
> But is this a bug of binutils? Or musl libc? Since I had only observed this<br>
> error with musl libc only, it did not occur with glibc.<br>
><br>
<br>
</span>Please try out a tentative patch here<br>
<a href="https://bugzilla.yoctoproject.org/show_bug.cgi?id=11679#c4" rel="noreferrer" target="_blank">https://bugzilla.yoctoproject.<wbr>org/show_bug.cgi?id=11679#c4</a><br>
<div class="HOEnZb"><div class="h5"><br>
> //Ming Liu<br>
><br>
> 2017-07-24 15:39 GMT+02:00 Khem Raj <<a href="mailto:raj.khem@gmail.com">raj.khem@gmail.com</a>>:<br>
>><br>
>> On Mon, Jul 24, 2017 at 6:18 AM, Burton, Ross <<a href="mailto:ross.burton@intel.com">ross.burton@intel.com</a>><br>
>> wrote:<br>
>> > If we're going to silently change the linker to bfd under musl if<br>
>> > ld-is-gold<br>
>> > is selected, wouldn't it be better just to throw an exception if both<br>
>> > musl<br>
>> > and ld-is-gold are selected? Better to tell the user so they can not do<br>
>> > that than silently ignore what they asked.<br>
>><br>
>> 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>
>><br>
>><br>
>> ><br>
>> > Ross<br>
>> ><br>
>> > On 22 July 2017 at 14:30, <<a href="mailto:liu.ming50@gmail.com">liu.ming50@gmail.com</a>> wrote:<br>
>> >><br>
>> >> From: Ming Liu <<a href="mailto:peter.x.liu@external.atlascopco.com">peter.x.liu@external.<wbr>atlascopco.com</a>><br>
>> >><br>
>> >> Quite a few such compiling issues were found when I was building with<br>
>> >> following configs:<br>
>> >> ...<br>
>> >> MACHINE = "beaglebone"<br>
>> >> TCLIBC = "musl"<br>
>> >> DISTRO_FEATURES_append = " ld-is-gold"<br>
>> >> ...<br>
>> >><br>
>> >> fixed by adding bfd binding now ldflags.<br>
>> >><br>
>> >> Signed-off-by: Ming Liu <<a href="mailto:peter.x.liu@external.atlascopco.com">peter.x.liu@external.<wbr>atlascopco.com</a>><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<br>
>> >> 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 ?=<br>
>> >> "nativesdk-glibc"<br>
>> >><br>
>> >> CXXFLAGS += "-fvisibility-inlines-hidden"<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 += "${@bb.utils.contains('DISTRO_<wbr>FEATURES', 'ld-is-gold',<br>
>> >> '-Wl,-z,relro,-z,now -fuse-ld=bfd', '', d)}"<br>
>> >> +<br>
>> >> IMAGE_LINGUAS = ""<br>
>> >><br>
>> >> LIBC_DEPENDENCIES = "\<br>
>> >> --<br>
>> >> 2.7.4<br>
>> >><br>
>> ><br>
>> ><br>
>> > --<br>
>> > ______________________________<wbr>_________________<br>
>> > Openembedded-core mailing list<br>
>> > <a href="mailto:Openembedded-core@lists.openembedded.org">Openembedded-core@lists.<wbr>openembedded.org</a><br>
>> > <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>
>> ><br>
><br>
><br>
</div></div></blockquote></div><br></div></div>