[kvm-unit-tests PATCH] riscv: Fix sbi-deps expansion for older GNU Make

Wu Fei atwufei at 163.com
Fri Sep 5 17:32:16 PDT 2025


On 9/5/25 11:37 PM, Andrew Jones wrote:

> On Fri, Sep 05, 2025 at 03:43:12PM +0800, wu.fei9 at sanechips.com.cn wrote:
>>  From b8b66e40566bb89de57e45b08fc72446b26a7bfb Mon Sep 17 00:00:00 2001
>> From: Wu Fei <wu.fei9 at sanechips.com.cn>
>> Date: Fri, 5 Sep 2025 14:31:48 +0800
>> Subject: [PATCH] riscv: Fix sbi-deps expansion for older GNU Make
>>
>> The prerequisite $$($$*-deps) cannot be expanded to $(TEST_DIR)/sbi-deps
>> in 4.2.1 Make, rename it to sbi-deps without the prefix path.
>>
>> Signed-off-by: Wu Fei <wu.fei9 at sanechips.com.cn>
>> ---
>>   riscv/Makefile | 10 +++++-----
>>   1 file changed, 5 insertions(+), 5 deletions(-)
> Hi Wu Fei,
>
> It looks like you ran into and fixed the same thing as some others. Take a
> look at this patch and thread here [1]. I think Nicholas' solution is more
> complete since it includes the notdir. However, assuming your solution
> works, it makes me wonder why it's not necessary?


Hi Drew,


Yes, it should be the same thing. I didn't subscribe the mailing list 
yet yesterday, when I checked the archives I found Joel had reported it. 
It should be better to reply to that thread directly but I didn't figure 
out how to do that at that time.


Regarding notdir, yes, this patch happened to work on Make 4.2.1 but not 
work on 4.3.


Regards,

Fei.

>
> [1] https://lore.kernel.org/all/csh2fzymze636erajmsu5d55id6fpfsnvypkz3at7anp5i35uw@fhn2qgz327vj/
>
> Thanks,
> drew
>
>> diff --git a/riscv/Makefile b/riscv/Makefile
>> index beaeaefa..372c56b3 100644
>> --- a/riscv/Makefile
>> +++ b/riscv/Makefile
>> @@ -18,12 +18,12 @@ tests += $(TEST_DIR)/isa-dbltrp.$(exe)
>>
>>   all: $(tests)
>>
>> -$(TEST_DIR)/sbi-deps += $(TEST_DIR)/sbi-asm.o
>> -$(TEST_DIR)/sbi-deps += $(TEST_DIR)/sbi-dbtr.o
>> -$(TEST_DIR)/sbi-deps += $(TEST_DIR)/sbi-fwft.o
>> -$(TEST_DIR)/sbi-deps += $(TEST_DIR)/sbi-sse.o
>> +sbi-deps += $(TEST_DIR)/sbi-asm.o
>> +sbi-deps += $(TEST_DIR)/sbi-dbtr.o
>> +sbi-deps += $(TEST_DIR)/sbi-fwft.o
>> +sbi-deps += $(TEST_DIR)/sbi-sse.o
>>
>> -all_deps += $($(TEST_DIR)/sbi-deps)
>> +all_deps += $(sbi-deps)
>>
>>   # When built for EFI sieve needs extra memory, run with e.g. '-m 256' on QEMU
>>   $(TEST_DIR)/sieve.$(exe): AUXFLAGS = 0x1
>> --
>> 2.43.0
>>
>> -- 
>> kvm-riscv mailing list
>> kvm-riscv at lists.infradead.org
>> http://lists.infradead.org/mailman/listinfo/kvm-riscv




More information about the kvm-riscv mailing list