Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

kbuild: uapi: handle UML in architecture-specific exclusion lists

When building User Mode Linux SRCARCH is set to 'um', while the actual
underlying architecture is provided in HEADER_ARCH.

Allow the exclusion lists to work on UML by comparing against
HEADER_ARCH when that is available.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
Link: https://patch.msgid.link/20260316-kbuild-uapi-c-v2-3-35d6d0ed863f@weissschuh.net
Signed-off-by: Nicolas Schier <nsc@kernel.org>

authored by

Thomas Weißschuh and committed by
Nicolas Schier
b4ec38cb cf822413

+6 -5
+6 -5
usr/include/Makefile
··· 7 7 # -std=c90 (equivalent to -ansi) catches the violation of those. 8 8 # We cannot go as far as adding -Wpedantic since it emits too many warnings. 9 9 UAPI_CFLAGS := -std=c90 -Werror=implicit-function-declaration 10 + UAPI_ARCH := $(or $(HEADER_ARCH),$(SRCARCH)) 10 11 11 12 override c_flags = $(KBUILD_USERCFLAGS) $(UAPI_CFLAGS) -Wp,-MMD,$(depfile) 12 13 ··· 49 48 50 49 # More headers are broken in some architectures 51 50 52 - ifneq ($(filter arc openrisc xtensa nios2, $(SRCARCH)),) 51 + ifneq ($(filter arc openrisc xtensa nios2, $(UAPI_ARCH)),) 53 52 no-header-test += linux/bpf_perf_event.h 54 53 endif 55 54 56 - ifeq ($(SRCARCH),sparc) 55 + ifeq ($(UAPI_ARCH),sparc) 57 56 no-header-test += asm/uctx.h 58 57 no-header-test += asm/fbio.h 59 58 endif ··· 123 122 uses-libc += regulator/regulator.h 124 123 uses-libc += scsi/fc/fc_els.h 125 124 126 - ifeq ($(SRCARCH),hexagon) 125 + ifeq ($(UAPI_ARCH),hexagon) 127 126 uses-libc += asm/sigcontext.h 128 127 endif 129 128 130 - ifeq ($(SRCARCH),nios2) 129 + ifeq ($(UAPI_ARCH),nios2) 131 130 uses-libc += asm/ptrace.h 132 131 endif 133 132 134 - ifeq ($(SRCARCH),s390) 133 + ifeq ($(UAPI_ARCH),s390) 135 134 uses-libc += asm/chpid.h 136 135 uses-libc += asm/chsc.h 137 136 endif