summaryrefslogtreecommitdiff
path: root/cpu/mips/config.mk
diff options
context:
space:
mode:
authorwdenk <wdenk>2004-10-24 23:54:40 +0000
committerwdenk <wdenk>2004-10-24 23:54:40 +0000
commite3c9b9f9287a17c2a20d9b1b77747bd209e8408b (patch)
treed593a7dda5e74833be488ec9bdea6c20d1641e9e /cpu/mips/config.mk
parent14699a22cf47b83995d19877d2b938b2270defc0 (diff)
downloadu-boot-imx-e3c9b9f9287a17c2a20d9b1b77747bd209e8408b.zip
u-boot-imx-e3c9b9f9287a17c2a20d9b1b77747bd209e8408b.tar.gz
u-boot-imx-e3c9b9f9287a17c2a20d9b1b77747bd209e8408b.tar.bz2
* Fix configuration for ERIC board (needs more room)
* Adjust MIPS compiler options at run-time depending on tools version ("-march=4kc -mtune=4kc -Wa,-mips_allow_branch_to_undefined" for new, "-mcpu=4kc" for old tools)
Diffstat (limited to 'cpu/mips/config.mk')
-rw-r--r--cpu/mips/config.mk10
1 files changed, 9 insertions, 1 deletions
diff --git a/cpu/mips/config.mk b/cpu/mips/config.mk
index 1664e14..3c9aab8 100644
--- a/cpu/mips/config.mk
+++ b/cpu/mips/config.mk
@@ -20,5 +20,13 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
# MA 02111-1307 USA
#
+v=$(shell \
+mips-linux-as --version|grep "GNU assembler"|awk '{print $$3}'|awk -F . '{print $$2}')
+MIPSFLAGS=$(shell \
+if [ "$v" -lt "14" ]; then \
+ echo "-mcpu=4kc -EB -mabicalls"; \
+else \
+ echo "-march=4kc -mtune=4kc -Wa,-mips_allow_branch_to_undefined -EB -mabicalls"; \
+fi)
-PLATFORM_CPPFLAGS += -mcpu=4kc -EB -mabicalls
+PLATFORM_CPPFLAGS += $(MIPSFLAGS)