Skip to content
Commit cf300b83 authored by Nathan Chancellor's avatar Nathan Chancellor Committed by Masahiro Yamada
Browse files

kbuild: Remove '-mno-global-merge'

This flag is specific to clang, where it is only used by the 32-bit and
64-bit ARM backends. In certain situations, the presence of this flag
will cause a warning, as shown by commit 6580c5c1 ("um: clang: Strip
out -mno-global-merge from USER_CFLAGS").

Since commit 61163efa

 ("kbuild: LLVMLinux: Add Kbuild support for
building kernel with Clang") that added this flag back in 2014, there
have been quite a few changes to the GlobalMerge pass in LLVM. Building
several different ARCH=arm and ARCH=arm64 configurations with LLVM 11
(minimum) and 15 (current main version) with this flag removed (i.e.,
with the default of '-mglobal-merge') reveals no modpost warnings, so it
is likely that the issue noted in the comment is no longer relevant due
to changes in LLVM or modpost, meaning this flag can be removed.

If any new warnings show up that are a result of the removal of this
flag, it can be added back under arch/arm{,64}/Makefile to avoid
warnings on other architectures.

Signed-off-by: default avatarNathan Chancellor <nathan@kernel.org>
Tested-by: default avatarDavid Gow <davidgow@google.com>
Reviewed-by: default avatarKees Cook <keescook@chromium.org>
Tested-by: default avatarSedat Dilek <sedat.dilek@gmail.com>
Reviewed-by: default avatarSedat Dilek <sedat.dilek@gmail.com>
Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
parent 099c22bd
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment