summaryrefslogtreecommitdiffstats
path: root/arch/mips/Makefile
diff options
context:
space:
mode:
authorDaniel Schwierzeck <daniel.schwierzeck@gmail.com>2015-12-26 19:55:37 +0100
committerDaniel Schwierzeck <daniel.schwierzeck@gmail.com>2016-01-16 21:06:46 +0100
commit0315a28909aa9781706bcd5743f2665220b6b099 (patch)
treec87b0a889f15f974f0082f9b02b9c7788c6ed265 /arch/mips/Makefile
parent76ada5f8b7bb4b295ced087bd3c34eb8161a1a75 (diff)
downloadtalos-obmc-uboot-0315a28909aa9781706bcd5743f2665220b6b099.tar.gz
talos-obmc-uboot-0315a28909aa9781706bcd5743f2665220b6b099.zip
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 <wills.wang@live.com> Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Diffstat (limited to 'arch/mips/Makefile')
-rw-r--r--arch/mips/Makefile13
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/mips/Makefile b/arch/mips/Makefile
index 6a9f798d56..90cd5906c6 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)
OpenPOWER on IntegriCloud