summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorNathan Chancellor <nathan@kernel.org>2022-02-03 02:05:16 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-02-23 13:58:37 +0300
commit4d7edade59493ea0af456131c570eb74a2f21893 (patch)
tree75e741d6e3f58558e20270896ac918ced4fa4a7b /scripts
parent62a337a490a121949fc939a29f5ae1da94871b16 (diff)
downloadlinux-4d7edade59493ea0af456131c570eb74a2f21893.tar.xz
Makefile.extrawarn: Move -Wunaligned-access to W=1
commit 1cf5f151d25fcca94689efd91afa0253621fb33a upstream. -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: stable@vger.kernel.org Link: https://github.com/llvm/llvm-project/commit/35737df4dcd28534bd3090157c224c19b501278a Link: https://github.com/ClangBuiltLinux/linux/issues/1569 Link: https://github.com/ClangBuiltLinux/linux/issues/1576 Signed-off-by: Nathan Chancellor <nathan@kernel.org> Reviewed-by: Nick Desaulniers <ndesaulniers@google.com> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> [nathan: Fix conflict due to lack of afe956c577b2d] Signed-off-by: Nathan Chancellor <nathan@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/Makefile.extrawarn1
1 files changed, 1 insertions, 0 deletions
diff --git a/scripts/Makefile.extrawarn b/scripts/Makefile.extrawarn
index 486e135d3e30..65df6141397f 100644
--- a/scripts/Makefile.extrawarn
+++ b/scripts/Makefile.extrawarn
@@ -73,5 +73,6 @@ KBUILD_CFLAGS += $(call cc-disable-warning, sign-compare)
KBUILD_CFLAGS += $(call cc-disable-warning, format-zero-length)
KBUILD_CFLAGS += $(call cc-disable-warning, uninitialized)
KBUILD_CFLAGS += $(call cc-disable-warning, pointer-to-enum-cast)
+KBUILD_CFLAGS += $(call cc-disable-warning, unaligned-access)
endif
endif