public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Johannes Stezenbach <js@sig21.net>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] EABI Problem
Date: Mon, 5 Nov 2007 17:18:53 +0100	[thread overview]
Message-ID: <20071105161853.GA28049@sig21.net> (raw)
In-Reply-To: <20071102153715.GB28037@linuxtv.org>

Hi again,

On Fri, Nov 02, 2007, Johannes Stezenbach wrote:
> 
> I don't know about NAND, but I had problems building KB9202B with
> the CodeSourcery ARM EABI toolchain, too, solved like that:
> 
> http://sourceforge.net/mailarchive/message.php?msg_name=20071025161052.790841794%40sig21.net
> 
> 
> I'm confused to see that the toplevel Makefile has
> 
>   # Add GCC lib
>   PLATFORM_LIBS += -L $(shell dirname `$(CC) $(CFLAGS) -print-libgcc-file-name`) -lgcc
> 
> but then there are also libgcc replacement functions in lib_arm/.

BTW, I only deleted the

  PLATFORM_CPPFLAGS +=$(call cc-option,-mapcs-32,-mabi=apcs-gnu)

line from cpu/arm920t/config.mk because u-boot links libgcc,
and the CodeSourcery toolchain doesn't have a non-EABI libgcc,
and I assumed it wouldn't build then.

Turns out this is unnecessary, and with this option left in place
libgcc isn't even used (confirmed by commenting out in the
PLATFORM_LIBS line in the top level Makefile).

So I now only need two tiny patches:

---
fix warning: "warning: target CPU does not support interworking"
when compiling with CodeSourcery gcc-4.2.1/binutils-2.18.50

diff -ruNp u-boot-1.3.0-rc3/cpu/arm920t/config.mk u-boot-1.3.0-rc3.my/cpu/arm920t/config.mk
--- u-boot-1.3.0-rc3/cpu/arm920t/config.mk	2007-10-14 00:13:19.000000000 +0200
+++ u-boot-1.3.0-rc3.my/cpu/arm920t/config.mk	2007-11-05 14:31:19.000000000 +0100
@@ -24,7 +24,7 @@
 PLATFORM_RELFLAGS += -fno-strict-aliasing  -fno-common -ffixed-r8 \
 	-msoft-float
 
-PLATFORM_CPPFLAGS += -march=armv4
+PLATFORM_CPPFLAGS += -march=armv4t
 # =========================================================================
 #
 # Supply options according to compiler version


---
fix compile error: "start.S:205: Error: invalid constant (20200) after fixup"

diff -ruNp u-boot-1.3.0-rc3/include/configs/kb9202.h u-boot-1.3.0-rc3.my/include/configs/kb9202.h
--- u-boot-1.3.0-rc3/include/configs/kb9202.h	2007-10-14 00:13:19.000000000 +0200
+++ u-boot-1.3.0-rc3.my/include/configs/kb9202.h	2007-11-05 14:37:17.000000000 +0100
@@ -57,7 +57,7 @@
 /*
  * Size of malloc() pool
  */
-#define CFG_MALLOC_LEN	(CFG_ENV_SIZE + 128*1024)
+#define CFG_MALLOC_LEN	(128*1024)
 #define CFG_GBL_DATA_SIZE	128	/* size in bytes reserved for initial data */
 
 #define CONFIG_BAUDRATE 115200


--------------------------

For the first patch I wonder if it is compatbile with ELDK.
The arm920t _is_ arm4vt, but maybe it needs something like
  
  PLATFORM_CPPFLAGS += $(call cc-option,-march=armv4t,-march=armv4)

to support older gcc versions. It would be nice if someone could
test this, maybe the issue could then be resolved pretty easily.
I guess some others also would appreciate a proper fix in 1.3.0 final:
http://bugzilla.openmoko.org/cgi-bin/bugzilla/show_bug.cgi?id=180


For the second patch I don't know what the correct fix is but
this is what KwikByte has in their u-boot patch. Works for me.
(And, grepping through include/config/, it's what most other
boards seem to do.)

> Could someone knowledgable please fill me in what the goal is?
> 
> a) use libgcc and then work around issues like missing raise()
>    and maybe also link libgcc_eh.a
> 
> b) don't use libgcc, provide necessary functions in lib_<arch>
>    (like the Linux kernel does)

I'm still hoping to get an answer. If the goal is to get
rid of libgcc dependency then I guess people would start
sending patches to do so. Currently it seems no one knows.
I think this is an essential point which needs to be documented.


Thanks,
Johannes

  reply	other threads:[~2007-11-05 16:18 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-01 16:02 [U-Boot-Users] EABI Problem Russ Ferriday
2007-11-02 15:37 ` Johannes Stezenbach
2007-11-05 16:18   ` Johannes Stezenbach [this message]
2007-11-05 19:26     ` Wolfgang Denk
2007-11-05 21:25       ` Johannes Stezenbach
2007-11-06  5:31         ` Stefan Roese
2007-11-06  7:33           ` Wolfgang Denk
2007-11-06 13:30             ` Philip Balister
2007-11-16 20:39         ` Wolfgang Denk
  -- strict thread matches above, loose matches on Subject: below --
2007-07-05 17:11 [U-Boot-Users] EABI problem Patrice Vilchez
2007-07-06 13:29 ` Peter Pearse
2007-07-06 13:45   ` Patrice Vilchez
2007-07-06 14:02     ` Philip Balister
2007-07-06 14:15       ` Patrice Vilchez
2007-07-06 14:22         ` Philip Balister
2007-07-06 14:33           ` Patrice Vilchez

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20071105161853.GA28049@sig21.net \
    --to=js@sig21.net \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox