]> git.baikalelectronics.ru Git - kernel.git/commit
kbuild: Remove '-mno-global-merge'
authorNathan Chancellor <nathan@kernel.org>
Wed, 30 Mar 2022 23:45:27 +0000 (16:45 -0700)
committerMasahiro Yamada <masahiroy@kernel.org>
Fri, 1 Apr 2022 15:05:28 +0000 (00:05 +0900)
commit93a1985c6826bde9dc5e8bdc8f443d70cd89ca37
treef094949a5a81b095c6073c630450f1a5e33adc12
parent10b0f9e39219a60e05954dd2f3566f2c333e4a40
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 0589e226636e ("um: clang: Strip
out -mno-global-merge from USER_CFLAGS").

Since commit 3eb7b54ed542 ("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: Nathan Chancellor <nathan@kernel.org>
Tested-by: David Gow <davidgow@google.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com>
Reviewed-by: Sedat Dilek <sedat.dilek@gmail.com>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Makefile