Page 1 of 1

Building a GCC cross compiler (C++).

Posted: Tue Jan 19, 2010 3:37 pm
by skyking
Is there anyone here that actually built an fully functional GCC for arm? When I've tried to use fx --target=arm-eabi I've ended up with libraries where the exception handling support seem to be crippled (ie __register_frame does not appear in any generated library). Other configurations (fx arm-unknown-linux-gnueabi) failed to build. I'm trying to build GCC-4.4.

Re: Building a GCC cross compiler (C++).

Posted: Wed Jan 20, 2010 1:49 am
by pcmattman
Have you tried the arm-elf target?

The EABI machine seems to lack support for the function (although, that is an LLVM list, not a GCC one).

Re: Building a GCC cross compiler (C++).

Posted: Sun Jan 24, 2010 3:59 am
by skyking
pcmattman wrote:Have you tried the arm-elf target?

The EABI machine seems to lack support for the function (although, that is an LLVM list, not a GCC one).
Now I've tried - that target failed miserably (libstdc++ didn't support that target). The reason I'm asking is that trying a random target and build is a quiet time consuming way of working.

I've now been successful - the key thing was that you have to supply --with-newlib to configure for gcc (or add support for your OS in stdlibc++). I think that the tutorials in the wiki on this matter is not very good. First of all the tutorial for GCC Cross-Compiler does not really cover the steps beyond the raw compiler (in order to get runtime support for C++ you have to incorporate some bits and pieces from the Porting Newlib and the OS Specific Toolchain pages, also the examples are quiet silly since most of us already have support for i586 in their native gcc. Also as it is very time consuming operation it would be a good idea to give information on some known-to-work targets.