diff mbox series

[kvm-unit-tests] realmode: rebuild when realmode.lds changes

Message ID 20240604143507.1041901-2-pbonzini@redhat.com (mailing list archive)
State New, archived
Headers show
Series [kvm-unit-tests] realmode: rebuild when realmode.lds changes | expand

Commit Message

Paolo Bonzini June 4, 2024, 2:35 p.m. UTC
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 x86/Makefile.common | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Thomas Huth June 4, 2024, 2:38 p.m. UTC | #1
On 04/06/2024 16.35, Paolo Bonzini wrote:
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>   x86/Makefile.common | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/x86/Makefile.common b/x86/Makefile.common
> index 4ae9a557..c5dd4970 100644
> --- a/x86/Makefile.common
> +++ b/x86/Makefile.common
> @@ -103,9 +103,9 @@ test_cases: $(tests-common) $(tests)
>   
>   $(TEST_DIR)/%.o: CFLAGS += -std=gnu99 -ffreestanding -I $(SRCDIR)/lib -I $(SRCDIR)/lib/x86 -I lib
>   
> -$(TEST_DIR)/realmode.elf: $(TEST_DIR)/realmode.o
> +$(TEST_DIR)/realmode.elf: $(TEST_DIR)/realmode.o $(SRCDIR)/$(TEST_DIR)/realmode.lds
>   	$(LD) -m elf_i386 -nostdlib -o $@ \
> -	      -T $(SRCDIR)/$(TEST_DIR)/realmode.lds $^
> +	      -T $(SRCDIR)/$(TEST_DIR)/realmode.lds $(filter %.o, $^)


Reviewed-by: Thomas Huth <thuth@redhat.com>
diff mbox series

Patch

diff --git a/x86/Makefile.common b/x86/Makefile.common
index 4ae9a557..c5dd4970 100644
--- a/x86/Makefile.common
+++ b/x86/Makefile.common
@@ -103,9 +103,9 @@  test_cases: $(tests-common) $(tests)
 
 $(TEST_DIR)/%.o: CFLAGS += -std=gnu99 -ffreestanding -I $(SRCDIR)/lib -I $(SRCDIR)/lib/x86 -I lib
 
-$(TEST_DIR)/realmode.elf: $(TEST_DIR)/realmode.o
+$(TEST_DIR)/realmode.elf: $(TEST_DIR)/realmode.o $(SRCDIR)/$(TEST_DIR)/realmode.lds
 	$(LD) -m elf_i386 -nostdlib -o $@ \
-	      -T $(SRCDIR)/$(TEST_DIR)/realmode.lds $^
+	      -T $(SRCDIR)/$(TEST_DIR)/realmode.lds $(filter %.o, $^)
 
 $(TEST_DIR)/realmode.o: bits = $(if $(call cc-option,-m16,""),16,32)