On Wed, 29 Oct 2008, Peter Kjellerstedt wrote:

> Misconfiguration in what way? The trylink script adds linker
> options to $(LD_FLAGS) prefixed with -Wl, (which is correct
> since $(LD_FLAGS) is intended for gcc). These options are
> also needed if you want to call ld directly, and thus the
> "convertion" from $(LD_FLAGS) to $(ld_flags) above.
>
> The alternative I guess would be to use gcc instead of ld, but
> I do not know if that is feasible as I have not looked into what
> ld is currently used for.

Looks like this may be falling through cracks :(
Bernhard did not comment the above, AFAICS.
Please consider applying this patch.


Cheers,

-- 
Cristian
Index: scripts/Makefile.lib
===================================================================
--- scripts/Makefile.lib	(revision 23889)
+++ scripts/Makefile.lib	(working copy)
@@ -117,8 +117,8 @@
 
 cpp_flags      = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(__cpp_flags)
 
-# TODO: seems to be a wrong thing to do! LDFLAGS contains gcc's flags!
-ld_flags       = $(LDFLAGS) $(EXTRA_LDFLAGS)
+# Remove the -Wl, prefix from linker options normally passed through gcc
+ld_flags       = $(filter-out -Wl$(comma)%,$(LDFLAGS) $(EXTRA_LDFLAGS))
 
 # Finds the multi-part object the current object will be linked into
 modname-multi = $(sort $(foreach m,$(multi-used),\
_______________________________________________
busybox mailing list
[email protected]
http://busybox.net/cgi-bin/mailman/listinfo/busybox

Reply via email to