Skip to content

Conversation

adigie
Copy link

@adigie adigie commented Feb 27, 2025

Picolibc is targeted for smaller embedded systems. It brings improvement over newlib-nano in case of pure C applications. However when used with C++ applications all gains from smaller size of libc are wasted by exception handling support in libstdc++.

This change disables exception support in picolibc libstdc++. It results in decreased flash usage - ~9.5kB for ARM target.

crosstool-ng PR: zephyrproject-rtos/crosstool-ng#33
Fixes #860

Picolibc is targeted for smaller embedded systems. It brings improvement
over newlib-nano in case of pure C applications. However when used with
C++ applications all gains from smaller size of libc are wasted by
exception handling support in libstdc++.

This change disables exception support in picolibc libstdc++. It results
in decreased flash usage - ~9.5kB for ARM target.

Signed-off-by: Adrian Gielniewski <[email protected]>
@keith-packard
Copy link
Contributor

Should this wait until we figure out a plan to support libstdc++ as a module so that apps needing exceptions can use that instead?

@adigie
Copy link
Author

adigie commented Feb 27, 2025

Should this wait until we figure out a plan to support libstdc++ as a module so that apps needing exceptions can use that instead?

Sure, makes sense.

@adigie adigie marked this pull request as draft May 15, 2025 08:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Using picolibc with libstdc++_nano.a
3 participants