KVM: make: Fix out-of-source module builds
authorSiddharth Chandrasekaran <sidcha@amazon.de>
Wed, 24 Mar 2021 12:43:47 +0000 (13:43 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 30 Mar 2021 17:07:10 +0000 (13:07 -0400)
Building kvm module out-of-source with,

    make -C $SRC O=$BIN M=arch/x86/kvm

fails to find "irq.h" as the include dir passed to cflags-y does not
prefix the source dir. Fix this by prefixing $(srctree) to the include
dir path.

Signed-off-by: Siddharth Chandrasekaran <sidcha@amazon.de>
Message-Id: <20210324124347.18336-1-sidcha@amazon.de>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/Makefile

index 1b4766fe1de2defec41a7025627ca9ef55d477b8..eafc4d601f2537c2ff8e314f8958b18143d2a338 100644 (file)
@@ -1,6 +1,6 @@
 # SPDX-License-Identifier: GPL-2.0
 
-ccflags-y += -Iarch/x86/kvm
+ccflags-y += -I $(srctree)/arch/x86/kvm
 ccflags-$(CONFIG_KVM_WERROR) += -Werror
 
 ifeq ($(CONFIG_FRAME_POINTER),y)