提交 337ff6bb 编写于 作者: N Nathan Chancellor 提交者: Masahiro Yamada

MIPS: Prefer cc-option for additions to cflags

A future change will switch as-option to use KBUILD_AFLAGS instead of
KBUILD_CFLAGS to allow clang to drop -Qunused-arguments, which may cause
issues if the flag being tested requires a flag previously added to
KBUILD_CFLAGS but not KBUILD_AFLAGS. Use cc-option for cflags additions
so that the flags are tested properly.
Signed-off-by: NNathan Chancellor <nathan@kernel.org>
Acked-by: NThomas Bogendoerfer <tsbogend@alpha.franken.de>
Reviewed-by: NNick Desaulniers <ndesaulniers@google.com>
Reviewed-by: NPhilippe Mathieu-Daudé <philmd@linaro.org>
Tested-by: NLinux Kernel Functional Testing <lkft@linaro.org>
Tested-by: NAnders Roxell <anders.roxell@linaro.org>
Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org>
上级 80a20d2f
...@@ -143,7 +143,7 @@ cflags-y += -fno-stack-check ...@@ -143,7 +143,7 @@ cflags-y += -fno-stack-check
# #
# Avoid this by explicitly disabling that assembler behaviour. # Avoid this by explicitly disabling that assembler behaviour.
# #
cflags-y += $(call as-option,-Wa$(comma)-mno-fix-loongson3-llsc,) cflags-y += $(call cc-option,-Wa$(comma)-mno-fix-loongson3-llsc,)
# #
# CPU-dependent compiler/assembler options for optimization. # CPU-dependent compiler/assembler options for optimization.
......
...@@ -25,7 +25,7 @@ cflags-$(CONFIG_CPU_LOONGSON2F) += -march=loongson2f ...@@ -25,7 +25,7 @@ cflags-$(CONFIG_CPU_LOONGSON2F) += -march=loongson2f
# binutils does not merge support for the flag then we can revisit & remove # binutils does not merge support for the flag then we can revisit & remove
# this later - for now it ensures vendor toolchains don't cause problems. # this later - for now it ensures vendor toolchains don't cause problems.
# #
cflags-$(CONFIG_CPU_LOONGSON2EF) += $(call as-option,-Wa$(comma)-mno-fix-loongson3-llsc,) cflags-$(CONFIG_CPU_LOONGSON2EF) += $(call cc-option,-Wa$(comma)-mno-fix-loongson3-llsc,)
# Enable the workarounds for Loongson2f # Enable the workarounds for Loongson2f
ifdef CONFIG_CPU_LOONGSON2F_WORKAROUNDS ifdef CONFIG_CPU_LOONGSON2F_WORKAROUNDS
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册