From 0315a28909aa9781706bcd5743f2665220b6b099 Mon Sep 17 00:00:00 2001 From: Daniel Schwierzeck Date: Sat, 26 Dec 2015 19:55:37 +0100 Subject: MIPS: Kconfig: optimize gcc -march and -mtune setup Move setup of -march to arch/mips/Makefile and follow the design on ARM. Also add a possibility to chose specific CPU tune options. Signed-off-by: Wills Wang Signed-off-by: Daniel Schwierzeck --- arch/mips/Makefile | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'arch/mips/Makefile') diff --git a/arch/mips/Makefile b/arch/mips/Makefile index 6a9f798..90cd590 100644 --- a/arch/mips/Makefile +++ b/arch/mips/Makefile @@ -13,3 +13,16 @@ machdirs := $(patsubst %,arch/mips/mach-%/,$(machine-y)) libs-y += $(machdirs) PLATFORM_CPPFLAGS += $(patsubst %,-I$(srctree)/%include,$(machdirs)) + +# Optimize for MIPS architectures +arch-$(CONFIG_CPU_MIPS32_R1) += -march=mips32 -Wa,-mips32 +arch-$(CONFIG_CPU_MIPS32_R2) += -march=mips32r2 -Wa,-mips32r2 +arch-$(CONFIG_CPU_MIPS64_R1) += -march=mips64 -Wa,-mips64 +arch-$(CONFIG_CPU_MIPS64_R2) += -march=mips64r2 -Wa,-mips64r2 + +# Allow extra optimization for specific CPUs/SoCs +tune-$(CONFIG_MIPS_TUNE_4KC) += -mtune=4kc +tune-$(CONFIG_MIPS_TUNE_14KC) += -mtune=14kc +tune-$(CONFIG_MIPS_TUNE_24KC) += -mtune=24kc + +PLATFORM_CPPFLAGS += $(arch-y) $(tune-y) -- cgit v1.1