Commit 268d191a authored by Thomas Weißschuh's avatar Thomas Weißschuh Committed by Masahiro Yamada
Browse files

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: default avatarThomas Weißschuh <thomas.weissschuh@linutronix.de>
Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
parent 700bd25b
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -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
+0 −1
Original line number Diff line number Diff line
@@ -473,7 +473,6 @@ config READABLE_ASM

config HEADERS_INSTALL
	bool "Install uapi headers to usr/include"
	depends on !UML
	help
	  This option will install uapi headers (headers exported to user-space)
	  into the usr/include directory for use during the kernel build.