Skip to contentSkip to conversation

realmode: rebuild when realmode.lds changes

PATCH In review Paolo Bonzini 2 participants 2 messages Jun 4, 2024 KVM

lore
Share & tools
lore

Paolo Bonzini

author maintainer
#0 lore raw

PATCH 1/1 realmode: rebuild when realmode.lds changes

---
 x86/Makefile.common | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
x86/Makefile.common +2 -2
index 4ae9a557..c5dd4970 100644
@@ -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)
 
Signature · 1 line
2.45.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 10 lines · Paolo Bonzini
---
  x86/Makefile.common | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
x86/Makefile.common +0 -0
index 4ae9a557..c5dd4970 100644

x86/Makefile.common test_cases: $(tests-common) $(tests) · line 108

Quoted 8 lines
x86/Makefile.common +2 -2
@@ -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, $^)