Skip to content

Riscv fixes #940

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

keith-packard
Copy link
Collaborator

Use SPEED_OPTIMIZATIONS by default for riscv (avoids compiler bugs with -Os).
Use -mstrict-align by default (avoids emitting misaligned memory operations).

Make sure we don't emit unaligned accesses

Signed-off-by: Keith Packard <[email protected]>
gcc 14.3 has bus compiling with -Os on riscv, use -O2 by default. Is there
some way to prevent applications from selecting -Os?

Signed-off-by: Keith Packard <[email protected]>
@@ -23,6 +23,9 @@ config PICOLIBC_DEFAULT
help
Zephyr SDK >=0.17.1 always uses Picolibc

# libstdc++ is built without exception support in -Os mode
# gcc 14.3 has bugs compiling with -Os on riscv
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there an upstream GCC PR for this?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is an upstream PR for the multilib changes, but they've been queued for long time now. I have no idea if they'll ever be approved.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have a patch for the -Os issues with risc-v (yet?)

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.

2 participants