kbuild: Switch to 'f' variants of integrated assembler flag
commit 2185a7e4b0ade86c2c57fc63d4a7535c40254bd0 upstream.
It has been brought up a few times in various code reviews that clang
3.5 introduced -f{,no-}integrated-as as the preferred way to enable and
disable the integrated assembler, mentioning that -{no-,}integrated-as
are now considered legacy flags.
Switch the kernel over to using those variants in case there is ever a
time where clang decides to remove the non-'f' variants of the flag.
Also, fix a typo in a comment ("intergrated" -> "integrated").
Link: https://releases.llvm.org/3.5.0/tools/clang/docs/ReleaseNotes.html#new-compiler-flags
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
[nathan: Backport to 5.10]
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
83f55e6f29
commit
d5f67f6d4e
4
Makefile
4
Makefile
@@ -581,9 +581,9 @@ ifneq ($(GCC_TOOLCHAIN),)
|
|||||||
CLANG_FLAGS += --gcc-toolchain=$(GCC_TOOLCHAIN)
|
CLANG_FLAGS += --gcc-toolchain=$(GCC_TOOLCHAIN)
|
||||||
endif
|
endif
|
||||||
ifeq ($(LLVM_IAS),1)
|
ifeq ($(LLVM_IAS),1)
|
||||||
CLANG_FLAGS += -integrated-as
|
CLANG_FLAGS += -fintegrated-as
|
||||||
else
|
else
|
||||||
CLANG_FLAGS += -no-integrated-as
|
CLANG_FLAGS += -fno-integrated-as
|
||||||
endif
|
endif
|
||||||
CLANG_FLAGS += -Werror=unknown-warning-option
|
CLANG_FLAGS += -Werror=unknown-warning-option
|
||||||
KBUILD_CFLAGS += $(CLANG_FLAGS)
|
KBUILD_CFLAGS += $(CLANG_FLAGS)
|
||||||
|
|||||||
@@ -21,14 +21,14 @@ get_canonical_version()
|
|||||||
echo $((10000 * $1 + 100 * ${2:-0} + ${3:-0}))
|
echo $((10000 * $1 + 100 * ${2:-0} + ${3:-0}))
|
||||||
}
|
}
|
||||||
|
|
||||||
# Clang fails to handle -Wa,--version unless -no-integrated-as is given.
|
# Clang fails to handle -Wa,--version unless -fno-integrated-as is given.
|
||||||
# We check -(f)integrated-as, expecting it is explicitly passed in for the
|
# We check -fintegrated-as, expecting it is explicitly passed in for the
|
||||||
# integrated assembler case.
|
# integrated assembler case.
|
||||||
check_integrated_as()
|
check_integrated_as()
|
||||||
{
|
{
|
||||||
while [ $# -gt 0 ]; do
|
while [ $# -gt 0 ]; do
|
||||||
if [ "$1" = -integrated-as -o "$1" = -fintegrated-as ]; then
|
if [ "$1" = -fintegrated-as ]; then
|
||||||
# For the intergrated assembler, we do not check the
|
# For the integrated assembler, we do not check the
|
||||||
# version here. It is the same as the clang version, and
|
# version here. It is the same as the clang version, and
|
||||||
# it has been already checked by scripts/cc-version.sh.
|
# it has been already checked by scripts/cc-version.sh.
|
||||||
echo LLVM 0
|
echo LLVM 0
|
||||||
|
|||||||
Reference in New Issue
Block a user