git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Nieder <jrnieder@gmail.com>
To: David Aguilar <davvid@gmail.com>
Cc: Junio C Hamano <gitster@pobox.com>,
	Fredrik Kuivinen <frekui@gmail.com>,
	git@vger.kernel.org
Subject: Re: [PATCH] Makefile: Improve compiler header dependency check
Date: Sat, 27 Aug 2011 11:26:54 -0500	[thread overview]
Message-ID: <20110827162645.GA10476@elie.gateway.2wire.net> (raw)
In-Reply-To: <1314434470-7988-1-git-send-email-davvid@gmail.com>

David Aguilar wrote:

> 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.

[...]
> --- 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

  reply	other threads:[~2011-08-27 16:27 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-27  8:41 [PATCH] Makefile: Improve compiler header dependency check David Aguilar
2011-08-27 16:26 ` Jonathan Nieder [this message]
2011-08-27 21:00   ` [PATCH v2] " David Aguilar
2011-08-28 11:47     ` Fredrik Kuivinen
2011-08-30  4:05       ` Jonathan Nieder
2011-08-30  8:27         ` [PATCH v3] " David Aguilar
2011-08-30  8:33           ` Jonathan Nieder
2011-08-30 17:17           ` Junio C Hamano
2011-08-27 21:19   ` [PATCH] " David Aguilar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110827162645.GA10476@elie.gateway.2wire.net \
    --to=jrnieder@gmail.com \
    --cc=davvid@gmail.com \
    --cc=frekui@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).