ARM-software / LLVM-embedded-toolchain-for-Arm

A project dedicated to building LLVM toolchain for 32-bit Arm embedded targets.
Apache License 2.0
377 stars 85 forks source link

Support selection of different printf implementations #443

Open voltur01 opened 2 months ago

voltur01 commented 2 months ago

Support selection of different printf implementations provided by picolibc.

picolibc provides a mechanism based on --defsym linker option to select which printf implementation to use, see https://github.com/picolibc/picolibc/blob/main/doc/printf.md

This works with GNU LD, however does not work with LLD because of https://github.com/llvm/llvm-project/issues/52, there is a specific reference there https://github.com/llvm/llvm-project/issues/52

We need to either help progress the LLD change above or invent something different as a workaround.

keith-packard commented 3 weeks ago

If you split out the printf from scanf selection, at least you'd avoid pulling in the scanf code with this?