[PATCH 0/3] tools/nolibc: make all headers usable directly

From: Thomas Weißschuh
Date: Thu Apr 24 2025 - 07:48:32 EST


Make sure that any nolibc header can be included in any order.
Even if nolibc.h was not pre-included already.

This conflicts indirectly with "tools/nolibc: various new functions" [0].
I'll resolve those conflicts when applying.

[0] https://lore.kernel.org/lkml/20250423-nolibc-misc-v1-0-a925bf40297b@xxxxxxxxxxxxx/

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@xxxxxxxxxxxxx>
---
Thomas Weißschuh (3):
tools/nolibc: add target to check header usability
tools/nolibc: include nolibc.h early from all header files
selftests/nolibc: always run nolibc header check

tools/include/nolibc/Makefile | 9 +++++++++
tools/include/nolibc/ctype.h | 6 +++---
tools/include/nolibc/dirent.h | 6 +++---
tools/include/nolibc/elf.h | 6 +++---
tools/include/nolibc/errno.h | 6 +++---
tools/include/nolibc/fcntl.h | 6 +++---
tools/include/nolibc/getopt.h | 6 +++---
tools/include/nolibc/signal.h | 6 +++---
tools/include/nolibc/stdio.h | 6 +++---
tools/include/nolibc/stdlib.h | 6 +++---
tools/include/nolibc/string.h | 7 +++----
tools/include/nolibc/sys.h | 6 +++---
tools/include/nolibc/sys/auxv.h | 6 +++---
tools/include/nolibc/sys/mman.h | 6 +++---
tools/include/nolibc/sys/stat.h | 7 +++----
tools/include/nolibc/sys/syscall.h | 6 +++---
tools/include/nolibc/sys/time.h | 6 +++---
tools/include/nolibc/sys/wait.h | 7 +++----
tools/include/nolibc/time.h | 6 +++---
tools/include/nolibc/types.h | 6 +++---
tools/include/nolibc/unistd.h | 6 +++---
tools/testing/selftests/nolibc/Makefile | 2 +-
22 files changed, 70 insertions(+), 64 deletions(-)
---
base-commit: e90ce42e81381665dbcedc5fa12e74759ee89639
change-id: 20250423-nolibc-header-check-8c9d21850d3f

Best regards,
--
Thomas Weißschuh <thomas.weissschuh@xxxxxxxxxxxxx>