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

John Hubbard jhubbard at nvidia.com
Wed May 8 18:03:58 PDT 2024


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




More information about the kvm-riscv mailing list