Thread (33 messages) 33 messages, 9 authors, 2024-05-09

Re: [PATCH v2 3/5] selftests: Include KHDR_INCLUDES in Makefile

From: John Hubbard <jhubbard@nvidia.com>
Date: 2024-05-09 01:04:24
Also in: bpf, kvm, kvm-riscv, kvmarm, linux-fsdevel, linux-input, linux-iommu, linux-kselftest, linux-mm, linux-riscv, linux-rtc, linux-sound, lkml, mptcp, netdev

On 5/8/24 5:29 PM, Edward Liaw wrote:
On Wed, May 8, 2024 at 2:41 PM John Hubbard [off-list ref] wrote:
quoted
On 5/7/24 2:38 PM, Edward Liaw wrote:
...
quoted
Seeing as how these all include lib.mk, and all use CFLAGS, is there
any reason not to simply fix this in lib.mk instead? Like this:
diff --git a/tools/testing/selftests/lib.mk b/tools/testing/selftests/lib.mk
index 7fa4a96e26ed..df72610e0d2b 100644
--- a/tools/testing/selftests/lib.mk
+++ b/tools/testing/selftests/lib.mk
@@ -170,6 +170,8 @@ clean: $(if $(TEST_GEN_MODS_DIR),clean_mods_dir)
   CFLAGS += $(USERCFLAGS)
   LDFLAGS += $(USERLDFLAGS)

+CFLAGS += $(KHDR_INCLUDES)
+
   # When make O= with kselftest target from main level
   # the following aren't defined.
   #
Or how about just adding -D_GNU_SOURCE to CFLAGS then?
Yes, that would also work. I think either one would be good.


thanks,
-- 
John Hubbard
NVIDIA
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help