Compiler Directory Structure

Asked by Shi Benyong

Can anybody explain the directory structure after install the compiler?
And what is the difference between /arm-none-eabi/bin and /bin, /arm-none-eabi/lib and /lib?

Thank you in advance
--/arm-none-eabi
|
--/bin
|
--/lib
|
--/libexe
|
--license.txt
|
--readme.txt
|
--release.txt

Question information

Language:
English Edit question
Status:
Solved
For:
GNU Arm Embedded Toolchain Edit question
Assignee:
No assignee Edit question
Solved by:
Joey Ye
Solved:
Last query:
Last reply:
Revision history for this message
Best Joey Ye (jinyun-ye) said :
#1

It is the standard GCC dirctory structure for cross-compile.

arm-none-eabi/bin has usual command like gcc and ld. But including this
directory into PATH will mix up with native (x86) gcc. So there is
bin/arm-none-eabi-gcc, which itself can distinguish with native ones.
arm-none-eabi-bin/gcc and bin/arm-none-eabi-gcc are doing the same things.

Story for lib is a little more complicated but basically similar to bin.

Hopefully this is helpful

- Joey

On Fri, Jan 25, 2013 at 9:11 PM, Shi Benyong <
<email address hidden>> wrote:

> New question #220137 on GCC ARM Embedded:
> https://answers.launchpad.net/gcc-arm-embedded/+question/220137
>
> Can anybody explain the directory structure after install the compiler?
> And what is the difference between /arm-none-eabi/bin and /bin,
> /arm-none-eabi/lib and /lib?
>
> Thank you in advance
> --/arm-none-eabi
> |
> --/bin
> |
> --/lib
> |
> --/libexe
> |
> --license.txt
> |
> --readme.txt
> |
> --release.txt
>
>
>
> --
> You received this question notification because you are an answer
> contact for GCC ARM Embedded.
>

Revision history for this message
Shi Benyong (shibenyong) said :
#2

Thanks Joey Ye, that solved my question.

Revision history for this message
henry (henryabril27) said :
#3

Hi,

Would it be possible to give additional details about the difference between the folders "/arm-none-eabi/lib" and "/lib"?

Thanks!

Revision history for this message
Thomas Preud'homme (thomas-preudhomme) said :
#4

Hi Henry,

lib/ contains gcc-related files such as libgcc and various headers (stddef.h, stdint.h, etc.). Anything here is specific to gcc so if you install another compiler it will not use those files.

arm-none-eabi/lib on the other hand is all the libraries for the target device (hence the arm-none-eabi) that can be shared among compilers. It contains newlib files as well as files needed for initialization and finalization (crt1.o, crtbegin.o, crti.o, crtend.o and crtn.o). In practice another toolchain would have its own directory for this but the idea is that it should be able to remove it and replace it by a symlink to this one. Anyway, all things here are developped independently of gcc which is why they are in a different directory.

Hope this helps.

Revision history for this message
henry (henryabril27) said :
#5

Thanks for the feedback Thomas. It is clear now.
BR,
Henry