Not able to use newlibc with cross-compiler arm-none-eabi-gcc
#71742
Replies: 1 comment
-
Hi @liquidhiter Did you figure out your issue here? Mine is similar, I'm trying to use arm-none-eabi-g++ and it disabling both NEWLIB_LIBC and GLIBCXX_LIBCPP. I was going to follow up on TOOLCHAIN_HAS_NEWLIB and see how it's calculated. If you made any breakthroughs would love to hear what you did here. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
My environment setup:
I have been trying to enable the newlibc in my application. Referring to the documentation, I added the
CONFIG_NEWLIB_LIBC=y
in theprj.conf
of my application. I am using the cross-compilerarm-none-eabi-gcc@11.2-2022.02-0
which I believe has the built-in support for the newlibc (cross-compiler is setup by exportingZEPHYR_TOOLCHAIN_VARIANT
andCROSS_COMPILE
in the active environment):-- Found sysroot: arm-none-eabi-gcc/11.2-2022.02-0/arm-none-eabi -- Found GnuLd: arm-none-eabi-gcc/11.2-2022.02-0/bin/../lib/gcc/arm-none-eabi/11.2.1/../../../../arm-none-eabi/bin/ld.bfd (found version "2.37.20220122") -- The C compiler identification is GNU 11.2.1 -- The CXX compiler identification is GNU 11.2.1 -- The ASM compiler identification is GNU -- Found assembler: arm-none-eabi-gcc/11.2-2022.02-0/bin/arm-none-eabi-gcc
However, when trying to build the application (west build), I got the following warning messages
warning: The choice symbol NEWLIB_LIBC (defined at lib/libc/Kconfig:95) was selected (set =y), but MINIMAL_LIBC (defined at lib/libc/Kconfig:70) ended up as the choice selection. See http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_NEWLIB_LIBC and/or look up NEWLIB_LIBC in the menuconfig/guiconfig interface. The Application Development Primer, Setting Configuration Values, and Kconfig - Tips and Best Practices sections of the manual might be helpful too.
and the error message of missing system header file (I just modified the blinky sample for testing purpose)
What I have done to debug this issue:
issues
, and found exactly the same one, see: fatal error: setjmp.h: No such file or directory #31203. However, the solution mentioned in this issue doesn't work in my environment.autoconf.h
file and can confirm that theCONFIG_NEWLIB_LIBC
is not setsetjmp.h
exists in the include path.CONFIG_NEWLIB_LIBC
, and founddepends on "$(TOOLCHAIN_HAS_NEWLIB)" = "y"
. I haven't figured out how this variable is it. Exporting this variable in the active environment doesn't resolve the issue.Questions:
"$(TOOLCHAIN_HAS_NEWLIB)"
is set?Beta Was this translation helpful? Give feedback.
All reactions