From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: Carlo Arenas <carenas@gmail.com>
Cc: "brian m. carlson" <sandals@crustytoothpaste.net>,
git@vger.kernel.org, levraiphilippeblain@gmail.com,
Eric Sunshine <sunshine@sunshineco.com>
Subject: Re: [PATCH v2] Makefile: avoid breaking compilation database generation with DEVELOPER
Date: Thu, 23 Sep 2021 04:08:29 +0200 [thread overview]
Message-ID: <87czp059g7.fsf@evledraar.gmail.com> (raw)
In-Reply-To: <CAPUEspjJdkPgpWvLJKNks+Uu-tZmahw6U3pa+XBkMB6_m_dtRQ@mail.gmail.com>
On Wed, Sep 22 2021, Carlo Arenas wrote:
> On Wed, Sep 22, 2021 at 6:41 PM brian m. carlson
> <sandals@crustytoothpaste.net> wrote:
>
>> > diff --git a/Makefile b/Makefile
>> > index 9df565f27b..d5c6d0ea3b 100644
>> > --- a/Makefile
>> > +++ b/Makefile
>> > @@ -1302,7 +1302,7 @@ GENERATE_COMPILATION_DATABASE = no
>> > endif
>> >
>> > ifeq ($(GENERATE_COMPILATION_DATABASE),yes)
>> > -compdb_check = $(shell $(CC) $(ALL_CFLAGS) \
>> > +compdb_check = $(shell $(CC) \
>> > -c -MJ /dev/null \
>> > -x c /dev/null -o /dev/null 2>&1; \
>> > echo $$?)
>>
>> Are you sure this results in a functional set of files?
>
> no; it does not
>
> This call is only meant to be used to check if your compiler supports
> the feature (which as Ævar points out[1], might not be the best thing
> to do in this case), though
>
> After this fix the files are being generated (in a different place
> with their expected flags) and look healthy, but would be helpful to
> know you see no regressions.
I had the same thought as brian, but you're right, since we never use
the result of this it's OK.
IOW this check is really functionally equivalent to something like:
cc --help | grep -q -F -- -MJ
Or whatever, i.e. we're just checking if it's clang & supports the -MJ
option.
> [1] https://lore.kernel.org/git/87tuic5cdo.fsf@evledraar.gmail.com/
next prev parent reply other threads:[~2021-09-23 2:09 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-22 18:33 [PATCH] Makefile: avoid breaking compilation database generation with DEPELOPER Carlo Marcelo Arenas Belón
2021-09-22 18:45 ` Eric Sunshine
2021-09-22 18:57 ` [PATCH v2] Makefile: avoid breaking compilation database generation with DEVELOPER Carlo Marcelo Arenas Belón
2021-09-22 19:07 ` Philippe Blain
2021-09-23 1:41 ` brian m. carlson
2021-09-23 1:59 ` Carlo Arenas
2021-09-23 2:08 ` Ævar Arnfjörð Bjarmason [this message]
2021-09-23 0:55 ` [PATCH] Makefile: avoid breaking compilation database generation with DEPELOPER Ævar Arnfjörð Bjarmason
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=87czp059g7.fsf@evledraar.gmail.com \
--to=avarab@gmail.com \
--cc=carenas@gmail.com \
--cc=git@vger.kernel.org \
--cc=levraiphilippeblain@gmail.com \
--cc=sandals@crustytoothpaste.net \
--cc=sunshine@sunshineco.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).