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

Re: [PATCH] Makefile: Improve compiler header dependency check

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Aug 27, 2011, 16:26 UTC
Message-ID
<20110827162645.GA10476@elie.gateway.2wire.net>
In-Reply-To
<1314434470-7988-1-git-send-email-davvid@gmail.com>
David Aguilar wrote:
Show 7 quoted lines
> I fired up git's next branch on a mac laptop where I
> have a config.mak that builds universal git binaries:
>
> CFLAGS = -arch i386 -arch x86_64
>
> This configuration broke when 111ee18c31f9bac9436426399355facc79238566
> was merged into next.

Good catch; thanks. This information would be useful for the commit message.

> gcc cannot generate header dependencies when
> multiple -arch statements are used

Sounds like a bug. Any idea why it behaves that way? What error message does it write?

If it is a bug, it might be worth reporting this to the gcc devs while at it.

[...]
Show 10 quoted lines
> --- a/Makefile
> +++ b/Makefile
> @@ -1251,7 +1251,8 @@ USE_COMPUTED_HEADER_DEPENDENCIES =
>  else
>  ifndef COMPUTE_HEADER_DEPENDENCIES
>  dep_check = $(shell sh -c \
> -	'$(CC) -c -MF /dev/null -MMD -MP -x c /dev/null -o /dev/null 2>&1; \
> +	'$(CC) -c -MF /dev/null -MMD -MP -x c /dev/null -o /dev/null \
> +	$(ALL_CFLAGS) $(EXTRA_CPPFLAGS) 2>&1; \
>  	echo $$?')

EXTRA_CPPFLAGS is a target-specific variable and would always be empty, So I think this would be clearer without.

While we're touching this line, do you know if the "sh -c" is necessary? I would expect $(shell ...) to run its arguments in a shell.

Thanks --- despite the nitpicks above, this one looks good. Jonathan

Previous: David AguilarNext: David Aguilar
Message 2 of 9 in “Makefile: Improve compiler header dependency check”
  1. Makefile: Improve compiler header dependency checkDavid Aguilar, Aug 27, 2011
  2. Jonathan NiederAug 27, 2011
  3. Makefile: Improve compiler header dependency checkDavid Aguilar, Aug 27, 2011
  4. Fredrik KuivinenAug 28, 2011
  5. Jonathan NiederAug 30, 2011
  6. Makefile: Improve compiler header dependency checkDavid Aguilar, Aug 30, 2011
  7. Jonathan NiederAug 30, 2011
  8. Junio C HamanoAug 30, 2011
  9. David AguilarAug 27, 2011

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.