Skip to contentSkip to conversation

Fix toolchain restriction for little endian build

U-Boot-Users Shinya Kuribayashi 2 participants 2 messages Sep 24, 2007

lore
Share & tools
lore
#0 lore raw

Fix ENDIANNESS condition to allow gcc toolchains other than ELDK.

---

 cpu/mips/config.mk |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
cpu/mips/config.mk +1 -1
index b29986e..1a4e800 100644
@@ -29,7 +29,7 @@ else \
 	echo "-march=4kc -mtune=4kc"; \
 fi)
 
-ifneq (,$(findstring 4KCle,$(CROSS_COMPILE)))
+ifneq (,$(shell $(CC) -dumpmachine |grep 'mips.*el-.*'))
 ENDIANNESS = -EL
 else
 ENDIANNESS = -EB
#1 lore raw

Dear Shinya Kuribayashi,

Quoted 3 lines · in message <[email protected]> you wrote:

Fix ENDIANNESS condition to allow gcc toolchains other than ELDK.

Thanks you very much for your patch.

cpu/mips/config.mk else \ · line 35

Quoted 5 lines
cpu/mips/config.mk +1 -1
-ifneq (,$(findstring 4KCle,$(CROSS_COMPILE)))
+ifneq (,$(shell $(CC) -dumpmachine |grep 'mips.*el-.*'))
 ENDIANNESS = -EL
 else
 ENDIANNESS = -EB

I'm afraid I don't understand how this is supposed to work. For example, I get this using ELDK 4.x:

	-> export CROSS_COMPILE=mips_4KC-
	-> mips_4KC-gcc -dumpmachine
	mips-linux
	-> export CROSS_COMPILE=mips_4KCle-
	-> mips_4KCle-gcc -dumpmachine
	mips-linux
	-> 

So this change might work with other toolchains (I'm not sure if it does), but it definitely breaks ELDK support.

Am I missing something?

Best regards,

Wolfgang Denk

Signature · 4 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
A day without sunshine is like night.