Skip to content

Commit 1cf5f15

Browse files
nathanchancemasahir0y
authored andcommitted
Makefile.extrawarn: Move -Wunaligned-access to W=1
-Wunaligned-access is a new warning in clang that is default enabled for arm and arm64 under certain circumstances within the clang frontend (see LLVM commit below). On v5.17-rc2, an ARCH=arm allmodconfig build shows 1284 total/70 unique instances of this warning (most of the instances are in header files), which is quite noisy. To keep a normal build green through CONFIG_WERROR, only show this warning with W=1, which will allow automated build systems to catch new instances of the warning so that the total number can be driven down to zero eventually since catching unaligned accesses at compile time would be generally useful. Cc: [email protected] Link: llvm/llvm-project@35737df Link: ClangBuiltLinux/linux#1569 Link: ClangBuiltLinux/linux#1576 Signed-off-by: Nathan Chancellor <[email protected]> Reviewed-by: Nick Desaulniers <[email protected]> Signed-off-by: Masahiro Yamada <[email protected]>
1 parent 8a4c5b2 commit 1cf5f15

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

scripts/Makefile.extrawarn

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ KBUILD_CFLAGS += -Wno-sign-compare
5151
KBUILD_CFLAGS += -Wno-format-zero-length
5252
KBUILD_CFLAGS += $(call cc-disable-warning, pointer-to-enum-cast)
5353
KBUILD_CFLAGS += -Wno-tautological-constant-out-of-range-compare
54+
KBUILD_CFLAGS += $(call cc-disable-warning, unaligned-access)
5455
endif
5556

5657
endif

0 commit comments

Comments
 (0)