MIPS: check for -mfix-cn63xxp1 compiler option
PATCH 1/1 MIPS: check for -mfix-cn63xxp1 compiler option
Attempting to build for Cavium Octeon with an unpatched or old toolchain will fail due to the -mfix-cn63xxp1 option being unrecognized. Call cc-option on this option to make sure we can safely use it.
--- arch/mips/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/mips/Makefile +1 -1
@@ -155,7 +155,7 @@ cflags-$(CONFIG_CPU_CAVIUM_OCTEON) += $(call cc-option,-march=octeon) -Wa,--trap ifeq (,$(findstring march=octeon, $(cflags-$(CONFIG_CPU_CAVIUM_OCTEON)))) cflags-$(CONFIG_CPU_CAVIUM_OCTEON) += -Wa,-march=octeon endif -cflags-$(CONFIG_CAVIUM_CN63XXP1) += -Wa,-mfix-cn63xxp1 +cflags-$(CONFIG_CAVIUM_CN63XXP1) += -Wa,$(call cc-option,-mfix-cn63xxp1) cflags-$(CONFIG_CPU_BMIPS) += -march=mips32 -Wa,-mips32 -Wa,--trap cflags-$(CONFIG_CPU_R4000_WORKAROUNDS) += $(call cc-option,-mfix-r4000,)
Signature · 1 line
1.8.3.2
David Daney
NAKQuoted 5 lines · Florian Fainelli
Attempting to build for Cavium Octeon with an unpatched or old toolchain will fail due to the -mfix-cn63xxp1 option being unrecognized. Call cc-option on this option to make sure we can safely use it.
Signed-off-by Florian Fainelli <[email protected]>
NACK.
If the chip you are building for needs -Wa,-mfix-cn63xxp1, then building without this option yields a system the generates random errors. So I would argue that if -Wa,-mfix-cn63xxp1 is not supported by your assembler, breaking the build is the proper thing to do.
David Daney
Quoted 18 lines
--- arch/mips/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/mips/Makefile +1
-1@@ -155,7 +155,7 @@ cflags-$(CONFIG_CPU_CAVIUM_OCTEON) += $(call cc-option,-march=octeon) -Wa,--trap ifeq (,$(findstring march=octeon, $(cflags-$(CONFIG_CPU_CAVIUM_OCTEON)))) cflags-$(CONFIG_CPU_CAVIUM_OCTEON) += -Wa,-march=octeon endif -cflags-$(CONFIG_CAVIUM_CN63XXP1) += -Wa,-mfix-cn63xxp1 +cflags-$(CONFIG_CAVIUM_CN63XXP1) += -Wa,$(call cc-option,-mfix-cn63xxp1) cflags-$(CONFIG_CPU_BMIPS) += -march=mips32 -Wa,-mips32 -Wa,--trap cflags-$(CONFIG_CPU_R4000_WORKAROUNDS) += $(call cc-option,-mfix-r4000,)
2014/1/15 David Daney <[email protected]>:
Quoted 9 lines · Florian Fainelli
Quoted 6 lines
Attempting to build for Cavium Octeon with an unpatched or old toolchain will fail due to the -mfix-cn63xxp1 option being unrecognized. Call cc-option on this option to make sure we can safely use it.
Signed-off-by Florian Fainelli <[email protected]>
Quoted 6 lines
NACK.
If the chip you are building for needs -Wa,-mfix-cn63xxp1, then building without this option yields a system the generates random errors. So I would argue that if -Wa,-mfix-cn63xxp1 is not supported by your assembler, breaking the build is the proper thing to do.
Fair enough. Maybe the condition should be refined to be based off CONFIG_CAVIUM_CN63XXP1?
Signature · 1 line
Florian
2014/1/15 Florian Fainelli <[email protected]>:
Quoted 12 lines
2014/1/15 David Daney <[email protected]>:
Quoted 11 lines · Florian Fainelli
Quoted 6 lines
Attempting to build for Cavium Octeon with an unpatched or old toolchain will fail due to the -mfix-cn63xxp1 option being unrecognized. Call cc-option on this option to make sure we can safely use it.
Signed-off-by Florian Fainelli <[email protected]>NACK.
Quoted 7 lines
Quoted 4 lines
If the chip you are building for needs -Wa,-mfix-cn63xxp1, then building without this option yields a system the generates random errors. So I would argue that if -Wa,-mfix-cn63xxp1 is not supported by your assembler, breaking the build is the proper thing to do.
Fair enough. Maybe the condition should be refined to be based off
CONFIG_CAVIUM_CN63XXP1?
Which is already the case... sorry for the noise.
Signature · 1 line
Florian