Skip to content

Work around newlib compilation failure with clang-15 #420

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

Merged
merged 1 commit into from
Apr 28, 2025

Conversation

gulmezmerve
Copy link
Contributor

The command ./cheribuild.py newlib-baremetal-riscv64-purecap -d currently fails when using clang-15.

This issue has been reported multiple times on the Cheri Slack channel.

As a workaround, this commit adds the -Wno-implicit-function-declaration option to suppress these errors. While this may not be a permanent fix, it should unblock users and help others facing the same problem.

@heshamelmatary
Copy link
Member

Hi Merve,

I have pending PRs for both newlib [1] and cheribuild [2] to be able to build with latest toolchain with master cheribuild.

[1] CTSRD-CHERI/newlib#6
[2] #416

@gulmezmerve
Copy link
Contributor Author

Thanks! It was a long-running problem that people struggled with. I hope this will finally solve it.

@heshamelmatary
Copy link
Member

Thanks! It was a long-running problem that people struggled with. I hope this will finally solve it.

@gulmezmerve Meanwhile you can probably checkout the newlib branch on the PR and try to build it and report back to us here if it works for you

@gulmezmerve
Copy link
Contributor Author

@heshamelmatary yes, I tested it with the cheribuild branch freertos-hkma2-merge and the newlib branch merge-newlib-4.5.0. It works on my side!

@arichardson
Copy link
Member

I think we can merge this trivial fix - your PR is rather invasive and needs some time for review.

@arichardson arichardson reopened this Apr 28, 2025
@gulmezmerve
Copy link
Contributor Author

Yeah I agree with @arichardson

We already provided this small trick to Ericsson, KU Leuven, and the University of Waterloo.
Maybe it’s time to merge 😅

@arichardson
Copy link
Member

CI failure is unrelated, merging

@arichardson arichardson merged commit 7f83059 into CTSRD-CHERI:main Apr 28, 2025
8 of 9 checks passed
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.

3 participants