[U-Boot] [PATCH v3 3/5] MIPS: Optimize the setup of CPU optimization flags

daniel.schwierzeck at googlemail.com daniel.schwierzeck at googlemail.com
Mon Mar 28 18:33:56 CEST 2011


The current MIPS CPU config.mk code always expects a Mips 4kc
core. This is not appropiate for other CPUs and SoCs.

Replace the current MIPSFLAGS code by cc-option macro and use
-march=mips32r2 as default optimization level for all Mips32 CPUs.

Note: Since commit f62fb99941c625605aa16a0097b396a5c16d2c88 all
toolchains with binutils prior to v2.16 are not working anymore.
As agreed with Shinya Kuribayashi the support for those toolchains
will be dropped officially with this patch.

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck at googlemail.com>
Cc: Shinya Kuribayashi <skuribay at pobox.com>
Cc: Wolfgang Denk <wd at denx.de>
---
 arch/mips/cpu/mips32/config.mk |   15 ++++++++-------
 1 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/arch/mips/cpu/mips32/config.mk b/arch/mips/cpu/mips32/config.mk
index a173c54..4d1b273 100644
--- a/arch/mips/cpu/mips32/config.mk
+++ b/arch/mips/cpu/mips32/config.mk
@@ -20,13 +20,14 @@
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston,
 # MA 02111-1307 USA
 #
-v=$(shell $(AS) --version | grep 'GNU assembler' | egrep -o '2\.[0-9\.]+' | cut -d. -f2)
-MIPSFLAGS:=$(shell \
-if [ "$v" -lt "14" ]; then \
-	echo "-mcpu=4kc"; \
-else \
-	echo "-march=4kc -mtune=4kc"; \
-fi)
+
+#
+# Default optimization level for MIPS32
+#
+# Note: Toolchains with binutils prior to v2.16
+# are no longer supported by U-Boot MIPS tree!
+#
+MIPSFLAGS = -march=mips32r2

 ifneq (,$(findstring 4KCle,$(CROSS_COMPILE)))
 ENDIANNESS = -EL
--
1.7.4.1



More information about the U-Boot mailing list