summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorThomas Weißschuh <thomas.weissschuh@linutronix.de>2025-02-17 11:59:21 +0100
committerMasahiro Yamada <masahiroy@kernel.org>2025-03-15 21:19:44 +0900
commit268d191abc57a89f4ed92efcb276aae54f86c88c (patch)
treeaf44b3958b69fbe4793bd6c5b4ae7ee121b34d6c /Makefile
parent700bd25bd4f47a0f4e02e0a25dde05f1a6b16eea (diff)
kbuild: implement CONFIG_HEADERS_INSTALL for Usermode Linux
userprogs sometimes need access to UAPI headers. This is currently not possible for Usermode Linux, as UM is only a pseudo architecture built on top of a regular architecture and does not have its own UAPI. Instead use the UAPI headers from the underlying regular architecture. Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile5
1 files changed, 4 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 3428e4630069..f2ec8d05c0f5 100644
--- a/Makefile
+++ b/Makefile
@@ -1361,9 +1361,12 @@ hdr-inst := -f $(srctree)/scripts/Makefile.headersinst obj
PHONY += headers
headers: $(version_h) scripts_unifdef uapi-asm-generic archheaders archscripts
- $(if $(filter um, $(SRCARCH)), $(error Headers not exportable for UML))
+ifdef HEADER_ARCH
+ $(Q)$(MAKE) -f $(srctree)/Makefile HEADER_ARCH= SRCARCH=$(HEADER_ARCH) headers
+else
$(Q)$(MAKE) $(hdr-inst)=include/uapi
$(Q)$(MAKE) $(hdr-inst)=arch/$(SRCARCH)/include/uapi
+endif
ifdef CONFIG_HEADERS_INSTALL
prepare: headers