This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Cross-Compiling gcc 3.2.3 for arm-elf


Hello Daniel!

I finally achieved the whole build processed with interworking and c++ enabled 
for arm-elf following Richard Earnshaw instructions (found here 
: http://sources.redhat.com/ml/crossgcc/2002-01/msg00139.html).

The build succeeded but I didn't run any dejagnu testsuite on it yet.

Several things (I place them here so that if somebody makes a research into the 
ml archives, this may be useful) :

1. When working under Cygwin envt, DO NOT unpack your tarballs with Winzip 
unless you unchecked the "TAR file CR/LF smart handling" in the options. This is 
very important if you don't want to have you source full of endline backslashes 
and a build that fails (my very first attempt might have failed because of this)

2. I still cannot figure why but Bill's instructions didn't make the thing 
compile (retried from scratch this morning, failed when building the c++ libs).

If I try to sum up the whole thing :
Bill's script enables c only at the beginning, puts --without-headers and 
--with-newlib in the cfg line along the others options and goes for make all-gcc 
install-gcc. After that, builds newlib and then reconfigure gcc with c and c++ 
enabled. It fails for me at the second step (complete gcc build) when dealing 
with libstdc++.

Instead, I achieved it with (thanks again Richard):
One-pass gcc config : enabling languages=c,c++, 
--with-headers=newlib-dir/newlib/libc/include --with-newlib --disable-share 
--disable-threads
make all-gcc install-gcc
configuring and building newlib
return to the gcc dir and finish the stuff : make all install (but no 2nd 
configure)

Please also note that the cfg script says "Copying 
../../src/newlib-1.11.0/newlib/libc/include/ to 
/cygdrive/c/GNU/Scratch/Build/arm-elf/sys-include" when you put 
--with-headers=... in the cfg line. The gcc configuration page also says that 
the option --with-headers _MUST_ be used when cross-compiling. If you put 
--without-headers you get "Can't copy no to 
/cygdrive/c/GNU/Scratch/Build/arm-elf/sys-include")

It then takes ages to build (3:30 to 4 hrs on my 700 Mhz P4) but succeeds !

This all assume that gcc src is patched (as of 3.2.3) to enable interworking 
(t-arm-elf) and to correct the bug with __mempcpy (your setting in Bill's script 
may be as good, I didn't try it. I personnally patched gnuregex.c and the other 
files in the fixinc dir. The instructions are here : 
http://gcc.gnu.org/cgi-bin/gnatsweb.pl, the fix will be included in 3.3). 
Binutils and gdb built just fine.

Comments appreciated, especially on the two stages configure (I suppose it is 
just to enable c++ on stage 2...)

That's it, quite a long mail but i hope it'll be useful for somebody.

Once again a big thank to you Daniel !

Best regards,

Vincent


Quoting Daniel Poirot <dtpoirot@sbcglobal.net>:

> Vincent,
> 
> mine works...
> 
> I went in to each build_ directory and entered 'make distclean' to get
> rid
> of the old stuff.
> 
> I then went into gcc-3.2.3\gcc\config\arm\t-arm-elf and added:
>   MULTILIB_OPTIONS    += mno-thumb-interwork/mthumb-interwork
>   MULTILIB_DIRNAMES   += normal interwork
>   MULTILIB_EXCEPTIONS += *mapcs-26/*mthumb-interwork*
> 
> I then called the attached rebuild.sh script. This script simply
> rebuilds
> everything without the lengthy untar process - that would write over
> the
> t-arm-elf file.
> 
> 
> Regards,
> - dan
> 
> 
> 
> 
> > -----Original Message-----
> > From: Vincent Rubiolo [mailto:vincent.rubiolo@free.fr]
> > Sent: Wednesday, May 14, 2003 2:12 AM
> > To: Daniel Poirot
> > Subject: RE: Cross-Compiling gcc 3.2.3 for arm-elf
> >
> >
> > Hello Daniel,
> >
> > As you suggested I disabled the interworking stuff and it worked!
> > I will now try
> > to enable it to get things to work. The thing that puzzle me is
> > that someone did
> > manage to get the whole stuff to work with 3.1 and it doesn't with
> 3.2.3 !
> > (I was following the instructions he left)
> >
> > I was also wondering about 2 things:
> > 1.My arm-elf-gcc says it was configured with enable-languages=c
> > whereas I put
> > --enable-languages=c,c++ during the 2nd stage (complete build).
> >
> > 2.Is there any document/resource that describe the functions of
> > gcc/config/arm
> > config files. The explanations inside the files themselves are not
> very
> > self-explanatory to me...
> >
> > Regards,
> > Vincent
> >

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]