* [U-Boot-Users] [PATCH] Mips AS call fixed.
@ 2006-04-10 22:28 Rodolfo Giometti
2006-04-11 7:17 ` Matej Kupljen
0 siblings, 1 reply; 3+ messages in thread
From: Rodolfo Giometti @ 2006-04-10 22:28 UTC (permalink / raw)
To: u-boot
Hello,
here a patch who fixes mips AS call.
Ciao,
Rodolfo
--
GNU/Linux Solutions e-mail: giometti at enneenne.com
Linux Device Driver giometti at gnudd.com
Embedded Systems giometti at linux.it
UNIX programming phone: +39 349 2432127
-------------- next part --------------
diff-tree 2723e70eed7268333fc38566237b7a3b27749312 (from 3a5e21881a194f4d4e053be8410d82a2458e8544)
Author: Rodolfo Giometti <giometti@zaigor.enneenne.com>
Date: Tue Apr 11 00:26:24 2006 +0200
Mips AS call fixed.
diff --git a/cpu/mips/config.mk b/cpu/mips/config.mk
index c357615..885dc7f 100644
--- a/cpu/mips/config.mk
+++ b/cpu/mips/config.mk
@@ -21,7 +21,7 @@
# MA 02111-1307 USA
#
v=$(shell \
-mips-linux-as --version|grep "GNU assembler"|awk '{print $$3}'|awk -F . '{print $$2}')
+$(AS) --version|grep "GNU assembler"|awk '{print $$3}'|awk -F . '{print $$2}')
MIPSFLAGS=$(shell \
if [ "$v" -lt "14" ]; then \
echo "-mcpu=4kc"; \
^ permalink raw reply related [flat|nested] 3+ messages in thread* [U-Boot-Users] [PATCH] Mips AS call fixed.
2006-04-10 22:28 [U-Boot-Users] [PATCH] Mips AS call fixed Rodolfo Giometti
@ 2006-04-11 7:17 ` Matej Kupljen
2006-04-11 9:55 ` Rodolfo Giometti
0 siblings, 1 reply; 3+ messages in thread
From: Matej Kupljen @ 2006-04-11 7:17 UTC (permalink / raw)
To: u-boot
Hi
> here a patch who fixes mips AS call.
I posted a new version of config.mk on August 24.
Please see this post:
http://sourceforge.net/mailarchive/message.php?msg_id=12736269
This config.mk tries to solve the big/little endian
toolchain problems. It works for me, but Wolfgang did
not include it in the official tree.
Maybe you can test it, if it works for you.
BR,
Matej
^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot-Users] [PATCH] Mips AS call fixed.
2006-04-11 7:17 ` Matej Kupljen
@ 2006-04-11 9:55 ` Rodolfo Giometti
0 siblings, 0 replies; 3+ messages in thread
From: Rodolfo Giometti @ 2006-04-11 9:55 UTC (permalink / raw)
To: u-boot
On Tue, Apr 11, 2006 at 09:17:12AM +0200, Matej Kupljen wrote:
>
> I posted a new version of config.mk on August 24.
> Please see this post:
> http://sourceforge.net/mailarchive/message.php?msg_id=12736269
>
> This config.mk tries to solve the big/little endian
> toolchain problems. It works for me, but Wolfgang did
> not include it in the official tree.
> Maybe you can test it, if it works for you.
Yes it works... even if I made some little modifications. Here my
proposal:
v=$(shell \
$(AS) --version|grep "GNU assembler"|awk '{print $$3}'|awk -F . '{print $$2}')
MIPSCFLAGS=$(shell \
if [ "$v" -lt "14" ]; then \
echo "-mcpu=4kc"; \
else \
echo "-march=4kc -mtune=4kc"; \
fi)
MIPSCFLAGS += -mabicalls
# Check the default ENDIANNESS of the cross compiler
e=$(shell \
TMPDIR=`mktemp -d`; \
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'; \
)
ifneq ($e,"little")
MIPSLDFLAGS += -EL
else
MIPSLDFLAGS += -EB
endif
PLATFORM_CPPFLAGS += $(MIPSCFLAGS)
PLATFORM_LDFLAGS += $(MIPSLDFLAGS)
As you can see I call AS with "$(AS)" and not with
"$(CROSS_COMPILE)as" since variable "AS" is already defined and I
added "MIPSCFLAGS" and "MIPSLDFLAGS" where I specify "-EL" or "-EB".
Please, note also that "-Wa,-allow_branch_to_undefined" is no more
necessary due my patch
"http://sourceforge.net/mailarchive/message.php?msg_id=13328221".
Also I suggest this patch for the examples directory:
diff --git a/examples/Makefile b/examples/Makefile
index 62c4e6d..30ce77d 100644
--- a/examples/Makefile
+++ b/examples/Makefile
@@ -100,10 +100,6 @@ SREC += eepro100_eeprom.srec
BIN += eepro100_eeprom.bin eepro100_eeprom
endif
-ifeq ($(BIG_ENDIAN),y)
-EX_LDFLAGS += -EB
-endif
-
OBJS = $(SREC:.srec=.o)
LIB = libstubs.a
@@ -129,7 +125,7 @@ $(LIB): .depend $(LIBOBJS)
$(AR) crv $@ $(LIBOBJS)
%: %.o $(LIB)
- $(LD) -g $(EX_LDFLAGS) -Ttext $(LOAD_ADDR) \
+ $(LD) -g $(PLATFORM_LDFLAGS) -Ttext $(LOAD_ADDR) \
-o $@ -e $(<:.o=) $< $(LIB) \
-L$(gcclibdir) -lgcc
%.srec: %
since endianess should be defined each time by "PLATFORM_LDFLAGS"
instead of "EX_LDFLAGS".
Ciao,
Rodolfo
--
GNU/Linux Solutions e-mail: giometti at enneenne.com
Linux Device Driver giometti at gnudd.com
Embedded Systems giometti@linux.it
UNIX programming phone: +39 349 2432127
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.denx.de/pipermail/u-boot/attachments/20060411/eb00b730/attachment.pgp
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-04-11 9:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-10 22:28 [U-Boot-Users] [PATCH] Mips AS call fixed Rodolfo Giometti
2006-04-11 7:17 ` Matej Kupljen
2006-04-11 9:55 ` Rodolfo Giometti
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox