Skip to content

Commit 093b75e

Browse files
committed
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 <[email protected]> Cc: David Ahern <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Wang Nan <[email protected]> Link: http://lkml.kernel.org/n/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
1 parent 277d6f1 commit 093b75e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tools/scripts/Makefile.include

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,17 @@ EXTRA_WARNINGS += -Wold-style-definition
3232
EXTRA_WARNINGS += -Wpacked
3333
EXTRA_WARNINGS += -Wredundant-decls
3434
EXTRA_WARNINGS += -Wshadow
35-
EXTRA_WARNINGS += -Wstrict-aliasing=3
3635
EXTRA_WARNINGS += -Wstrict-prototypes
3736
EXTRA_WARNINGS += -Wswitch-default
3837
EXTRA_WARNINGS += -Wswitch-enum
3938
EXTRA_WARNINGS += -Wundef
4039
EXTRA_WARNINGS += -Wwrite-strings
4140
EXTRA_WARNINGS += -Wformat
4241

42+
ifneq ($(CC), clang)
43+
EXTRA_WARNINGS += -Wstrict-aliasing=3
44+
endif
45+
4346
ifneq ($(findstring $(MAKEFLAGS), w),w)
4447
PRINT_DIR = --no-print-directory
4548
else

0 commit comments

Comments
 (0)