Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-xvthlvmhzfnt7jx73jgmaea1@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

+4 -1
+4 -1
tools/scripts/Makefile.include
··· 32 32 EXTRA_WARNINGS += -Wpacked 33 33 EXTRA_WARNINGS += -Wredundant-decls 34 34 EXTRA_WARNINGS += -Wshadow 35 - EXTRA_WARNINGS += -Wstrict-aliasing=3 36 35 EXTRA_WARNINGS += -Wstrict-prototypes 37 36 EXTRA_WARNINGS += -Wswitch-default 38 37 EXTRA_WARNINGS += -Wswitch-enum 39 38 EXTRA_WARNINGS += -Wundef 40 39 EXTRA_WARNINGS += -Wwrite-strings 41 40 EXTRA_WARNINGS += -Wformat 41 + 42 + ifneq ($(CC), clang) 43 + EXTRA_WARNINGS += -Wstrict-aliasing=3 44 + endif 42 45 43 46 ifneq ($(findstring $(MAKEFLAGS), w),w) 44 47 PRINT_DIR = --no-print-directory