-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
19220: dist/tools/doccheck: Fix grep warning r=benpicco a=maribu ### Contribution description Fix `grep: warning: stray \ before -` warnings. ### Testing procedure ``` $ ./dist/tools/doccheck/check.sh ``` Should no longer print lots of the warning anymore ### Issues/PRs references 19232: build system: Fix linker feature test with newlib 4.3.0 r=benpicco a=maribu ### Contribution description Before the build system used something like echo "int main(){} void _exit(int n) {(void)n;while(1);}" | LC_ALL=C $(LINK) -xc - -o /dev/null -lc -Wall -Wextra -pedantic <FLAGS_TO_TEST> to check for flags supported by the compiler (used as linker frontend). This however no longer works with newlib 4.3.0, which requires the symbols `_sbrk_r`, `_close_r`, `_lseek_r`, `_read_r`, and `_write_r` to be present. Instead, now a new file `minimal_linkable.c` was added that adds all the missing symbols and is used in the linker feature tests instead. ### Testing procedure - No regressions on the CI - No changes in binaries - Building rust apps with newlib 4.3.0 should work again ### Issues/PRs references Co-authored-by: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
- Loading branch information
Showing
7 changed files
with
3,586 additions
and
3,516 deletions.
There are no files selected for viewing
This file contains 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
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
Test Programs | ||
============= | ||
|
||
This folder contains a collection of test programs for use by the build system, | ||
e.g. to check for compiler features. | ||
|
||
`minimal_linkable.c` | ||
-------------------- | ||
|
||
This is a minimal C program that is expected to compile and link with all | ||
supported versions of GCC and newlib. | ||
|
||
Note: We currently even link with GCC when compilation is done with LLVM. It is | ||
expected to compile and link fine with LLVM as well, but may require more some | ||
additional flags to find the embedded C lib to link against. |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
#include <reent.h> | ||
|
||
int main(void) | ||
{ | ||
return 0; | ||
} | ||
|
||
void _exit(int n) | ||
{ | ||
(void)n; | ||
while(1); | ||
} | ||
|
||
void *_sbrk_r(struct _reent *r, ptrdiff_t incr) | ||
{ | ||
(void)r; | ||
(void)incr; | ||
return NULL; | ||
} | ||
|
||
int _close_r(struct _reent *r, int fd) | ||
{ | ||
(void)r; | ||
(void)fd; | ||
return 0; | ||
} | ||
|
||
_off_t _lseek_r(struct _reent *r, int fd, _off_t off, int whence) | ||
{ | ||
(void)r; | ||
(void)fd; | ||
(void)off; | ||
(void)whence; | ||
return 0; | ||
} | ||
|
||
_ssize_t _read_r(struct _reent *r, int fd, void *buffer, size_t count) | ||
{ | ||
(void)r; | ||
(void)fd; | ||
(void)buffer; | ||
(void)count; | ||
|
||
return 0; | ||
} | ||
|
||
_ssize_t _write_r(struct _reent *r, int fd, const void *data, size_t count) | ||
{ | ||
(void)r; | ||
(void)fd; | ||
(void)data; | ||
(void)count; | ||
|
||
return 0; | ||
} |
This file contains 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
This file contains 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
This file contains 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