public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] Re: MIPS LE build problems
@ 2005-08-18 21:38 Wolfgang Denk
  2005-08-18 23:11 ` Zachary Landau
                   ` (3 more replies)
  0 siblings, 4 replies; 37+ messages in thread
From: Wolfgang Denk @ 2005-08-18 21:38 UTC (permalink / raw)
  To: u-boot

In message <4304D3FD.7080107@smiths-aerospace.com> you wrote:
>
> As noted in other email in this thread, executing the above code won't 
> work.  What about simply compiling a file containing:
> 
> constant int data = 0x01234567;
> 
> objdumping the data section, and looking (grepping) to see if the data 
> section has 0x12345678 or 0x78563412?

Doesn't work as objdump will be user friendly and  always  print  the
"correct" value, i. e. 0x01234567.

But the idea is good.

The attached test script works with the tool chains available to  me.
Can others please test this, too?

Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Many aligators will be slain, but the swamp will remain.

-------------- next part --------------
#!/bin/sh

set -e
# make sure CROSS_COMPILE is defined
[ "${CROSS_COMPILE}" ]

# create temp directory
TMPDIR=`mktemp -d`

# and make sure it gets removed automagically
trap 'rm -fr ${TMPDIR}' 0 1 2 3 15

>${TMPDIR}/foo.c
${CROSS_COMPILE}gcc -c ${TMPDIR}/foo.c -o ${TMPDIR}/foo.o
readelf -h ${TMPDIR}/foo.o | \
sed -n 's/.*Data:.* \([^ ][^ ]*\) endian/\1/p'

exit 0

^ permalink raw reply	[flat|nested] 37+ messages in thread
* [U-Boot-Users] MIPS LE build problems
@ 2005-08-08 21:13 Wolfgang Denk
  2005-08-09 16:59 ` [U-Boot-Users] " Thomas Lange
  0 siblings, 1 reply; 37+ messages in thread
From: Wolfgang Denk @ 2005-08-08 21:13 UTC (permalink / raw)
  To: u-boot

Dear Thomas,

I always wondered what exactly was the reason why I was not  able  to
build  the dbau1x00 targets (especially the little endian dbau1550_el
target using the ELDK toolchain). Also, I always wondered  about  the
reference to a non-exitent cpu/mips/little/liblittle.a library.

Is ther ea special reason for the current settings of  build  options
for the dbau1x00 targets?

Attached below is a patch which makes all dbau1x00 targets build fine
with the current ELDK, and I believe these settings are more  correct
than the previous ones.

If you don't protest I would like to merge this patch into the public
source tree?

Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Remember, there's a big difference between kneeling down and  bending
over.                                                   - Frank Zappa

-------------- next part --------------
Fix dbau1xxx (= MIPS big and little endian) build options.
Incorrect gcc options (big endian -BE switch) were used for
dbau1550_el which is a little endian build; also get rid of reference
to non-existant cpu/mips/little/liblittle.a library

---
commit 2191923072413972d8dbf3e1b2f8ce6762a85800
tree 7466fe41f385b14b572d4765f5aaadaccd8a48d2
parent 700a0c648df72f2c8e0589c0d0470b5ffd7cab7b
author Wolfgang Denk <wd@pollux.denx.de> Mon, 08 Aug 2005 23:06:32 +0200
committer Wolfgang Denk <wd@pollux.denx.de> Mon, 08 Aug 2005 23:06:32 +0200

 Makefile           |    2 +-
 cpu/mips/config.mk |   12 ++++++++++--
 2 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile
--- a/Makefile
+++ b/Makefile
@@ -1615,7 +1615,7 @@ dbau1550_config		:	unconfig
 dbau1550_el_config	:	unconfig
 	@ >include/config.h
 	@echo "#define CONFIG_DBAU1550 1" >>include/config.h
-	@./mkconfig -a dbau1x00 mips mips dbau1x00 "" little
+	@./mkconfig -a dbau1x00 mips mips dbau1x00
 
 #########################################################################
 ## MIPS64 5Kc
diff --git a/cpu/mips/config.mk b/cpu/mips/config.mk
--- a/cpu/mips/config.mk
+++ b/cpu/mips/config.mk
@@ -24,9 +24,17 @@ 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"; \
+	echo "-mcpu=4kc"; \
 else \
-	echo "-march=4kc -mtune=4kc -Wa,-mips_allow_branch_to_undefined -EB -mabicalls"; \
+	echo "-march=4kc -mtune=4kc -Wa,-mips_allow_branch_to_undefined"; \
 fi)
 
+ifneq (,$(findstring 4KCle,$(CROSS_COMPILE)))
+ENDIANNESS = -EL
+else
+ENDIANNESS = -EB
+endif
+
+MIPSFLAGS += $(ENDIANNESS) -mabicalls
+
 PLATFORM_CPPFLAGS += $(MIPSFLAGS)

^ permalink raw reply	[flat|nested] 37+ messages in thread

end of thread, other threads:[~2005-08-24  8:54 UTC | newest]

Thread overview: 37+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-18 21:38 [U-Boot-Users] Re: MIPS LE build problems Wolfgang Denk
2005-08-18 23:11 ` Zachary Landau
2005-08-18 23:28   ` Wolfgang Denk
2005-08-20  7:51 ` Matej Kupljen
2005-08-22  8:53 ` Leif Lindholm
2005-08-22  8:59   ` Wolfgang Denk
2005-08-24  8:54 ` Matej Kupljen
  -- strict thread matches above, loose matches on Subject: below --
2005-08-08 21:13 [U-Boot-Users] " Wolfgang Denk
2005-08-09 16:59 ` [U-Boot-Users] " Thomas Lange
2005-08-09 19:47   ` Matej Kupljen
2005-08-09 20:56     ` Thomas Lange
2005-08-09 22:06     ` Thomas Lange
2005-08-09 23:23       ` Andrew Dyer
2005-08-10  6:06         ` Matej Kupljen
2005-08-10  6:52         ` Wolfgang Denk
2005-08-10  7:01           ` Matej Kupljen
2005-08-10  7:32             ` Wolfgang Denk
2005-08-10  7:43               ` Matej Kupljen
2005-08-10  8:45                 ` Wolfgang Denk
2005-08-10  9:13                   ` Matej Kupljen
2005-08-10 10:18                     ` Wolfgang Denk
2005-08-17  7:07               ` Matej Kupljen
2005-08-17  8:08                 ` Wolfgang Denk
2005-08-17  8:24                   ` Matej Kupljen
2005-08-17 13:44                     ` Wolfgang Denk
2005-08-18  6:31                       ` Matej Kupljen
2005-08-18  8:46                         ` Wolfgang Denk
2005-08-18  9:01                           ` Matej Kupljen
2005-08-18  8:42                   ` Matej Kupljen
2005-08-18  8:51                     ` Wolfgang Denk
2005-08-18  9:08                       ` Matej Kupljen
2005-08-18 19:54                         ` Udi Finkelstein
2005-08-18 20:56                           ` Wolfgang Denk
2005-08-19  8:59                             ` Udi Finkelstein
2005-08-18 20:46                         ` Wolfgang Denk
2005-08-19  4:55                           ` Matej Kupljen
2005-08-18 18:31                     ` Jerry Van Baren
2005-08-10  6:05       ` Matej Kupljen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox