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

makefiles: change RISC-V GCC -march to rv32imac_zicsr #20754

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

Conversation

LP-HAW
Copy link
Contributor

@LP-HAW LP-HAW commented Jun 17, 2024

Contribution description

This PR changes RISC-V GCC -march to rv32imac_zicsr

See PR #20753. (I may have deleted the PR branch, so I cannot reopen my original PR...)

Testing procedure

Same as #20753

Issues/PRs references

#17951
#18098
#20753

@github-actions github-actions bot added Area: build system Area: Build system Platform: RISC-V Platform: This PR/issue effects RISC-V-based platforms labels Jun 17, 2024
@mguetschow mguetschow added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Jun 18, 2024
@riot-ci
Copy link

riot-ci commented Jun 18, 2024

Murdock results

✔️ PASSED

1025538 makefiles: change RISC-V GCC -march to rv32imac_zicsr

Success Failures Total Runtime
10171 0 10175 17m:35s

Artifacts

@maribu
Copy link
Member

maribu commented Jun 18, 2024

Hmm, I wonder if dropping support for older toolchains is a bit rushed. At least the ESP RISC-V toolchains in our CI have a binutils version that does not support the new ISA spec. That won't cause issues now because the ESP RISC-V stuff is not well integrated with the other RISC-V code in RIOT (yet). But it may still serve as an indication that we are moving a bit fast here.

Also: I wonder if this is rather a GDB bug, with GDB uses the new ISA spec while the ELF file was build with the older. Maybe it even is not possible bto extract the ISA spec version from the ELF file, and GDB would need a hint from the user.

Hence: Maybe adding explicitly an option to GDB to use the older spec in our make debug command would be the better option?

@LP-HAW
Copy link
Contributor Author

LP-HAW commented Jun 18, 2024

At least the ESP RISC-V toolchains in our CI have a binutils version that does not support the new ISA spec.

The ESP RISC-V binutils that I see in riotbuild is 2.39.

Also: I wonder if this is rather a GDB bug

Yes, this is a bug in GNU binutils. The ELF files should be rv32i2p0 but the .riscv.attributes sections say they are rv32i2p1 (though I do not expect this to get fixed). GDB is behaving correctly in this case.

Hence: Maybe adding explicitly an option to GDB to use the older spec in our make debug command would be the better option?

I am not aware of any GDB options that allow you to override the .riscv.attributes.

I thought that instead of adding more code to work around issues with -misa-spec=2.2, this is an opportunity to start removing it.

@mguetschow mguetschow requested review from benpicco and maribu and removed request for maribu October 29, 2024 19:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: build system Area: Build system CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Platform: RISC-V Platform: This PR/issue effects RISC-V-based platforms
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants