nolibc changes for v7.1
Hi Linus,
The following changes since commit 6de23f81a5e08be8fbf5e8d7e9febc72a5b5f27f:
Linux 7.0-rc1 (2026-02-22 13:18:59 -0800)
are available in the Git repository at:
ssh://[email protected]/pub/scm/linux/kernel/git/nolibc/linux-nolibc.git/ tags/nolibc-20260412-for-7.1-1
for you to fetch changes up to b070dc36291fec966ad915f80a4f239b5c70c290:
selftests/nolibc: use gcc 15 (2026-04-09 23:25:45 +0200)
----------------------------------------------------------------
nolibc changes for 7.1
Highlights:
* Many new features and optimizations to printf().
* Rename non-standard symbols to avoid collisions with application code.
* Support for byteswap.h, endian.h, err.h and asprintf().
* 64-bit dev_t.
* Smaller cleanips and fixes to the code and build system.
----------------------------------------------------------------
David Laight (27):
selftests/nolibc: Fix build with host headers and libc
tools/nolibc: Optimise and common up the number to ascii functions tools/nolibc/printf: Change variables 'c' to 'ch' and 'tmpbuf[]' to 'outbuf[]' tools/nolibc/printf: Move snprintf length check to callback selftests/nolibc: Return correct value when printf test fails selftests/nolibc: check vsnprintf() output buffer before the length selftests/nolibc: Use length of 'expected' string to check snprintf() output selftests/nolibc: Check that snprintf() doesn't write beyond the buffer end selftests/nolibc: Let EXPECT_VFPRINTF() tests be skipped
tools/nolibc: Add _NOLIBC_OPTIMIZER_HIDE_VAR() to compiler.h selftests/nolibc: Rename w to written in expect_vfprintf() tools/nolibc: Implement strerror() in terms of strerror_r() tools/nolibc: Rename the 'errnum' parameter to strerror() tools/nolibc/printf: Output pad characters in 16 byte chunks tools/nolibc/printf: Simplify __nolibc_printf()
tools/nolibc/printf: Use goto and reduce indentation tools/nolibc/printf: Use bit-masks to hold requested flag, length and conversion chars tools/nolibc/printf: Add support for length modifiers tzqL and formats iX tools/nolibc/printf: Handle "%s" with the numeric formats tools/nolibc/printf: Prepend sign to converted number tools/nolibc/printf: Add support for conversion flags space and plus tools/nolibc/printf: Special case 0 and add support for %#x tools/nolibc/printf: Add support for left aligning fields tools/nolibc/printf: Add support for zero padding and field precision tools/nolibc/printf: Add support for octal output
selftests/nolibc: Use printf variable field widths and precisions tools/nolibc/printf: Support negative variable width and precision
Thomas Weißschuh (34):
tools/nolibc: rename my_syscallX() to __nolibc_syscallX() selftests/nolibc: fix test_file_stream() on musl libc tools/nolibc: MIPS: fix clobbers of 'lo' and 'hi' registers on different ISAs selftests/nolibc: add a variable for nolibc-test source files selftests/nolibc: validate NOLIBC_IGNORE_ERRNO compilation tools/nolibc: add support for program_invocation_{,short_}name tools/nolibc: add err.h
tools/nolibc: avoid -Wundef warning for __STDC_VERSION__ selftests/nolibc: enable -Wundef
tools/nolibc: rename sys_foo() functions to _sys_foo() tools/nolibc: drop superfluous invocation of 'make headers' tools/nolibc: drop superfluous invocation of mkdir
tools/nolibc: drop superfluous definition of Q
tools/nolibc: explicitly list architecture headers selftests/nolibc: add some tests for makedev() and friends selftests/nolibc: add a test for stat().st_rdev
tools/nolibc: move the logic of makedev() and friends into functions tools/nolibc: make dev_t 64 bits wide
tools/nolibc: handle all major and minor numbers in makedev() and friends tools/nolibc: use makedev() in fstatat()
tools/nolibc: use __builtin_offsetof()
tools/nolibc: add support for asprintf()
tools/nolibc: check for overflow in calloc() without divisions selftests/nolibc: test the memory allocator
selftests/nolibc: only use libgcc when really necessary tools/nolibc: rename the internal macros used in syscall() tools/nolibc: move the call to __sysret() into syscall() tools/nolibc: add the _syscall() macro
tools/nolibc: add byteorder conversions
selftests/nolibc: explicitly handle ENOSYS from ptrace() selftests/nolibc: don't skip tests for unimplemented syscalls anymore tools/nolibc: create __nolibc_no_sanitize_ubsan
tools/nolibc: support UBSAN on gcc
selftests/nolibc: use gcc 15
tools/include/nolibc/Makefile | 14 +- tools/include/nolibc/arch-arm.h | 14 +- tools/include/nolibc/arch-arm64.h | 14 +- tools/include/nolibc/arch-loongarch.h | 14 +- tools/include/nolibc/arch-m68k.h | 14 +- tools/include/nolibc/arch-mips.h | 33 +- tools/include/nolibc/arch-powerpc.h | 14 +- tools/include/nolibc/arch-riscv.h | 14 +- tools/include/nolibc/arch-s390.h | 34 +- tools/include/nolibc/arch-sh.h | 14 +- tools/include/nolibc/arch-sparc.h | 26 +- tools/include/nolibc/arch-x86.h | 68 +-- tools/include/nolibc/byteswap.h | 21 + tools/include/nolibc/compiler.h | 21 +- tools/include/nolibc/crt.h | 31 +- tools/include/nolibc/dirent.h | 4 +- tools/include/nolibc/endian.h | 32 ++ tools/include/nolibc/err.h | 87 ++++ tools/include/nolibc/errno.h | 4 + tools/include/nolibc/fcntl.h | 12 +- tools/include/nolibc/nolibc.h | 13 +- tools/include/nolibc/poll.h | 8 +- tools/include/nolibc/sched.h | 12 +- tools/include/nolibc/signal.h | 2 +- tools/include/nolibc/stackprotector.h | 8 +- tools/include/nolibc/std.h | 2 +- tools/include/nolibc/stddef.h | 2 +- tools/include/nolibc/stdio.h | 565 ++++++++++++++++----- tools/include/nolibc/stdlib.h | 175 ++++--- tools/include/nolibc/sys.h | 288 +++++------ tools/include/nolibc/sys/ioctl.h | 6 +- tools/include/nolibc/sys/mman.h | 24 +- tools/include/nolibc/sys/mount.h | 8 +- tools/include/nolibc/sys/prctl.h | 8 +- tools/include/nolibc/sys/ptrace.h | 6 +- tools/include/nolibc/sys/random.h | 6 +- tools/include/nolibc/sys/reboot.h | 6 +- tools/include/nolibc/sys/resource.h | 10 +- tools/include/nolibc/sys/select.h | 10 +- tools/include/nolibc/sys/stat.h | 17 +- tools/include/nolibc/sys/syscall.h | 11 +- tools/include/nolibc/sys/sysmacros.h | 25 +- tools/include/nolibc/sys/time.h | 8 +- tools/include/nolibc/sys/timerfd.h | 24 +- tools/include/nolibc/sys/uio.h | 12 +- tools/include/nolibc/sys/utsname.h | 6 +- tools/include/nolibc/sys/wait.h | 6 +- tools/include/nolibc/time.h | 68 +-- tools/include/nolibc/unistd.h | 12 +- tools/testing/selftests/nolibc/Makefile | 4 +- tools/testing/selftests/nolibc/Makefile.include | 5 +- tools/testing/selftests/nolibc/Makefile.nolibc | 23 +- .../selftests/nolibc/nolibc-test-ignore-errno.c | 6 + tools/testing/selftests/nolibc/nolibc-test.c | 337 +++++++++--- tools/testing/selftests/nolibc/run-tests.sh | 2 +- 55 files changed, 1453 insertions(+), 757 deletions(-) create mode 100644 tools/include/nolibc/byteswap.h create mode 100644 tools/include/nolibc/endian.h create mode 100644 tools/include/nolibc/err.h create mode 100644 tools/testing/selftests/nolibc/nolibc-test-ignore-errno.c
The pull request you sent on Sun, 12 Apr 2026 20:45:48 +0200:
The pull request you sent on Sun, 12 Apr 2026 20:45:48 +0200:
Quoted 1 line
ssh://[email protected]/pub/scm/linux/kernel/git/nolibc/linux-nolibc.git/ tags/nolibc-20260412-for-7.1-1
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/ee60c510fb3468ec6fab98419218c4e7b37e2ca3
Thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/prtracker.html