Handling of CONFIG_EXTRA_LDFLAGS in submakes
Greg Whiteley
greg.whiteley at gmail.com
Tue Apr 14 07:47:53 UTC 2015
Hi All,
I've run into trouble setting CONFIG_EXTRA_LDFLAGS in my config. It is not
honoured in some of the sub-make files (first failure is in applets). In
my specific case I'm selecting architecture-specific options that need to
be consistent across all build/link steps (in this case endian-selection).
The handling of CONFIG_EXTRA_LDFLAGS defined in a defconfig seems to be
different from the handling of CONFIG_EXTRA_(LDLIBS|CFLAGS). Whereas
CONFIG_EXTRA_CFLAGS is loaded into CFLAGS by Makefile.flags
CONFIG_EXTRA_LDFLAGS is loaded into EXTRA_LDFLAGS.
Adding EXTRA_LDFLAGS to the list of exports in Makefile works around the
problem for me and ensures that the the flags are available to sub-makes.
I thought it worth noting to you, since as far as I can tell EXTRA_LDFLAGS
provides a slightly different service to LDFLAGS, and I'm not sure that my
workaround would be generally applicable. I think a longer term fix might
involve having different CONFIG_ options to override EXTRA_LDFLAGS
separately to LDFLAGS.
Cheers,
Greg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/busybox/attachments/20150414/0a63f1a6/attachment.html>
More information about the busybox
mailing list