tree wide: compilation fixes for native64 on musl systems#20730
Merged
maribu merged 5 commits intoRIOT-OS:masterfrom Jun 15, 2024
Merged
tree wide: compilation fixes for native64 on musl systems#20730maribu merged 5 commits intoRIOT-OS:masterfrom
native64 on musl systems#20730maribu merged 5 commits intoRIOT-OS:masterfrom
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.
Contributor
|
Is this ready for review? |
Member
Author
|
Yes, sorry, forgot to mark it as ready :) |
Teufelchen1
reviewed
Jun 15, 2024
| #ifdef CPU_NATIVE | ||
| #include <stdio.h> | ||
|
|
||
| #if __GLIBC__ |
Contributor
There was a problem hiding this comment.
Not a blocker for this PR but why is there no #elseif __musl__ ...?
Member
Author
There was a problem hiding this comment.
In musl those are already provided (causing the conflict).
Teufelchen1
reviewed
Jun 15, 2024
| #endif | ||
|
|
||
| #define PAGE_SIZE (dev->params.page_size) | ||
| #define AT25_PAGE_SIZE (dev->params.page_size) |
Teufelchen1
approved these changes
Jun 15, 2024
Member
Author
|
Thx a bunch! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Contribution description
With this, almost all apps build for
native64on 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.pywould 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