Re: [PATCH v2] Makefile: avoid breaking compilation database generation with DEVELOPER

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Carlo,

Le 2021-09-22 à 14:57, Carlo Marcelo Arenas Belón a écrit :
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 compiler has
been told to error on them.

[1] https://lore.kernel.org/git/patch-1.1-6b2e9af5e67-20210922T103749Z-avarab@xxxxxxxxx/

Helped-by: Eric Sunshine <sunshine@xxxxxxxxxxxxxx>
Signed-off-by: Carlo Marcelo Arenas Belón <carenas@xxxxxxxxx>
---
  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 $$?)

Thanks for cleaning that up.

Acked-by: Philippe Blain <levraiphilippeblain@xxxxxxxxx>

Philippe.



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux