Difference Between Arm-Eabi Arm-Gnueabi and Gnueabi-Hf Compilers

Difference between arm-eabi arm-gnueabi and gnueabi-hf compilers

I'm not completely sure:

  • the eabi stands for the compilation of code which will run on bare metal arm core.
  • the gnueabi stands for the compilation of code for linux

For the gnueabi/gnueabi-hf part, I found an answer here.

gcc-arm-linux-gnueabi is the cross-toolchain package for the armel architecture. This toolchain implies the EABI generated by gcc's -mfloat-abi=soft or -mfloat-abi=softfp options.

gcc-arm-linux-gnueabihf is the cross-toolchain package for the armhf architecture. This toolchain implies the EABI generated by the gcc -mfloat-abi=hard option.

'hf' means hard-float which indicates that the compiler and its underlying libraries are using hardware floating point instructions rather than a software implementation of floating point such as fixed point software implementations.
The 'eabi' refers to what the underlying binary is going to look like.
It can be argued that these can be achieved with flags to gcc but the issue is that of bare metal pre-compiled libraries. Unless you are recompiling everything from source, it may not be feasible to use gcc with flags alone. Even in that case you might have to carefully configure each package or library with the appropriate compile options.

arm-linux-gnueabi toolchain vs arm-linux-androideabi toolchain.

A compilation might mean more than just converting source code to binary. A compiler like GCC also provides certain libraries, in this case libgcc for handling what hardware can't handle. When a compiler becomes a toolchain, it also provides runtime libraries standardised by the programming language similar to ones provided in target system. In arm-linux-gnueabi-'s case that might be libc and for arm-linux-androideabi- that's bionic.

You can produce compatible object files to be used by different compilers, that's what elf is for.

You can produce static executable which can be mighty in size and they should work on any matching hardware/kernel, because in that case toolchains aim for that.

But if you produce dynamic executables, those ones can only run on systems that's supporting their dependencies. Because of that a simple "hello world" application that's not static build by arm-linux-gnueabi- won't work on an Android system since it provides bionic, not libc.

what is difference between 'gcc-arm-linux-gnueabihf' and 'arm-linux-gnueabihf-gcc'?

gcc-arm-linux-gnueabihf - Ubuntu package name

arm-linux-gnueabihf-gcc - binary name, installed by the package

arm gcc toolchain as arm-elf or arm-none-eabi, what is the difference?

Each architecture or architecture/os couple has an ABI. The ABI (Application binary Interface) describes how functions should be called, syscalls numbers, arguments passed, which registers can be used ...

The abi describes how the compiler should generate the assembly.

If you use only assembler you don't need to care about the ABI.

arm-elf and arm-none-eabi just use two versions of the Arm ABI. The eabi toolchain uses a newer revision, but could also be called arm-elf-eabi, as it generates elf too.

Does the the 'linux' version of arm gcc compiler support -cpu=cortex-m4?

The compiler for 32-bit ARM on Ubuntu is arm-linux-gnueabihf-gcc or arm-none-eabi-gcc, roughly according to whether you want to compile code to run on a Linux OS or on bare metal. Look for the packages gcc-arm-linux-gnueabihf or gcc-arm-none-eabi.

The aarch64 compilers only support 64-bit ARM.



Related Topics



Leave a reply



Submit