Subject: Re: [PATCH] Use LDFLAGS instead of ALL_CFLAGS when linking.

From: "H. Peter Anvin" <[email-masked]>
Date: Sat, 29 Oct 2005 09:24:03 -0700

Andreas Ericsson wrote:
> The patch says it all really. It lets users specify their own linking 
> options and unclutters the build-output somewhat.
> 
> index 5b0306d..f547d45 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -360,7 +360,7 @@ git-cherry-pick: git-revert
>         $(CC) -o $*.o -c $(ALL_CFLAGS) $<
> 
>  git-%$X: %.o $(LIB_FILE)
> -       $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) $(LIBS)
> +       $(CC) -o $@ $(filter %.o,$^) $(LIBS) $(LDFLAGS)
> 

Typically $(LDFLAGS) comes before $(LIBS).  This is not insignificant, 
since some people put library seach options into LDFLAGS.

	-hpa