Skip to content

Commit 8a61869

Browse files
FlyGoattsbogend
authored andcommitted
MIPS: Loongson64: test for -march=loongson3a cflag
Currently march flag is hardcoded to loongson3a for GCC and mips64r2 for clang. We can actually test it to simplify the code. Signed-off-by: Jiaxun Yang <[email protected]> Signed-off-by: Thomas Bogendoerfer <[email protected]>
1 parent e7a3087 commit 8a61869

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

arch/mips/Makefile

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -187,11 +187,8 @@ cflags-$(CONFIG_CPU_LOONGSON2F) += \
187187
# Some -march= flags enable MMI instructions, and GCC complains about that
188188
# support being enabled alongside -msoft-float. Thus explicitly disable MMI.
189189
cflags-$(CONFIG_CPU_LOONGSON2EF) += $(call cc-option,-mno-loongson-mmi)
190-
ifdef CONFIG_CPU_LOONGSON64
191-
cflags-$(CONFIG_CPU_LOONGSON64) += -Wa,--trap
192-
cflags-$(CONFIG_CC_IS_GCC) += -march=loongson3a
193-
cflags-$(CONFIG_CC_IS_CLANG) += -march=mips64r2
194-
endif
190+
cflags-$(CONFIG_CPU_LOONGSON64) += \
191+
$(call cc-option,-march=loongson3a,-march=mips64r2) -Wa,--trap
195192
cflags-$(CONFIG_CPU_LOONGSON64) += $(call cc-option,-mno-loongson-mmi)
196193

197194
cflags-$(CONFIG_CPU_R4000_WORKAROUNDS) += $(call cc-option,-mfix-r4000,)

0 commit comments

Comments
 (0)