aboutsummaryrefslogtreecommitdiffstats
path: root/package/uboot-lantiq/patches/010-fix-mips-flags.patch
diff options
context:
space:
mode:
Diffstat (limited to 'package/uboot-lantiq/patches/010-fix-mips-flags.patch')
-rw-r--r--package/uboot-lantiq/patches/010-fix-mips-flags.patch25
1 files changed, 25 insertions, 0 deletions
diff --git a/package/uboot-lantiq/patches/010-fix-mips-flags.patch b/package/uboot-lantiq/patches/010-fix-mips-flags.patch
new file mode 100644
index 000000000..6dd7d8f56
--- /dev/null
+++ b/package/uboot-lantiq/patches/010-fix-mips-flags.patch
@@ -0,0 +1,25 @@
+--- a/cpu/mips/config.mk
++++ b/cpu/mips/config.mk
+@@ -23,17 +23,19 @@
+ 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"; \
++ echo "-mcpu=mips32"; \
+ else \
+- echo "-march=4kc -mtune=4kc"; \
++ echo "-mips32 -march=mips32 -mtune=mips32"; \
+ fi)
+
++ifndef ENDIANNESS
+ ifneq (,$(findstring 4KCle,$(CROSS_COMPILE)))
+ ENDIANNESS = -EL
+ else
+ ENDIANNESS = -EB
+ endif
++endif
+
+-MIPSFLAGS += $(ENDIANNESS)
++MIPSFLAGS += $(ENDIANNESS) -fno-schedule-insns -fno-schedule-insns2
+
+ PLATFORM_CPPFLAGS += $(MIPSFLAGS)