-
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
tree wide: compilation fixes for native64
on musl systems
#20730
Conversation
This fixes compilation issues on musl, where the host POSIX headers don't mix well with RIOT's POSIX headers. This adds an conditional `#include_next <sys/select.h>` to RIOT's `<sys/select.h>` header.
On musl, PAGE_SIZE has a different meaning. So add an AT25_ prefix to avoid a name clash.
On musl, `spu_set_t` is provided by system headers, so only provide that with glibc.
musl and glibc have different types for fast atomic integers. This selects the correct size depending on the used library.
Is this ready for review? |
Yes, sorry, forgot to mark it as ready :) |
@@ -30,6 +30,7 @@ extern "C" { | |||
#ifdef CPU_NATIVE | |||
#include <stdio.h> | |||
|
|||
#if __GLIBC__ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a blocker for this PR but why is there no #elseif __musl__ ...
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In musl those are already provided (causing the conflict).
@@ -37,7 +37,7 @@ | |||
#define min(a, b) ((a) > (b) ? (b) : (a)) | |||
#endif | |||
|
|||
#define PAGE_SIZE (dev->params.page_size) | |||
#define AT25_PAGE_SIZE (dev->params.page_size) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haha! 😸
Thx a bunch! |
Contribution description
With this, almost all apps build for
native64
on musl.Testing procedure
I abused the insufficient memory tool using
on Alpine. I guess
./dist/tools/compile_and_test_for_board/compile_and_test_for_board.py
would have been the more canonical tool, but the insufficient memory tool has so fancy colors in the output :)With this, almost all apps build fine.
Issues/PRs references
None