[klibc] [PATCH klibc 4/4] Kbuild.install: Copy UAPI headers instead of reinstalling them

Ben Hutchings ben at decadent.org.uk
Sun Jan 6 20:25:20 PST 2019


Since the UAPI/KAPI header split in Linux 3.7, we have needed
KLIBCKERNELSRC to point to the installed UAPI headers.  Invoking
"make headers_install" in this directory doesn't work.

The previously proposed fix was to invoke make in the parent
directory.  But since we require the headers to be installed
already, we can copy the install tree instead.  Make sure to
dereference any symbolic links while doing this.

Reported-by: Thomas Meyer <thomas at m3y3r.de>
Reported-by: Luis R. Rodriguez <mcgrof at kernel.org>
Signed-off-by: Ben Hutchings <ben at decadent.org.uk>
---
 scripts/Kbuild.install | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/Kbuild.install b/scripts/Kbuild.install
index bafd42328ddb..32aec84a1a8c 100644
--- a/scripts/Kbuild.install
+++ b/scripts/Kbuild.install
@@ -95,7 +95,7 @@ PHONY += header footer descend
 	$(Q)mkdir -p $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)include
 	$(Q)mkdir -p $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)lib
 	$(Q)mkdir -p $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)bin
-	$(Q)$(MAKE) -C $(KLIBCKERNELSRC) ARCH=$(KLIBCARCH) INSTALL_HDR_PATH=$(INSTALLROOT)$(INSTALLDIR)/$(KCROSS) headers_install
+	$(Q)cp -rfL $(KLIBCKERNELSRC)/include/. $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)include/.
 	$(Q)cp -rf usr/include/. $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)include/.
 	$(Q)chmod -R a+rX,go-w $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)include
 	$(Q)$(install-data) $(srctree)/klcc/klcc.1 $(INSTALLROOT)$(mandir)/man1/$(KCROSS)klcc.1
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://www.zytor.com/pipermail/klibc/attachments/20190107/be724876/attachment.sig>


More information about the klibc mailing list