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

Re: [PATCH] Makefile: make COMPUTE_HEADER_DEPENDENCIES=auto work with DEVOPTS=pedantic

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Sep 22, 2021, 11:04 UTC
Message-ID
<87o88k7tr6.fsf@evledraar.gmail.com>
In-Reply-To
<CAPUEsph8TYokqLmiZjvu3VgmzLh4AFhp+0vh0nv+2+m351=n_A@mail.gmail.com>
On Wed, Sep 22 2021, Carlo Arenas wrote:
Show 12 quoted lines
> On Wed, Sep 22, 2021 at 3:38 AM Ævar Arnfjörð Bjarmason
> <avarab@gmail.com> wrote:
>>
>> The "COMPUTE_HEADER_DEPENDENCIES" feature added in [1] was extended to
>> use auto-detection in [2]. Then when -Wpedantic support was added to
>> DEVOPTS in [3] we started passing -Wpedantic in combination with
>> -Werror to the compiler here.
>
> It is my impression though that header dependencies computation is
> something that might only work in gcc and clang (because of its gcc
> compatibility), so shouldn't this be restricted to those compilers
> instead of forcing all others to error?

I think it's better to just have those not supporting COMPUTE_HEADER_DEPENDENCIES define that, wanting to auto-detect things is what led to the current breakage.

I.e. our whitelisting of GCC and Clang will be out of date if some other compiler grows support for this, and even if we whitelist gcc and clang we'll need some script like detect-compiler etc.

> Also, why is this process run with DEVELOPER=1 to begin with, if we
> obviously don't need/want any compilations warnings?

Hrm? We run the COMPUTE_HEADER_DEPENDENCIES=yes process with and without DEVELOPER=1, it's just that DEVELOPER=1 breaks it since it turns on pedantic compilation flags now.

We want -Werror for the actual compilation under DEVELOPER=1, but a one-off command to see if a compiler has support for something is entirely different.

Previous: Carlo ArenasNext: Junio C Hamano
Message 3 of 21 in “Makefile: make COMPUTE_HEADER_DEPENDENCIES=auto work with DEVOPTS=pedantic”
  1. Makefile: make COMPUTE_HEADER_DEPENDENCIES=auto work with DEVOPTS=pedanticÆvar Arnfjörð Bjarmason, Sep 22, 2021
  2. Carlo ArenasSep 22, 2021
  3. Ævar Arnfjörð BjarmasonSep 22, 2021
  4. Junio C HamanoSep 22, 2021
  5. Jeff KingSep 22, 2021
  6. Junio C HamanoSep 22, 2021
  7. Carlo ArenasSep 22, 2021
  8. Jeff KingSep 22, 2021
  9. Carlo ArenasSep 22, 2021
  10. Ævar Arnfjörð BjarmasonSep 22, 2021
  11. Jeff KingSep 23, 2021
  12. Junio C HamanoSep 23, 2021
  13. Jeff KingSep 23, 2021
  14. Junio C HamanoSep 23, 2021
  15. Ævar Arnfjörð BjarmasonSep 22, 2021
  16. 0/2 Makefile: "pedantic" fallout on .depend and "compdb"Ævar Arnfjörð Bjarmason, Sep 22, 2021
  17. 1/2 Makefile: make COMPUTE_HEADER_DEPENDENCIES=auto work with DEVOPTS=pedanticÆvar Arnfjörð Bjarmason, Sep 22, 2021
  18. 2/2 Makefile: pass -Wno-pendantic under GENERATE_COMPILATION_DATABASE=yesÆvar Arnfjörð Bjarmason, Sep 22, 2021
  19. Carlo ArenasSep 23, 2021
  20. Junio C HamanoSep 23, 2021
  21. Jeff KingSep 23, 2021

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.