Re: Re: Re: eCos arm-eabi GNU tools - test release 4.6.3-20120623

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 27/06/12 17:38, Stanislav Meduna wrote:
> On 27.06.2012 18:22, David Fernandez wrote:
>
>>> You will find multilibs for all architectures of interest for eCos under
>>> gnutools/arm-eabi/lib/gcc/arm-eabi/4.6.3/ directory. This multilib
>>> configuration is produced by gcc-4.6.3-ecos-120524_t-arm-elf.diff.
>> Ilija, are you then saying that gcc does not do it right as-is, and we
>> need to patch it?
> FWIW I do not remember such problems - I am compiling for an ARM9
> and a thumb2 with the same toolchain and it works. I did not test
> 4.6.3 specifically, but it worked for 4.5.something compiled
> under MinGW (although with other problems) and works for 4.7
> canadian cross (built on linux targeting MinGW and compiling
> for eCos).

It will work with ARM9, because the default options will generate ARM32
code. But, if you compiled that gcc for newlib, then if you try to
compile code for Cortex-M3, which runs only in thumb-2 mode, or just
with -mthumb, then you will get in trouble, as your crt0.o will have
ARM32 code, unless you disable the startup files, as eCos does in
(almost) all cases.

The fact that you have to change the default options explicitly
(--with-cpu=cortex-m3 --with-mode=thumb --with-arch=armv7-m) to get
crt0.S compiled in thumb-mode, means that newlib is not getting compiled
multiple times to support all the cpus that arm-eabi-gcc allows you to
compile for.

So I wonder if that is a problem of newlib not being compliant with gcc
multilib, or if it is the gcc build system that does not work well with
other libraries like newlib (have not tested if the same happens for the
standard gcc C library), or if I'm missing some configure parameter or
gcc build procedure.

> As far as I remember the abovementioned patch only tweaks what
> multilibs from the zillion possible actually get build.

That might solve the problem if it makes gcc to compile newlib with
-mcpu=cortex-m3 -mthumb -march=armv7-m, in addition to the default -marm
(and whatever default cpu and architecture it uses when not explicitly
told).

> I can't rule out some other patch affecting it, but in case
> of such problems I'd suspect some bash/autotools/make/sed/whatever
> incompatibility first. Trying in a from-scratch environment
> is the first step.
>
That might be, but I check that I get the latest distro packages for
them... I wonder if there is some version requirements for those
indicated anywhere for each gcc version.

Let me know if you find something.

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



[Index of Archives]     [Linux Embedded]     [U-Boot V2]     [Linux Kernel]     [Linux MIPS]     [Linux ARM]     [Linux for the Blind]     [Yosemite]     [ISDN Cause Codes]     [eCos Home]

  Powered by Linux