git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
HAH. Peter Anvin <hpa@zytor.com>
Date
Oct 29, 2005, 16:24 UTC
Message-ID
<4363A223.4040806@zytor.com>
In-Reply-To
<4363250C.8030200@op5.se>
Andreas Ericsson wrote:
Show 13 quoted lines
> 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
Previous: Andreas Ericsson
Message 2 of 2 in “Use LDFLAGS instead of ALL_CFLAGS when linking.”
  1. Use LDFLAGS instead of ALL_CFLAGS when linking.Andreas Ericsson, Oct 29, 2005
  2. H. Peter AnvinOct 29, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.