<div dir="ltr"><div><div><div><div>&gt;   LD=&#39;${LD} -fuse-ld=bfd&quot;<br><br></div>This doesn&#39;t work 
because the -fuse-ld option is only relevant when using gcc as a wrapper
 for the linker.  The Makefile calls x86_64-oe-linux-ld directly (which 
is a hardlink of x86_64-oe-linux-ld.gold or x86_64-oe-linux-ld.bfd) so when the linker starts up 
it&#39;s already Gold, rather than letting gcc call ld automatically.</div><div><br></div>Syslinux
 calls LD directly to use a custom linker script and avoids linking with 
system libraries (not uncommon for bare-metal programs like a 
bootloader). The -nostdlib gcc option can be used to get the same effect 
when linking with gcc as a wrapper, but doing that involves patching many syslinux makefiles to prefix LDFLAGS options with -Wl.</div><div><br></div><div>I have a working version of a patch that does this (19 changes in 15 makefiles), I can submit it here after some more testing if others think it&#39;s an acceptable fix. I ignored the EFI targets for now, but such a patch could be upstreamed after updating and testing the EFI code too.<br></div><div><br></div><div>&gt;That&#39;s a terrible implementation of &quot;install&quot;<br></div><br></div>I agree, and I think that the fact that libgpl.elf and ldlinux.elf are getting rebuilt at all means the current recipe violates upstream&#39;s &quot;don&#39;t recompile the bootloader itself&quot; wishes in doc/distrib.txt. The tarball we use includes shipped versions of those elf files and a bunch of c32 files, but for some reason make is deciding to rebuild them from source when we run make install. I haven&#39;t been able to determine why that&#39;s the case.<br><div><div><br></div><div>Allen<br></div><div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Dec 13, 2017 at 6:53 AM, Burton, Ross <span dir="ltr">&lt;<a href="mailto:ross.burton@intel.com" target="_blank">ross.burton@intel.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><span class="gmail-">On 13 December 2017 at 02:42, Allen Wild <span dir="ltr">&lt;<a href="mailto:allenwild93@gmail.com" target="_blank">allenwild93@gmail.com</a>&gt;</span> wrote:<br></span><div class="gmail_extra"><div class="gmail_quote"><span class="gmail-"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Oops, forgot mail the list when sending my first reply.<br>
<br>
I tried appending LDFLAGS, but it doesn&#39;t work for syslinux. It&#39;s<br>
during do_install, not do_compile, that $(LD) is called directly to<br>
link libutil.elf, libcom32.elf, libgpl.elf, and ldlinux.elf.<br></blockquote><div><br></div></span><div>That&#39;s a terrible implementation of &quot;install&quot; and it should be using LDFLAGS, so that&#39;s an upstreamable patch.  As Andre says, adding the flag to LD directly should work.</div><span class="gmail-HOEnZb"><font color="#888888"><div><br></div><div>Ross </div></font></span></div></div></div>
</blockquote></div><br></div></div></div></div>