zephyr: picolibc is incompatible with xcc / xcc-clang toolchains
Describe the bug
Compilation of picolibc module for picolibc tests fails with XCC on ADSP platforms. Followup to https://github.com/zephyrproject-rtos/zephyr/issues/54224.
A few of the flags used by GCC to build the picolibc module are not compatible with XCC. Different flags are observed to be not working for different versions of XCC toolchain.
RI-2021.7-linux (xcc-clang) + MTL:
clang-10: error: unknown argument: '-fno-printf-return-value'
clang-10: warning: optimization flag '-fsignaling-nans' is not supported [-Wignored-optimization-argument]
RG-2017.8-linux (xcc) + CAVS15, 18, CAVS25:
xt-xcc ERROR parsing -frounding-math: unknown flag
xt-xcc ERROR parsing -fsignaling-nans: unknown flag
xt-xcc ERROR parsing -fno-stack-protector: unknown flag
xt-xcc ERROR parsing -Warray-bounds: unknown flag
xt-xcc ERROR parsing -ftls-model=local-exec: unknown flag
xt-xcc ERROR parsing -fno-printf-return-value: unknown flag
To Reproduce
export ZEPHYR_TOOLCHAIN_VARIANT=xcc
west build -p -b intel_adsp_cavs15 -T tests/kernel/common/kernel.common.picolibc
Expected behavior Compilation
Impact Annoyance
Logs and console output See above.
Environment
- OS: Ubuntu 20.04
- Toolchain: XCC / XCC-clang (see above)
- Recent main
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 27 (13 by maintainers)
It’s a bit more subtle than that – we’re not ‘adding’ clang support anywhere, just fixing some wiring between the existing clang support in picolibc and the clang support in Zephyr. I’d suggest waiting a couple of days and see how the proposed fixes work out and then decide if clang+picolibc should be removed from the release.