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/arch/riscv.inc.mk: Fix with BUILD_IN_DOCKER #18654

Merged
merged 1 commit into from
Sep 27, 2022

Conversation

maribu
Copy link
Member

@maribu maribu commented Sep 27, 2022

Contribution description

With RISC-V being a relatively young toolchain, a lot of inconsistencies between different toolchains are to be found that differ in the target triple and the flags supported. This build system performs run-time tests to detect the toolchain and supported flags.

With BUILD_IN_DOCKER=1 issues arise, as this checks are performed outside of the docker container. However, the host may have no RISC-V toolchain installed or a different toolchain, so there is little reason in performing this detection then. Instead, a hard coded target triple and supported flags are provided when using BUILD_IN_DOCKER=1.

Testing procedure

E.g. make BOARD=hifive1b BUILD_IN_DOCKER=1 -C examples/default should work even if no host RISC-V toolchain is installed.

Issues/PRs references

Fixes #18653

With RISC-V being a relatively young toolchain, a lot of inconsistencies
between different toolchains are to be found that differ in the target
triple and the flags supported. This build system performs run-time
tests to detect the toolchain and supported flags.

With `BUILD_IN_DOCKER=1` issues arise, as this checks are performed
outside of the docker container. However, the host may have no RISC-V
toolchain installed or a different toolchain, so there is little reason
in performing this detection then. Instead, a hard coded target triple
and supported flags are provided when using `BUILD_IN_DOCKER=1`.
@maribu maribu added Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) Area: build system Area: Build system Platform: RISC-V Platform: This PR/issue effects RISC-V-based platforms labels Sep 27, 2022
@maribu maribu requested a review from chrysn September 27, 2022 09:16
Copy link
Contributor

@kaspar030 kaspar030 left a comment

Choose a reason for hiding this comment

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

ACK.

@maribu maribu enabled auto-merge September 27, 2022 10:58
@benpicco benpicco added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Sep 27, 2022
@maribu maribu added the CI: skip compile test If set, CI server will run only non-compile jobs, but no compile jobs or their dependent jobs label Sep 27, 2022
@maribu maribu merged commit 73f3668 into RIOT-OS:master Sep 27, 2022
@maribu maribu deleted the makefiles/arch/riscv.inc.mk branch September 28, 2022 15:57
@maribu
Copy link
Member Author

maribu commented Sep 28, 2022

thx :)

@maribu maribu added this to the Release 2022.10 milestone Oct 14, 2022
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 CI: skip compile test If set, CI server will run only non-compile jobs, but no compile jobs or their dependent jobs Platform: RISC-V Platform: This PR/issue effects RISC-V-based platforms Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

riscv: Toolchain check triggers even with BUILD_IN_DOCKER
3 participants