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

libsel4-sys: bindgen not expanding functional macros #18

Open
jlamb-at-polysync opened this issue May 2, 2018 · 0 comments
Open

libsel4-sys: bindgen not expanding functional macros #18

jlamb-at-polysync opened this issue May 2, 2018 · 0 comments

Comments

@jlamb-at-polysync
Copy link
Contributor

When building for arm-sel4-helios, we get an error in the root-task, related to undefined/missing type seL4_WordBits.

cargo fel4 build --target arm-sel4-helios:

error[E0425]: cannot find value `seL4_WordBits` in this scope
  --> src/bin/root-task.rs:57:13
   |
57 |             seL4_WordBits.into(),
   |             ^^^^^^^^^^^^^ did you mean `seL4_GuardBits`?

This is because libsel4 is using a functional macro in (ARM configs, ie libsel4/sel4_arch_include/aarch32/sel4/sel4_arch/constants.h):

#define seL4_WordBits (sizeof(seL4_Word) * 8)

We don't see this with the x86-64 target because it uses #define seL4_WordBits 64.

Seems to be related to this bindgen issue: rust-lang/rust-bindgen#753

jlamb-at-polysync added a commit that referenced this issue May 2, 2018
This enables our default root-task to build with the `arm-sel4-helios` target.

Since bindgen doesn't seem to expand function like macros, this gets us by for now.

Relates to #18
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

1 participant