What is the difference between arm-eabi, gnueabi and gnueabi-hf cross compilers?
1 Answers
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.

- 34,399
- 18
- 41
- 57

- 936
- 1
- 9
- 14
-
10See also: https://wiki.linaro.org/WorkingGroups/ToolChain/FAQ#What_is_the_differences_between_.2BIBw-arm-none-eabi-.2BIB0_and_.2BIBw-arm-linux-gnueabihf.2BIB0.3F_Can_I_use_.2BIBw-arm-linux-gnueabihf.2BIB0_tool_chain_in_bare-metal_environment.3F_How_do_you_know_which_toolchain_binary_to_use_where.3F *The bare-metal ABI (eabi) will assume a different C library (newlib for example, or even no C library) to the Linux ABI (gnueabi, which assumes glibc). Therefore, the compiler may make different function calls depending on what it believes is available above and beyond the Standard C library.* – Lekensteyn Aug 10 '15 at 20:27
-
2Although I see you've pulled this from an external source, the use of `architecture` here is misleading. The difference between `armel` and `armhf` is fundamentally the difference between the software floating point and hardware floating point EABI generated by the compilers. – sherrellbc Jun 20 '17 at 19:01
-
Ok @sherrellbc would you recommend a rewording? – Akhneyzar Jul 13 '17 at 09:47
-
4The wording is fine, aside from the use of `architecture` in your quote. I mention it's misleading only because there is no `armel architecture` -- it's always going to be a compiler for the ARM architecture. The compiler is going to use a specific EABI for use on such an architecture depending on the parameters given during compilation. As your comment states, gcc is instructed to use use soft floating point mechanisms, rather than support hardware floating point mechanisms (this is necessary if there is no FPU). Also noteworthy is the `armeb` option, which is `armel` using big endian order. – sherrellbc Jul 13 '17 at 15:58
-
3One more question. Why there are 2 toolchains (`-gnueabi` and `-gnueabihf`). Why not 1 toolchain which understands `-mfloat-abi=soft/hard/softfp` option (like native arm linux gcc)? – Anton Ostrouhhov Sep 26 '19 at 15:57
-
6@AntonOstrouhhov I found the answer! Toolchain means not only compiler, but also binutils, already compiled libraries (libc) etc. => 2 toolchains: one includes libraries with Soft ABI, another with Hard ABI :) – Anton Ostrouhhov Sep 26 '19 at 16:04
-
@ Anton Ostrouhhov. The hf refers when the target architecture supports additional instructions like floating points. – husin alhaj ahmade Nov 21 '20 at 22:52