Skip to content

Commit f3dfd59

Browse files
committed
UAPI: Fix conditional header installation handling (notably kvm_para.h on m68k)
The m68k arch doesn't have a kvm_para.h (unlike most or maybe all other arches), but there is one in asm-generic. This means that: ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/kvm_para.h \ $(srctree)/include/asm-$(SRCARCH)/kvm_para.h \ $(INSTALL_HDR_PATH)/include/asm-*/kvm_para.h),) header-y += kvm_para.h endif gets it wrong because it is invoked twice during the header installation - and on the second occasion, asm-generic/kvm_para.h has been installed in usr/, thus triggering a attempt to install asm-m68k/kvm_para.h which will fail. There are three headers with this sort of conditional logic: a.out.h, kvm.h and kvm_para.h. For all three of them, change the logic to be something like: ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/kvm_para.h \ $(srctree)/arch/$(SRCARCH)/include/uapi/asm/kvm_para.h),) which finds the header in only the two places it should be found, and doesn't get incorrectly triggered by the installation of asm-generic's version. Signed-off-by: David Howells <dhowells@redhat.com>
1 parent b2249fb commit f3dfd59

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

‎include/linux/Kbuild‎

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,15 @@ header-y += usb/
2121
header-y += wimax/
2222

2323
ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/a.out.h \
24-
$(srctree)/include/asm-$(SRCARCH)/a.out.h \
25-
$(INSTALL_HDR_PATH)/include/asm-*/a.out.h),)
24+
$(srctree)/arch/$(SRCARCH)/include/uapi/asm/a.out.h),)
2625
header-y += a.out.h
2726
endif
2827
ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/kvm.h \
29-
$(srctree)/include/asm-$(SRCARCH)/kvm.h \
30-
$(INSTALL_HDR_PATH)/include/asm-*/kvm.h),)
28+
$(srctree)/arch/$(SRCARCH)/include/uapi/asm/kvm.h),)
3129
header-y += kvm.h
3230
endif
3331
ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/kvm_para.h \
34-
$(srctree)/include/asm-$(SRCARCH)/kvm_para.h \
35-
$(INSTALL_HDR_PATH)/include/asm-*/kvm_para.h),)
32+
$(srctree)/arch/$(SRCARCH)/include/uapi/asm/kvm_para.h),)
3633
header-y += kvm_para.h
3734
endif
3835

0 commit comments

Comments
 (0)