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

Buildroot fails to compile on GCC 14 #1161

Open
jordancarlin opened this issue Dec 1, 2024 · 5 comments
Open

Buildroot fails to compile on GCC 14 #1161

jordancarlin opened this issue Dec 1, 2024 · 5 comments
Assignees

Comments

@jordancarlin
Copy link
Member

When the system (not riscv cross compiler) compiler is gcc14, buildroot fails to compile. I suspect this is because of new warnings/errors introduced by gcc 14 (we saw something similar with our crt0 code).

With GCC 14 released and available as a package in many distros, this may start to be an issue. Especially with the next wave of releases when gcc14 is likely to become the default for some distros.

Need to investigate root cause/solution still, but I suspect moving to a newer version of buildroot would solve this.

@davidharrishmc
Copy link
Contributor

Yikes. The textbook refers to certain statements and addresses in the buildroot binary. When we update the version of build root, all that will change. Probably it changes anyway with the new compiler. I'm afraid we just need to indicate in the book that the examples came from a certain version and will differ from the latest version.

@jordancarlin do you want to experiment with whether newer buildroot solves the issue, and whether it still boots in lockstep? This is a 2-day sim if all goes right and weeks or months of debug if not, so let's not commit anything until we know it actually works.

@rosethompson any thoughts?

@jordancarlin
Copy link
Member Author

Addresses will almost certainly change with different compilers even if we keep the same version of buildroot. We're already using different compilers on different distros so this seems kind of inevitable.

I can look into upgrading our buildroot version. Probably not a terrible idea anyway because I think newer buildroot and linux kernel supports several new RISC-V extensions that we have in the Wally buildroot configuration anyway.

@jordancarlin jordancarlin self-assigned this Dec 31, 2024
@jordancarlin
Copy link
Member Author

Seems like there is a simpler, official way of storing our buildroot configuration that has much better compatibility across different versions of buildroot. I will look into storing our configuration in this format as part of upgrading to the newer version so that future upgrades are easier.

@jordancarlin
Copy link
Member Author

Upgrading our version of buildroot is also definitely going to be necessary in the nearish future because RHEL 10 (which just released in beta with a full release coming mid 2025) comes with GCC 14 as its default compiler.

@jordancarlin
Copy link
Member Author

Making good progress with this. The updated configuration method is working for buildroot with our existing version. This makes updating the version much easier.

I've gotten to printing the SBI banner using the new version of buildroot. Have been testing on VLSI because of space constraints on chips so no lockstep runs yet, but now that the new version of buildroot seems to be working I'll start a full lockstep boot soon before opening a PR.

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

No branches or pull requests

2 participants