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

[PATCH] Makefile: avoid breaking compilation database generation with DEPELOPER

From
Carlo Marcelo Arenas Belón <carenas@gmail.com>
Date
Sep 22, 2021, 18:33 UTC
Message-ID
<20210922183311.3766-1-carenas@gmail.com>

3821c38068 (Makefile: add support for generating JSON compilation database, 2020-09-03), adds a feature to be used with clang to generate a compilation database by copying most of what was done before with the header dependency, but by doing so includes on its availability check the CFLAGS which became specially problematic once DEVELOPER=1 implied -pedantic as pointed out by Ævar[1].

Remove the unnecessary flags in the availability test, so it will work regardless of which other warnings are enabled or if the compilers has been told to error on them.

[1] https://lore.kernel.org/git/patch-1.1-6b2e9af5e67-20210922T103749Z-avarab@gmail.com/
Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>
---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
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 $$?)
-- 
2.33.0.911.gbe391d4e11
Next: Eric Sunshine
Message 1 of 8 in “Makefile: avoid breaking compilation database generation with DEPELOPER”
  1. Makefile: avoid breaking compilation database generation with DEPELOPERCarlo Marcelo Arenas Belón, Sep 22, 2021
  2. Eric SunshineSep 22, 2021
  3. Makefile: avoid breaking compilation database generation with DEVELOPERCarlo Marcelo Arenas Belón, Sep 22, 2021
  4. Philippe BlainSep 22, 2021
  5. brian m. carlsonSep 23, 2021
  6. Carlo ArenasSep 23, 2021
  7. Ævar Arnfjörð BjarmasonSep 23, 2021
  8. Ævar Arnfjörð BjarmasonSep 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.