From: Arnaldo Carvalho de Melo Date: Tue, 14 Feb 2017 13:34:35 +0000 (-0300) Subject: tools: Suppress request for warning options not existent in clang X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=093b75ef5995ea35d7f6bdb6c7b32a42a1999813;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git tools: Suppress request for warning options not existent in clang To allow building with clang, avoiding: error: unknown warning option '-Wstrict-aliasing=3'; did you mean '-Wstring-plus-int'? [-Werror,-Wunknown-warning-option] Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-xvthlvmhzfnt7jx73jgmaea1@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/tools/scripts/Makefile.include b/tools/scripts/Makefile.include index 19edc1a7a232..621578aa12d6 100644 --- a/tools/scripts/Makefile.include +++ b/tools/scripts/Makefile.include @@ -32,7 +32,6 @@ EXTRA_WARNINGS += -Wold-style-definition EXTRA_WARNINGS += -Wpacked EXTRA_WARNINGS += -Wredundant-decls EXTRA_WARNINGS += -Wshadow -EXTRA_WARNINGS += -Wstrict-aliasing=3 EXTRA_WARNINGS += -Wstrict-prototypes EXTRA_WARNINGS += -Wswitch-default EXTRA_WARNINGS += -Wswitch-enum @@ -40,6 +39,10 @@ EXTRA_WARNINGS += -Wundef EXTRA_WARNINGS += -Wwrite-strings EXTRA_WARNINGS += -Wformat +ifneq ($(CC), clang) +EXTRA_WARNINGS += -Wstrict-aliasing=3 +endif + ifneq ($(findstring $(MAKEFLAGS), w),w) PRINT_DIR = --no-print-directory else