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

Re: [PATCH 4/4] Makefile: Don't pass $(ALL_CFLAGS) to the linker

From
BLBernhard R. Link <brlink@debian.org>
Date
Jun 27, 2010, 09:44 UTC
Message-ID
<20100627094433.GA21771@pcpool00.mathematik.uni-freiburg.de>
In-Reply-To
<4C264019.6030408@ramsay1.demon.co.uk>
* Ramsay Jones <ramsay@ramsay1.demon.co.uk> [100626 20:02]:
Show 8 quoted lines
> Really? I thought that the general scheme was something like:
>
>     - LDFLAGS is for options which only affects the operation of
>       the linker (e.g. -L).
>     - CPPFLAGS is for options which only affects the operation of
>       the C pre-processor (e.g. -I, -D, -U)
>     - CFLAGS is for options which only affects the operation of
>       the compiler proper.

I think the problem are options like -g or -m64 and the like which you also want to give to the linker on some systems, so it is quite common and I'd say recommended to have the compiling stage get CPPFLAGS and CFLAGS and the linking stage getting CFLAGS and LDFLAGS (and link using the compiler, otherwise you might miss libraries anyway). I do not know if automake started with this, or if it is older.

> Also, the last time I was forced to use automake (yuck), I noticed that
> it passed CPPFLAGS to the linker; I consider this to be a bug in
> automake. :-P

Huh? Never heared of that bug, it must be more than 15 years ago. Are you sure it was not CFLAGS it passed to the linker?

	Bernhard R. Link
No need to CC me, I'm subscribed...
Previous: Andreas SchwabNext: Peter Harris
Message 7 of 12 in “Makefile: Don't pass $(ALL_CFLAGS) to the linker”
  1. 4/4 Makefile: Don't pass $(ALL_CFLAGS) to the linkerRamsay Jones, Jun 23, 2010
  2. Jonathan NiederJun 23, 2010
  3. Ramsay JonesJun 26, 2010
  4. Jonathan NiederJun 26, 2010
  5. Ramsay JonesJun 30, 2010
  6. Andreas SchwabJun 30, 2010
  7. Bernhard R. LinkJun 27, 2010
  8. Peter HarrisJun 24, 2010
  9. Ramsay JonesJun 25, 2010
  10. Peter HarrisJun 27, 2010
  11. Ramsay JonesJun 30, 2010
  12. Peter HarrisJul 1, 2010

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.