public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] 2.0b1/eCosCentric ARM tools little-endian only?
@ 2003-05-01 15:59 Grant Edwards
  2003-05-01 21:26 ` Grant Edwards
  0 siblings, 1 reply; 5+ messages in thread
From: Grant Edwards @ 2003-05-01 15:59 UTC (permalink / raw)
  To: eCos Discussion


I downloaded and installed eCos 2.0b1 for arm-elf using the
download/install tool from the web page.  I've built eCos libs
for my target (which is big-endian).  IOW, the following works
fine:

  $ ecosconfig new <target>
  $ ecosconfig tree
  $ make

However, when I try to build tests the link fails because the
toolchain from eCosCentric only supports little-endian (AFAICT):

  $ make tests
  [...]
  make -r -C hal/common/v2_0b1 tests
  make[1]: Entering directory `/home/grante/ecos/hal/common/v2_0b1'
  arm-elf-gcc -mcpu=arm7tdmi -mbig-endian -g -nostdlib -Wl,--gc-sections -Wl,-static -L/home/grante/ecos/install/lib -Ttarget.ld -o /home/grante/ecos/install/tests/hal/common/v2_0b1/tests/context tests/context.o
  /opt/ecos/gnutools/arm-elf/bin/../lib/gcc-lib/arm-elf/3.2.1/../../../../arm-elf/bin/ld: /opt/ecos/gnutools/arm-elf/bin/../lib/gcc-lib/arm-elf/3.2.1/libgcc.a(_udivsi3.o): compiled for a little endian system and target is big endian
  File in wrong format: failed to merge target specific data of file /opt/ecos/gnutools/arm-elf/bin/../lib/gcc-lib/arm-elf/3.2.1/libgcc.a(_udivsi3.o)

Was this a conscious decision?

Has anybody been able to build an app for a big-endian ARM
platform using this toolchain?

Are there any other big-endian ARM targets I can try building?

The compiler version is 3.2.1:

  $ arm-elf-gcc --version
  arm-elf-gcc (GCC) 3.2.1 (eCosCentric)

Why does gcc pick the wrong libgcc.a even though it was told
-mbig-endian?

-- 
Grant Edwards
grante@visi.com

-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss

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

* Re: [ECOS] 2.0b1/eCosCentric ARM tools little-endian only?
  2003-05-01 15:59 [ECOS] 2.0b1/eCosCentric ARM tools little-endian only? Grant Edwards
@ 2003-05-01 21:26 ` Grant Edwards
  2003-05-01 21:34   ` Gary D. Thomas
  0 siblings, 1 reply; 5+ messages in thread
From: Grant Edwards @ 2003-05-01 21:26 UTC (permalink / raw)
  To: eCos Discussion


> However, when I try to build tests the link fails because the
> toolchain from eCosCentric only supports little-endian
> (AFAICT).

Rats. I just build gcc from sources use the instructions on the
ecos web site, and it only build little-endian support libs also.

I swear that "make" used to build both...

How do I get big-endian support libs built?

-- 
Grant Edwards
grante@visi.com

-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss

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

* Re: [ECOS] 2.0b1/eCosCentric ARM tools little-endian only?
  2003-05-01 21:26 ` Grant Edwards
@ 2003-05-01 21:34   ` Gary D. Thomas
  2003-05-02  0:53     ` Grant Edwards
  0 siblings, 1 reply; 5+ messages in thread
From: Gary D. Thomas @ 2003-05-01 21:34 UTC (permalink / raw)
  To: Grant Edwards; +Cc: eCos Discussion

[-- Attachment #1: Type: text/plain, Size: 732 bytes --]

On Thu, 2003-05-01 at 15:22, Grant Edwards wrote:
> > However, when I try to build tests the link fails because the
> > toolchain from eCosCentric only supports little-endian
> > (AFAICT).
> 
> Rats. I just build gcc from sources use the instructions on the
> ecos web site, and it only build little-endian support libs also.
> 
> I swear that "make" used to build both...
> 
> How do I get big-endian support libs built?

I did it using the attached patch which I adapted from the version
used by eCosCentric.  

Note: this builds a gazillion libraries (I don't understand fully 
how to prune it back), but it does work properly for big endian 
targets (like the iXP425 I'm working with).

-- 
Gary D. Thomas <gary.thomas@mind.be>

[-- Attachment #2: arm-elf-gcc.patch --]
[-- Type: text/plain, Size: 2032 bytes --]

--- src.orig/gcc-3.2.2/gcc/config/arm/t-arm-elf	Fri Sep 14 04:19:30 2001
+++ src/gcc-3.2.2/gcc/config/arm/t-arm-elf	Wed Apr  2 21:49:50 2003
@@ -21,14 +21,44 @@
 	cat $(srcdir)/config/fp-bit.c >> dp-bit.c
 
 	
-MULTILIB_OPTIONS     = marm/mthumb
-MULTILIB_DIRNAMES    = arm thumb
-MULTILIB_EXCEPTIONS  = 
+# Note - the selection of multilibs here has
+# been tailored to the requirements of eCos.
+
+MULTILIB_OPTIONS     = mthumb
+MULTILIB_DIRNAMES    = thumb
+
+MULTILIB_OPTIONS    += mthumb-interwork
+MULTILIB_DIRNAMES   += interwork
+
+MULTILIB_OPTIONS    += mcpu=xscale mcpu=strongarm1110 mcpu=arm9tdmi
+MULTILIB_DIRNAMES   += xscale strongarm armv4t
+
+# Note: the multilib_exceptions matches both -mthumb and
+# -mthumb-interwork
+MULTILIB_EXCEPTIONS += *mthumb*/*mcpu=strongarm*
+MULTILIB_EXCEPTIONS += *mcpu=xscale*/*mcpu=strongarm*
+MULTILIB_EXCEPTIONS += *mcpu=xscale*/*mcpu=arm9*
+MULTILIB_EXCEPTIONS += *mcpu=strongarm*/*mcpu=arm9*
+
+# We have to match all the arm cpu variants which are similar to the
+# StrongARM 1110 or the ARM 9TDMI.
+# Note that in the following the ? is interpreted as an = for the
+# purposes of matching command line options.
+MULTILIB_MATCHES    += mcpu?strongarm1110=mcpu?strongarm
+MULTILIB_MATCHES    += mcpu?strongarm1110=mcpu?strongarm110
+MULTILIB_MATCHES    += mcpu?strongarm1110=mcpu?strongarm1100
+MULTILIB_MATCHES    += mcpu?arm9tdmi=mcpu?arm9
+MULTILIB_MATCHES    += mcpu?arm9tdmi=mcpu?arm920t
+MULTILIB_MATCHES    += mcpu?arm9tdmi=mcpu?arm940t
+
+#MULTILIB_OPTIONS     = marm/mthumb
+#MULTILIB_DIRNAMES    = arm thumb
+#MULTILIB_EXCEPTIONS  = 
 	
-# MULTILIB_OPTIONS     = mlittle-endian/mbig-endian
-# MULTILIB_DIRNAMES    = le be
-# MULTILIB_EXCEPTIONS  = 
-# MULTILIB_MATCHES     = mbig-endian=mbe mlittle-endian=mle
+MULTILIB_OPTIONS     += mlittle-endian/mbig-endian
+MULTILIB_DIRNAMES    += le be
+MULTILIB_EXCEPTIONS  += 
+MULTILIB_MATCHES     += mbig-endian=mbe mlittle-endian=mle
 # 
 # MULTILIB_OPTIONS    += mhard-float/msoft-float
 # MULTILIB_DIRNAMES   += fpu soft


[-- Attachment #3: Type: text/plain, Size: 146 bytes --]

-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss

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

* Re: [ECOS] 2.0b1/eCosCentric ARM tools little-endian only?
  2003-05-01 21:34   ` Gary D. Thomas
@ 2003-05-02  0:53     ` Grant Edwards
  2003-05-02  1:09       ` Gary D. Thomas
  0 siblings, 1 reply; 5+ messages in thread
From: Grant Edwards @ 2003-05-02  0:53 UTC (permalink / raw)
  To: Gary D. Thomas; +Cc: eCos Discussion

On Thu, May 01, 2003 at 03:34:36PM -0600, Gary D. Thomas wrote:
> On Thu, 2003-05-01 at 15:22, Grant Edwards wrote:

> > Rats. I just build gcc from sources use the instructions on the
> > ecos web site, and it only build little-endian support libs also.
> > 
> > I swear that "make" used to build both...
> > 
> > How do I get big-endian support libs built?
> 
> I did it using the attached patch which I adapted from the version
> used by eCosCentric.  
> 
> Note: this builds a gazillion libraries (I don't understand fully 
> how to prune it back), but it does work properly for big endian 
> targets (like the iXP425 I'm working with).

Thanks!  I'm working on ARM7 right now, but IXP425 is next on
the agenda.  Not sure if we're going to do eCos for it.

Do you have eCos drivers working?

The scary thing is I have no recollection of how I got
big-endian libraries when I built 2.95.2.

-- 
Grant Edwards
grante@visi.com


-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss

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

* Re: [ECOS] 2.0b1/eCosCentric ARM tools little-endian only?
  2003-05-02  0:53     ` Grant Edwards
@ 2003-05-02  1:09       ` Gary D. Thomas
  0 siblings, 0 replies; 5+ messages in thread
From: Gary D. Thomas @ 2003-05-02  1:09 UTC (permalink / raw)
  To: Grant Edwards; +Cc: eCos Discussion

On Thu, 2003-05-01 at 18:58, Grant Edwards wrote:
> On Thu, May 01, 2003 at 03:34:36PM -0600, Gary D. Thomas wrote:
> > On Thu, 2003-05-01 at 15:22, Grant Edwards wrote:
> 
> > > Rats. I just build gcc from sources use the instructions on the
> > > ecos web site, and it only build little-endian support libs also.
> > > 
> > > I swear that "make" used to build both...
> > > 
> > > How do I get big-endian support libs built?
> > 
> > I did it using the attached patch which I adapted from the version
> > used by eCosCentric.  
> > 
> > Note: this builds a gazillion libraries (I don't understand fully 
> > how to prune it back), but it does work properly for big endian 
> > targets (like the iXP425 I'm working with).
> 
> Thanks!  I'm working on ARM7 right now, but IXP425 is next on
> the agenda.  Not sure if we're going to do eCos for it.
> 
> Do you have eCos drivers working?
> 
> The scary thing is I have no recollection of how I got
> big-endian libraries when I built 2.95.2.

I think the multilibs used to be set up more generically,
i.e. big-endian was included by default.

-- 
Gary D. Thomas <gary.thomas@mind.be>


-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss

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

end of thread, other threads:[~2003-05-02  1:09 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-01 15:59 [ECOS] 2.0b1/eCosCentric ARM tools little-endian only? Grant Edwards
2003-05-01 21:26 ` Grant Edwards
2003-05-01 21:34   ` Gary D. Thomas
2003-05-02  0:53     ` Grant Edwards
2003-05-02  1:09       ` Gary D. Thomas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).