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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 5/8/24 5:29 PM, Edward Liaw wrote:
On Wed, May 8, 2024 at 2:41 PM John Hubbard <jhubbard@xxxxxxxxxx> wrote:
On 5/7/24 2:38 PM, Edward Liaw wrote:
...
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





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux