Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

picolibc: Disable exceptions for picolibc libstdc++ #873

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

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
Collaborator

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.

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