Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

tools/virtio: pass KCFLAGS to module build

Update the mod target to pass KCFLAGS with the in-tree vhost driver
include path. This way vhost_test can find vhost headers.

Created using Cursor CLI.

Message-ID: <5473e5a5dfd2fcd261a778f2017cac669c031f23.1764873799.git.mst@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

+2 -1
+2 -1
tools/virtio/Makefile
··· 20 20 CFLAGS += -pthread 21 21 LDFLAGS += -pthread 22 22 vpath %.c ../../drivers/virtio ../../drivers/vhost 23 + BUILD=KCFLAGS="-I "`pwd`/../../drivers/vhost ${MAKE} -C `pwd`/../.. V=${V} 23 24 mod: 24 - ${MAKE} -C `pwd`/../.. M=`pwd`/vhost_test V=${V} 25 + ${BUILD} M=`pwd`/vhost_test 25 26 26 27 #oot: build vhost as an out of tree module for a distro kernel 27 28 #no effort is taken to make it actually build or work, but tends to mostly work