aboutsummaryrefslogtreecommitdiffstats
path: root/tools/scripts/Makefile.include
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2017-02-14 08:34:35 -0500
committerArnaldo Carvalho de Melo <acme@redhat.com>2017-02-14 08:34:35 -0500
commit093b75ef5995ea35d7f6bdb6c7b32a42a1999813 (patch)
tree62549b5ed19006492a5ec6bf27fc328ea8cf7ce2 /tools/scripts/Makefile.include
parent277d6f1dcae09aed63cd4c7900a280b0e18cf2ca (diff)
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>
Diffstat (limited to 'tools/scripts/Makefile.include')
-rw-r--r--tools/scripts/Makefile.include5
1 files changed, 4 insertions, 1 deletions
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
32EXTRA_WARNINGS += -Wpacked 32EXTRA_WARNINGS += -Wpacked
33EXTRA_WARNINGS += -Wredundant-decls 33EXTRA_WARNINGS += -Wredundant-decls
34EXTRA_WARNINGS += -Wshadow 34EXTRA_WARNINGS += -Wshadow
35EXTRA_WARNINGS += -Wstrict-aliasing=3
36EXTRA_WARNINGS += -Wstrict-prototypes 35EXTRA_WARNINGS += -Wstrict-prototypes
37EXTRA_WARNINGS += -Wswitch-default 36EXTRA_WARNINGS += -Wswitch-default
38EXTRA_WARNINGS += -Wswitch-enum 37EXTRA_WARNINGS += -Wswitch-enum
@@ -40,6 +39,10 @@ EXTRA_WARNINGS += -Wundef
40EXTRA_WARNINGS += -Wwrite-strings 39EXTRA_WARNINGS += -Wwrite-strings
41EXTRA_WARNINGS += -Wformat 40EXTRA_WARNINGS += -Wformat
42 41
42ifneq ($(CC), clang)
43EXTRA_WARNINGS += -Wstrict-aliasing=3
44endif
45
43ifneq ($(findstring $(MAKEFLAGS), w),w) 46ifneq ($(findstring $(MAKEFLAGS), w),w)
44PRINT_DIR = --no-print-directory 47PRINT_DIR = --no-print-directory
45else 48else