Skip to content

Commit 13ceb48

Browse files
nathanchancetsbogend
authored andcommitted
MIPS: Loongson2ef: Remove unnecessary {as,cc}-option calls
When building with LLVM's integrated assembler, the build errors because it does not implement -mfix-loongson2f-{jump,nop}: arch/mips/loongson2ef/Platform:36: *** only binutils >= 2.20.2 have needed option -mfix-loongson2f-nop. Stop. The error is a little misleading because binutils are not being used in this case. To clear this up, remove the as-option calls because binutils 2.23 is the minimum supported version for building the kernel. At the same time, remove the cc-option calls for the '-march=' flags, as GCC 5.1.0 is the minimum supported version. This change will not fix the LLVM build for CONFIG_CPU_LOONGSON2{E,F}, as it does not implement the loongson2{e,f} march arguments (nor r4600, so it will error prior to this change) nor the assembler flags mentioned above but it will make the errors more obvious. Link: ClangBuiltLinux/linux#1529 Reported-by: Ryutaroh Matsumoto <[email protected]> Signed-off-by: Nathan Chancellor <[email protected]> Signed-off-by: Thomas Bogendoerfer <[email protected]>
1 parent 97ad1d8 commit 13ceb48

File tree

1 file changed

+4
-15
lines changed

1 file changed

+4
-15
lines changed

arch/mips/loongson2ef/Platform

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,9 @@
22
# Loongson Processors' Support
33
#
44

5-
# Only gcc >= 4.4 have Loongson specific support
65
cflags-$(CONFIG_CPU_LOONGSON2EF) += -Wa,--trap
7-
cflags-$(CONFIG_CPU_LOONGSON2E) += \
8-
$(call cc-option,-march=loongson2e,-march=r4600)
9-
cflags-$(CONFIG_CPU_LOONGSON2F) += \
10-
$(call cc-option,-march=loongson2f,-march=r4600)
6+
cflags-$(CONFIG_CPU_LOONGSON2E) += -march=loongson2e
7+
cflags-$(CONFIG_CPU_LOONGSON2F) += -march=loongson2f
118
#
129
# Some versions of binutils, not currently mainline as of 2019/02/04, support
1310
# an -mfix-loongson3-llsc flag which emits a sync prior to each ll instruction
@@ -32,16 +29,8 @@ cflags-$(CONFIG_CPU_LOONGSON2EF) += $(call as-option,-Wa$(comma)-mno-fix-loongso
3229

3330
# Enable the workarounds for Loongson2f
3431
ifdef CONFIG_CPU_LOONGSON2F_WORKAROUNDS
35-
ifeq ($(call as-option,-Wa$(comma)-mfix-loongson2f-nop,),)
36-
$(error only binutils >= 2.20.2 have needed option -mfix-loongson2f-nop)
37-
else
38-
cflags-$(CONFIG_CPU_NOP_WORKAROUNDS) += -Wa$(comma)-mfix-loongson2f-nop
39-
endif
40-
ifeq ($(call as-option,-Wa$(comma)-mfix-loongson2f-jump,),)
41-
$(error only binutils >= 2.20.2 have needed option -mfix-loongson2f-jump)
42-
else
43-
cflags-$(CONFIG_CPU_JUMP_WORKAROUNDS) += -Wa$(comma)-mfix-loongson2f-jump
44-
endif
32+
cflags-$(CONFIG_CPU_NOP_WORKAROUNDS) += -Wa,-mfix-loongson2f-nop
33+
cflags-$(CONFIG_CPU_JUMP_WORKAROUNDS) += -Wa,-mfix-loongson2f-jump
4534
endif
4635

4736
# Some -march= flags enable MMI instructions, and GCC complains about that

0 commit comments

Comments
 (0)