In Rules.mak, "check_ldflags" appears to be useless.

David Daney ddaney at avtrex.com
Wed Jul 26 16:26:12 UTC 2006


Rob Landley wrote:
> Ok, here's a snippet:
> 
> --- Rules.mak   (revision 15742)
> +++ Rules.mak   (working copy)
> @@ -166,6 +166,7 @@
>  endif
> 
>  CHECKED_LDFLAGS := $(call check_ld,$(LD),--warn-common,)
> +CHECKED_LDFLAGS := $(call check_ld,$(LD),--static-libgcc,)
> 
> 
> Now would someone explain to me why check_ld even _exists_ if the build still 
> breaks in the linking phase if you add that line?
> 
> I'm confused...

'--static-libgcc' (note the two leading '-') is not a valid option for 
any known tool chain component, so adding that line to a makefile has no 
possible use.  Other than that, I don't know why it is breaking things. 
  But one nice thing about make is that it prints out the commands it 
runs, so you can try them out from the command line and diagnose the 
problem.  I would say that the check_ld function is broken if that is 
making the build fail.

Note that '-static-libgcc' (note the single leading '-') *is* a valid 
option for gcc.  Since it is not a ld option there is no reason to try 
to pass it to ld.

Also note that my gratuitous praise for make was indeed intended to 
inflame the situation.

David Daney




More information about the busybox mailing list