Skip to content

Commit 5abcd2c

Browse files
nathanchancegregkh
authored andcommitted
MIPS: Prefer cc-option for additions to cflags
commit 337ff6b upstream. 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: Nathan Chancellor <[email protected]> Acked-by: Thomas Bogendoerfer <[email protected]> Reviewed-by: Nick Desaulniers <[email protected]> Reviewed-by: Philippe Mathieu-Daudé <[email protected]> Tested-by: Linux Kernel Functional Testing <[email protected]> Tested-by: Anders Roxell <[email protected]> Signed-off-by: Masahiro Yamada <[email protected]> Signed-off-by: Nathan Chancellor <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 1d485dd commit 5abcd2c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

arch/mips/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ cflags-y += -fno-stack-check
152152
#
153153
# Avoid this by explicitly disabling that assembler behaviour.
154154
#
155-
cflags-y += $(call as-option,-Wa$(comma)-mno-fix-loongson3-llsc,)
155+
cflags-y += $(call cc-option,-Wa$(comma)-mno-fix-loongson3-llsc,)
156156

157157
#
158158
# CPU-dependent compiler/assembler options for optimization.

arch/mips/loongson2ef/Platform

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ cflags-$(CONFIG_CPU_LOONGSON2F) += -march=loongson2f
2525
# binutils does not merge support for the flag then we can revisit & remove
2626
# this later - for now it ensures vendor toolchains don't cause problems.
2727
#
28-
cflags-$(CONFIG_CPU_LOONGSON2EF) += $(call as-option,-Wa$(comma)-mno-fix-loongson3-llsc,)
28+
cflags-$(CONFIG_CPU_LOONGSON2EF) += $(call cc-option,-Wa$(comma)-mno-fix-loongson3-llsc,)
2929

3030
# Enable the workarounds for Loongson2f
3131
ifdef CONFIG_CPU_LOONGSON2F_WORKAROUNDS

0 commit comments

Comments
 (0)