projects
/
oweals
/
u-boot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
mips: Fix baudrate divisor computation on alchemy cpus
[oweals/u-boot.git]
/
cpu
/
mips
/
config.mk
diff --git
a/cpu/mips/config.mk
b/cpu/mips/config.mk
index 3c9aab8dfe64b18110f541bc9277e2c864c48ac4..a173c5480c0131e2c89808fee7f6398737061b52 100644
(file)
--- a/
cpu/mips/config.mk
+++ b/
cpu/mips/config.mk
@@
-20,13
+20,20
@@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
# MA 02111-1307 USA
#
# 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 \
+v=$(shell $(AS) --version | grep 'GNU assembler' | egrep -o '2\.[0-9\.]+' | cut -d. -f2)
+MIPSFLAGS:=$(shell \
if [ "$v" -lt "14" ]; then \
if [ "$v" -lt "14" ]; then \
- echo "-mcpu=4kc
-EB -mabicalls
"; \
+ echo "-mcpu=4kc"; \
else \
else \
- echo "-march=4kc -mtune=4kc
-Wa,-mips_allow_branch_to_undefined -EB -mabicalls
"; \
+ echo "-march=4kc -mtune=4kc"; \
fi)
fi)
+ifneq (,$(findstring 4KCle,$(CROSS_COMPILE)))
+ENDIANNESS = -EL
+else
+ENDIANNESS = -EB
+endif
+
+MIPSFLAGS += $(ENDIANNESS)
+
PLATFORM_CPPFLAGS += $(MIPSFLAGS)
PLATFORM_CPPFLAGS += $(MIPSFLAGS)