make install_headers_all and include/linux/{a.out.h,kvm.h}
RFC 1/1 make install_headers_all and include/linux/{a.out.h,kvm.h}
Hi,
Currently with make headers_install_all, include/linux/{a.out.h,kvm.h} are not included with installed files. This is because basically when using headers_install_all, scripts/headers.sh is called, and it does "make ARCH=<arch> ... headers_install" for all working arches. The problem is that currently the headers install process checks for old headers to remove, and for some arches there is no kvm.h/asm.out.h, thus they are removed when headers.sh calls headers_install, and because the order of calls, in the end we don't have include/linux/{a.out.h,kvm.h}
I don't know if headers_install_all is recommended or supported, but in case it is, shouldn't we being including always kvm.h and a.out.h in the headers_install_all case?
If headers_install_all isn't recommended/supported, headers_install_all could be removed; or if it's expected that user should manually copy kvm.h/asm.out.h or aware of the current shortcoming, just live with it.
If we must always include them, following patch can be applied, which instead of verifying presence of asm/{a.out.h,kvm.h} inside kernel sources depending on arch, checks if they were installed in asm* directory, avoid breaking headers_install_all case:
---
Makefile renamed from Makefile.orig +2 -2
@@ -1081,8 +1081,8 @@ PHONY += headers_install headers_install: __headers $(if $(wildcard $(srctree)/$(hdr-dir)/Kbuild),, \ $(error Headers not exportable for the $(SRCARCH) architecture)) - $(Q)$(MAKE) $(hdr-inst)=include $(Q)$(MAKE) $(hdr-inst)=$(hdr-dir) $(hdr-dst) + $(Q)$(MAKE) $(hdr-inst)=include PHONY += headers_check_all headers_check_all: headers_install_all
@@ -1090,8 +1090,8 @@ headers_check_all: headers_install_all PHONY += headers_check headers_check: headers_install - $(Q)$(MAKE) $(hdr-inst)=include HDRCHECK=1 $(Q)$(MAKE) $(hdr-inst)=$(hdr-dir) $(hdr-dst) HDRCHECK=1 + $(Q)$(MAKE) $(hdr-inst)=include HDRCHECK=1 # --------------------------------------------------------------------------- # Modules
include/linux/Kbuild renamed from include/linux/Kbuild.orig +2 -4
@@ -167,8 +167,7 @@ unifdef-y += acct.h unifdef-y += adb.h unifdef-y += adfs_fs.h unifdef-y += agpgart.h -ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/a.out.h \ - $(srctree)/include/asm-$(SRCARCH)/a.out.h),) +ifneq ($(wildcard $(INSTALL_HDR_PATH)/include/asm*/a.out.h),) unifdef-y += a.out.h endif unifdef-y += apm_bios.h
@@ -262,8 +261,7 @@ unifdef-y += kd.h unifdef-y += kernelcapi.h unifdef-y += kernel.h unifdef-y += keyboard.h -ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/kvm.h \ - $(srctree)/include/asm-$(SRCARCH)/kvm.h),) +ifneq ($(wildcard $(INSTALL_HDR_PATH)/include/asm*/kvm.h),) unifdef-y += kvm.h endif unifdef-y += llc.h
--
[]'s
Herton