1. Does arm-gcc-none-eabi and newlib is packed?
2. Why arm-gcc-none-eabi need glibc 2.14?
I have a problem when I use arm gcc none eabi cross compiler.
"version GLIBC_2.14 not found"
Then I install glibc 2.14 and add to LD_LIBRARY_PATH. It's perfect compile my code.
But I have not download newlib in my system.
I don't know what library is linked on arm-gcc-none-eabi.
Do I need add some option to use newlib when I Compile C code? Or default is linked to newlib.
This web site said arm-gcc-none-eabi is based on Free Software Foundation's (FSF) GNU Open source tools and newlib.
https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm/downloads?_ga=2.161423419.782641712.1568254978-323909128.1538373791
/users/ben/Release/arm-gcc/gcc-arm-none-eabi/bin/arm-none-eabi-gcc --specs=nano.specs --specs=nosys.specs -fno-builtin -I . -I /users/ben/coresight/shared/validation/tests/cxdt -I /users/ben/coresight/shared/validation/tests/generic -I /users/ben/coresight/shared/validation/tests/partlib -I /users/ben/coresight/shared/validation/tests/src -DTESTNAME=helloworld -DCPUEXE=1 -DCPU=0 -DCXDT=0 -DCX_MSG_DBG=0 -DCX_MSG_LLDBG=0 -DCX_MSG_VERBOSE=1 -DCP14 -DTRACECODE_CORTEXR8 -g -c -O2 -DTESTIMAGE=0 -DTESTIMAGEARCH_v7r -DTESTIMAGETOOLCHAIN_gcc --verbose -march=armv7-r -std=gnu99 -falign-functions=16 -falign-jumps=8 -falign-loops=8 -fomit-frame-pointer -fno-inline-functions -fno-inline -I./ -o ../bin/helloworld-CXDT-0-CPU-0/IMAGE0_retarget.o gcc_retarget.c 2>&1 | tee ../bin/helloworld-CXDT-0-CPU-0/IMAGE0_retarget.o.log; exit ${PIPESTATUS[0]}
There is a part of GCC command in coresight soc 400 example makefile.
Error message is
/lib64/libc.so.6: version `GLIBC_2.14' not found (required by /users/ben/Release/arm-gcc/gcc-arm-none-eabi/bin/arm-none-eabi-gcc)
--------------
Can I understand like that
1. arm-none-eabi-gcc compiler need GLIB 2.14
2. Compile C code to my target using newlib
3. arm-none-eabi-gcc default library is newlib
Thanks for your help
1) yes2) yes3) please define default library ? default for your code in point (2)
3) I have not download newlib and I not sure what library be used in toolchain. But now I understand. Thank you~
I have last questions.
What case I need to use arm-none-eabi-gcc with newlib?
I see "AArch32/64 bare-metal target (arm-eabi)" toolchain in A profile processor and R , M profile processors toolchain is "arm-none-eabi-gcc"
https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-a/downloads
What are differences between AArch32/64 bare-metal target (arm-eabi) and arm-none-eabi-gcc?
Thanks for your help!
Dear sir,
If you download yourself gcc-arm-none-eabi-8-2019-q3-update-linux.tar.bz2 it should be enough to build your application for the specific target.Please note that Newlib is just a C standard library implementation intended for use on embedded systems (as embedded systems have more hardware / resource constrains). So if you use C standard library functions in your code, Newlib implementation of it will be compiled with your code. Please note Newlib does have some limitations in comparison with other implementation of it like glibc or musl.
kind regards
Thanks for your reply!
You are welcome.I've wrote you another reply where I've explained why we have two arm-eabi / arm-none-eabi toolchians. But this was for some reason filtered out by our moderators so it can't be seen.I will try to retrieve this answer so it can be in use for you and others reading this thread.
> What are differences between AArch32/64 bare-metal target (arm-eabi) and arm-none-eabi-gcc
There are two things here. First, how we name toolchains. We use "target triplet" naming convention.
Target Triplets describe a platform on which code runs.They contain three fields:* the name of the CPU family/model,* the vendor and* the operating system name.
Target triplets have this simple structure: machine-vendor-operatingsystem
Vendor field is sometimes omitted or can be for example "none" or "unknown".
A-Profile toolchain is released by us and you can find on our pages. This toolchain is using target triplet convention without vendor (as vendor would be "none"). This is for historical reason as until GCC 7 Linaro was releasing GCC toolchain targeted for A-Profile Arm processors. We've decided to keep this convention so that users can follow up with the same names since we (Arm) release GCC 8 onwards.
You can check your toolchain target triplet by:
$ gcc -print-multiarch
Example output could be:
* x86_64-linux-gnu - produces binaries for x86_64 GNU/Linux targets (e.g, Ubuntu running on PC).* aarch64-linux-gnu - produces binaries for processors supporting AArch64 a 64-bit execution state of the ARMv8 ISA.
For the same historical reason Arm Embedded toolchain (one targeting R/M Profile Arm processors) is using target triplet WITH vendor field (even if this is just "none").
So arm-none-eabi and arm-eabi toolchains are the same thing. But please remember that how we build toolchain for you differs. For example we use additional multilibs for GNU Arm Embedded toolchain (arm-none-eabi). Multilib is useful for cross-compiling, that is, compiling a program to run on a different processor architecture.
For GNU Arm Embedded toolchain we are including various multilibs so that users can tweak toolchain to output code for specific R/M profile CPU.
To check which multilib is included with your GNU toolchain just:
$ gcc --print-multi-lib.;32;@m32x32;@mx32
Note: if you see only .; it means there is no additional multilib brewed into toolchain.
So in conclusion, you will use "GNU Toolchain for A-Profile Architecture" to build your code for A-Profile Arm processors (e.g. if you have AArch64 GNU/Linux machine you will cross-compile with aarch64-linux-gnu toolchain).And "GNU Arm Embedded Toolchain" for your R/M Profile (micro-controller) work.
Thank you so much! This is very useful information. I will keep learning.