Skip to content

Commit b1c2107

Browse files
committed
Merge tag 'nolibc-20250724-for-6.17-1' of git://git.kernel.org/pub/scm/linux/kernel/git/nolibc/linux-nolibc
Pull nolibc updates from Thomas Weißschuh: "Highlights: - New supported architectures: SuperH, x32, MIPS n32/n64 - Adopt general kernel architectures names - Integrate the nolibc selftests into the kselftests framework - Various fixes and new syscall wrappers Two non-nolibc changes: - New arm64 selftest which depends on nolibc changes - General tools/ cross-compilation bugfix for s390 clang" * tag 'nolibc-20250724-for-6.17-1' of git://git.kernel.org/pub/scm/linux/kernel/git/nolibc/linux-nolibc: (30 commits) selftests/nolibc: add x32 test configuration tools/nolibc: define time_t in terms of __kernel_old_time_t selftests/nolibc: show failed run if test process crashes tools/nolibc: drop s390 clang target override tools/build: Fix s390(x) cross-compilation with clang tools/nolibc: avoid false-positive -Wmaybe-uninitialized through waitpid() selftests/nolibc: correctly report errors from printf() and friends selftests/nolibc: create /dev/full when running as PID 1 tools/nolibc: add support for clock_nanosleep() and nanosleep() kselftest/arm64: Add a test for vfork() with GCS selftests/nolibc: Add coverage of vfork() tools/nolibc: Provide vfork() tools/nolibc: Replace ifdef with if defined() in sys.h tools/nolibc: add support for SuperH selftests/nolibc: use file driver for QEMU serial selftests/nolibc: fix EXTRACONFIG variables ordering tools/nolibc: MIPS: add support for N64 and N32 ABIs tools/nolibc: MIPS: drop noreorder option tools/nolibc: MIPS: drop manual stack pointer alignment tools/nolibc: MIPS: drop $gp setup ...
2 parents 78bb43e + b9e5036 commit b1c2107

File tree

22 files changed

+1074
-595
lines changed

22 files changed

+1074
-595
lines changed

tools/include/nolibc/Makefile

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@ else
2323
Q=@
2424
endif
2525

26-
nolibc_arch := $(patsubst arm64,aarch64,$(ARCH))
27-
arch_file := arch-$(nolibc_arch).h
26+
arch_file := arch-$(ARCH).h
2827
all_files := \
2928
compiler.h \
3029
crt.h \
@@ -91,18 +90,12 @@ help:
9190
@echo " OUTPUT = $(OUTPUT)"
9291
@echo ""
9392

94-
# Note: when ARCH is "x86" we concatenate both x86_64 and i386
9593
headers:
9694
$(Q)mkdir -p $(OUTPUT)sysroot
9795
$(Q)mkdir -p $(OUTPUT)sysroot/include
9896
$(Q)cp --parents $(all_files) $(OUTPUT)sysroot/include/
99-
$(Q)if [ "$(ARCH)" = "x86" ]; then \
100-
sed -e \
101-
's,^#ifndef _NOLIBC_ARCH_X86_64_H,#if !defined(_NOLIBC_ARCH_X86_64_H) \&\& defined(__x86_64__),' \
102-
arch-x86_64.h; \
103-
sed -e \
104-
's,^#ifndef _NOLIBC_ARCH_I386_H,#if !defined(_NOLIBC_ARCH_I386_H) \&\& !defined(__x86_64__),' \
105-
arch-i386.h; \
97+
$(Q)if [ "$(ARCH)" = "i386" -o "$(ARCH)" = "x86_64" ]; then \
98+
cat arch-x86.h; \
10699
elif [ -e "$(arch_file)" ]; then \
107100
cat $(arch_file); \
108101
else \
@@ -114,11 +107,8 @@ headers_standalone: headers
114107
$(Q)$(MAKE) -C $(srctree) headers
115108
$(Q)$(MAKE) -C $(srctree) headers_install INSTALL_HDR_PATH=$(OUTPUT)sysroot
116109

117-
# GCC uses "s390", clang "systemz"
118-
CLANG_CROSS_FLAGS := $(subst --target=s390-linux,--target=systemz-linux,$(CLANG_CROSS_FLAGS))
119-
120110
headers_check: headers_standalone
121-
for header in $(filter-out crt.h std.h,$(all_files)); do \
111+
$(Q)for header in $(filter-out crt.h std.h,$(all_files)); do \
122112
$(CC) $(CLANG_CROSS_FLAGS) -Wall -Werror -nostdinc -fsyntax-only -x c /dev/null \
123113
-I$(or $(objtree),$(srctree))/usr/include -include $$header -include $$header || exit 1; \
124114
done

tools/include/nolibc/arch-aarch64.h renamed to tools/include/nolibc/arch-arm64.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
/* SPDX-License-Identifier: LGPL-2.1 OR MIT */
22
/*
3-
* AARCH64 specific definitions for NOLIBC
3+
* ARM64 specific definitions for NOLIBC
44
* Copyright (C) 2017-2022 Willy Tarreau <[email protected]>
55
*/
66

7-
#ifndef _NOLIBC_ARCH_AARCH64_H
8-
#define _NOLIBC_ARCH_AARCH64_H
7+
#ifndef _NOLIBC_ARCH_ARM64_H
8+
#define _NOLIBC_ARCH_ARM64_H
99

1010
#include "compiler.h"
1111
#include "crt.h"
1212

13-
/* Syscalls for AARCH64 :
13+
/* Syscalls for ARM64 :
1414
* - registers are 64-bit
1515
* - stack is 16-byte aligned
1616
* - syscall number is passed in x8
@@ -150,4 +150,4 @@ void __attribute__((weak, noreturn)) __nolibc_entrypoint __no_stack_protector _s
150150
);
151151
__nolibc_entrypoint_epilogue();
152152
}
153-
#endif /* _NOLIBC_ARCH_AARCH64_H */
153+
#endif /* _NOLIBC_ARCH_ARM64_H */

tools/include/nolibc/arch-i386.h

Lines changed: 0 additions & 178 deletions
This file was deleted.

0 commit comments

Comments
 (0)