-
Notifications
You must be signed in to change notification settings - Fork 2k
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
build system: use riscv-none-elf as triplet #14972
Conversation
On Ubuntu I got |
My However, the |
This might need updating the CI, as it is using the eclipse gcc packages, which IIRC introduced this -embed thingy. triggering to see... |
seems like the logic works as expected. |
@maribu can you rebase?
Can we interpret it as an ACK? :) |
I wonder if it doesn't make sense to also include |
f946006
to
f429602
Compare
@benpicco: Can you test this on your Ubuntu / Debian machine to check if RISCV is now using the toolchain shipped by the package manager? |
Use riscv-none-elf instead of legacy riscv-none-embed as target triplet for RISC-V development. However, if ricsv-none-elf is not present, try riscv64-unknown-elf and riscv-none-embed instead. If the legacy riscv-none-embed is used, a warning is printed.
c122c4b
to
d9e495f
Compare
I think this is good to go. One might want to re-evalute the order in which the toolchains are tested for. Currently it will test first for
However, most distros (Debian, Ubuntu, Arch Linux) only provide I believe that the overhead for testing is hardly noticeable. So maybe this might not be terribly important. We also might want to eventually phase out |
@bergzand do you have an opinion on this? You have been looking into risc-v quite a lot. |
Contribution description
Use
riscv-none-elf
instead of legacyriscv-none-embed
as target triplet for RISC-V development. However, ifricsv-none-elf
is not present butriscv-none-embed
is, fall back to legacy triplet (and print an info message about this behavior).Testing procedure
E.g.
make BOARD=hifive1 -C examples/default
andmake BUILD_IN_DOCKER=1 BOARD=hifive1 -C examples/default
should now work both, even if the local toolchain is build from upstream sources (which requiresriscv-none-elf
as triplet).Issues/PRs references
None