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

KVM: selftests: Build and link selftests/cgroup/lib into KVM selftests

libcgroup.o is built separately from KVM selftests and cgroup selftests,
so different compiler flags used by the different selftests will not
conflict with each other.

Signed-off-by: James Houghton <jthoughton@google.com>
Link: https://lore.kernel.org/r/20250508184649.2576210-7-jthoughton@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>

authored by

James Houghton and committed by
Sean Christopherson
b11fcb51 38e1dd57

+2 -1
+2 -1
tools/testing/selftests/kvm/Makefile.kvm
··· 205 205 # importantly defines, i.e. overwrites, $(CC) (unless `make -e` or `make CC=`, 206 206 # which causes the environment variable to override the makefile). 207 207 include ../lib.mk 208 + include ../cgroup/lib/libcgroup.mk 208 209 209 210 INSTALL_HDR_PATH = $(top_srcdir)/usr 210 211 LINUX_HDR_PATH = $(INSTALL_HDR_PATH)/include/ ··· 259 258 LIBKVM_C_OBJ := $(patsubst %.c, $(OUTPUT)/%.o, $(LIBKVM_C)) 260 259 LIBKVM_S_OBJ := $(patsubst %.S, $(OUTPUT)/%.o, $(LIBKVM_S)) 261 260 LIBKVM_STRING_OBJ := $(patsubst %.c, $(OUTPUT)/%.o, $(LIBKVM_STRING)) 262 - LIBKVM_OBJS = $(LIBKVM_C_OBJ) $(LIBKVM_S_OBJ) $(LIBKVM_STRING_OBJ) 261 + LIBKVM_OBJS = $(LIBKVM_C_OBJ) $(LIBKVM_S_OBJ) $(LIBKVM_STRING_OBJ) $(LIBCGROUP_O) 263 262 SPLIT_TEST_GEN_PROGS := $(patsubst %, $(OUTPUT)/%, $(SPLIT_TESTS)) 264 263 SPLIT_TEST_GEN_OBJ := $(patsubst %, $(OUTPUT)/$(ARCH)/%.o, $(SPLIT_TESTS)) 265 264