AW: [beagleboard] Re: Difference between arm-linux-gcc and arm-none-linux-gnuebi-gcc

Hi Kedar!

Well … I don’t think that programs, which are compiled with different compilers but are running simultaneously, compromise a systems stability. On my system the kernel and the programs are compiled with different compilers. The kernel is compiled with CodeSourcery, my programs are compiled with gcc4.3.3. They are exchanging data (through ioctl and mmap) and they are running stable.

The only thing you should care for is that your programs are probably linked to libraries. The libraries header files on your development system (like stdio.h from libc) have to be from the same libraries source as the compiled libraries on your ARM system (like /lib/libc.so). Or in other words, you will need a cross compile toolchain which offers you on the one hand library headers and compilers for your development platform, and on the other hand compiled libraries for your ARM system (see drawing). The CodeSourcery toolchain is such a toolchain.

image001.jpg

In theory you can use as many programs and libraries compiled with different compilers as you want. But for practical reasons you will use the compiler and the libraries from one single toolchain.

I hope this information is of some help to you.

Best regards,

Sebastian

Kedar,

For programs I want to run under Ångström, I compile using
CodeSourcery's arm-none-linux-gnueabi version.

My understanding is that ARM supports several different assembly-level
calling conventions, each called an [Embedded] Application Binary
Interface ([E]ABI). Each defines which ARM registers are used to pass
arguments and results, and which registers are saved and restored. To
call library functions, it's critical that you compile your programs
using the [E]ABI that was used to compile the libraries or else
library functions will get their arguments from the wrong registers
and your program will either crash or give erroneous results.

I don't know how in general to determine which [E]ABI a library uses.
I found out that I needed to use arm-none-linux-gnueabi from earlier
postings at this group.

It's not uncommon for a given architecture to have several [E]ABIs.
PowerPC has COFF and ELF, and Intel has cdecls and stdcalls. It's one
of those places where you can tell that C is not a high-level
language.

Hope this helps,
John