Makefile.flags: restrict Wno-constant-logical-operand and Wno-string-plus-int options...
authorBiswapriyo Nath <nathbappai@gmail.com>
Tue, 9 Jun 2020 17:35:12 +0000 (23:05 +0530)
committerDenys Vlasenko <vda.linux@googlemail.com>
Wed, 10 Jun 2020 12:33:19 +0000 (14:33 +0200)
these options were added in b4ef2e3467d8e980ccf13c9dd342459c013b455f commit
gcc shows unrecognized command-line option warnings

Signed-off-by: Biswapriyo Nath <nathbappai@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Makefile.flags

index bed766b8a371cfe7093b7a11a7d4568a12d1a61f..cff935ff57decab7435bc5eb10574abc2f714dc5 100644 (file)
@@ -77,7 +77,9 @@ CFLAGS += $(call cc-option,-fno-asynchronous-unwind-tables,)
 CFLAGS += $(call cc-option,-fno-builtin-printf,)
 
 # clang-9 does not like "str" + N and "if (CONFIG_ITEM && cond)" constructs
+ifeq ($(CC),clang)
 CFLAGS += $(call cc-option,-Wno-string-plus-int -Wno-constant-logical-operand)
+endif
 
 # FIXME: These warnings are at least partially to be concerned about and should
 # be fixed..