<div dir="ltr"><div><div><div><div>> LD='${LD} -fuse-ld=bfd"<br><br></div>This doesn'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'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'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>>That's a terrible implementation of "install"<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's "don't recompile the bootloader itself" 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't been able to determine why that'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"><<a href="mailto:ross.burton@intel.com" target="_blank">ross.burton@intel.com</a>></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"><<a href="mailto:allenwild93@gmail.com" target="_blank">allenwild93@gmail.com</a>></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't work for syslinux. It'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's a terrible implementation of "install" and it should be using LDFLAGS, so that'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>