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

bitarithm: Move extern const out of static inline functions #18140

Merged
merged 1 commit into from
May 29, 2022

Conversation

chrysn
Copy link
Member

@chrysn chrysn commented May 29, 2022

Contribution description

Work around a transpilation issue in bitarithm.h that'd be triggered if bitarithm.h were included through any header file transpiled through C2Rust.

This is a temporary workaround that unblocks cases when this would make Rust builds fail; once a newer C2Rust version is in CI, it can be reverted.

Testing procedure

diff --git a/core/lib/include/irq.h b/core/lib/include/irq.h
index 25b609f95b..b84bf6819f 100644
--- a/core/lib/include/irq.h
+++ b/core/lib/include/irq.h
@@ -24,6 +24,7 @@
 
 #include <stdbool.h>
 #include "cpu_conf.h"
+#include <bitarithm.h>
 
 #ifdef __cplusplus
 extern "C" {
  • Build the rust-hello-world example for BOARD=samr30-xpro -- before, that failed inside the Rust build parts (riot-sys), now it builds.

Issues/PRs references

@chrysn chrysn added Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) Area: Rust Area: Rust wrapper labels May 29, 2022
@chrysn chrysn requested a review from benpicco May 29, 2022 11:48
@chrysn chrysn requested a review from kaspar030 as a code owner May 29, 2022 11:48
@github-actions github-actions bot added the Area: core Area: RIOT kernel. Handle PRs marked with this with care! label May 29, 2022
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.

edit code change itself looks fine (just shuffling around). I did not test whether that solves the linked issue, trusting @chrysn's testing here.

@kaspar030 kaspar030 added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label May 29, 2022
@chrysn
Copy link
Member Author

chrysn commented May 29, 2022

Force-pushed a fix that adds (@private) documentation to satisfy the formal documentation requirement without actually including it in user visible docs.

@chrysn chrysn enabled auto-merge May 29, 2022 12:17
@chrysn chrysn merged commit bf2d480 into RIOT-OS:master May 29, 2022
@chrysn chrysn deleted the workaround-c2rust-423 branch May 29, 2022 14:22
@chrysn chrysn added this to the Release 2022.07 milestone Aug 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: core Area: RIOT kernel. Handle PRs marked with this with care! Area: Rust Area: Rust wrapper CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR 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.

3 participants