summaryrefslogtreecommitdiff
path: root/cpu/mips/config.mk
diff options
context:
space:
mode:
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)