Skip to contentSkip to conversation

trace: Fix user emulator dependency on trace objects

PATCH Applied Andreas Färber 4 participants 5 messages Sep 12, 2010 – Sep 21, 2010 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 trace: Fix user emulator dependency on trace objects

On a clean build, after generating trace.h, make would recurse into *-*-user without a clue how to build ../trace.o (added to $(obj-y) in Makefile.target) since its generation rule is in the main Makefile.
The softmmus are seemingly unaffected because the $(TOOLS), which each have a dependency on $(trace-obj-y), are built first for the build-all target.

Add a dependency on $(trace-obj-y) for %-user, as done for the qemu-* tools.

Let's be paranoid and do the same for %-softmmu while at it, just in case someone messes with $(TOOLS) or calls the Makefile target directly.

Cc Stefan Hajnoczi <[email protected]>
Cc Prerna Saxena <[email protected]>
Cc Blue Swirl <[email protected]>
Cc Anthony Liguori <[email protected]>
---
 Makefile |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
Makefile +2 -2
index ab91d42..090d632 100644
@@ -80,9 +80,9 @@ include $(SRC_PATH)/Makefile.objs
 endif
 
 $(common-obj-y): $(GENERATED_HEADERS)
-$(filter %-softmmu,$(SUBDIR_RULES)): $(common-obj-y) subdir-libdis
+$(filter %-softmmu,$(SUBDIR_RULES)): $(trace-obj-y) $(common-obj-y) subdir-libdis
 
-$(filter %-user,$(SUBDIR_RULES)): $(GENERATED_HEADERS) subdir-libdis-user subdir-libuser
+$(filter %-user,$(SUBDIR_RULES)): $(GENERATED_HEADERS) $(trace-obj-y) subdir-libdis-user subdir-libuser
 
 ROMSUBDIR_RULES=$(patsubst %,romsubdir-%, $(ROMS))
 romsubdir-%:
Signature · 1 line
1.7.2.2
#1 lore raw
Quoted 11 lines · Andreas Färber

On a clean build, after generating trace.h, make would recurse into *-*-user without a clue how to build ../trace.o (added to $(obj-y) in Makefile.target) since its generation rule is in the main Makefile.
The softmmus are seemingly unaffected because the $(TOOLS), which each have a dependency on $(trace-obj-y), are built first for the build-all target.

Add a dependency on $(trace-obj-y) for %-user, as done for the qemu-* tools.

Let's be paranoid and do the same for %-softmmu while at it, just in case someone messes with $(TOOLS) or calls the Makefile target directly.

Quoted 8 lines
Cc Stefan Hajnoczi <[email protected]>
Cc Prerna Saxena <[email protected]>
Cc Blue Swirl <[email protected]>
Cc Anthony Liguori <[email protected]>
---
 Makefile |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

Thanks for the patch!

Stefan

Acked-by on v1 1/1
#2 lore raw
In reply to Andreas Färber

Am 12.09.2010 17:21, schrieb Andreas Färber:

Quoted 32 lines

On a clean build, after generating trace.h, make would recurse into *-*-user without a clue how to build ../trace.o (added to $(obj-y) in Makefile.target) since its generation rule is in the main Makefile.
The softmmus are seemingly unaffected because the $(TOOLS), which each have a dependency on $(trace-obj-y), are built first for the build-all target.

Add a dependency on $(trace-obj-y) for %-user, as done for the qemu-* tools.

Let's be paranoid and do the same for %-softmmu while at it, just in case someone messes with $(TOOLS) or calls the Makefile target directly.

Cc Stefan Hajnoczi <[email protected]>
Cc Prerna Saxena <[email protected]>
Cc Blue Swirl <[email protected]>
Cc Anthony Liguori <[email protected]>

---
Makefile | 4 ++--

1 files changed, 2 insertions(+), 2 deletions(-)
Makefile +0 -0
index ab91d42..090d632 100644
@@ -80,9 +80,9 @@ include $(SRC_PATH)/Makefile.objs

endif

$(common-obj-y): $(GENERATED_HEADERS)
-$(filter %-softmmu,$(SUBDIR_RULES)): $(common-obj-y) subdir-libdis +$(filter %-softmmu,$(SUBDIR_RULES)): $(trace-obj-y) $(common-obj-y) subdir-libdis

Quoted 7 lines

-$(filter %-user,$(SUBDIR_RULES)): $(GENERATED_HEADERS) subdir-libdis-user subdir-libuser
+$(filter %-user,$(SUBDIR_RULES)): $(GENERATED_HEADERS) $(trace-obj-y) subdir-libdis-user subdir-libuser

ROMSUBDIR_RULES=$(patsubst %,romsubdir-%, $(ROMS)) romsubdir-%:

Doing the same for %-softmmu was a good idea and helped me, thanks.

Stefan

author Acked-by Stefan Weil on v1 1/1
#3 lore raw
In reply to Andreas Färber

Am 12.09.2010 um 17:21 schrieb Andreas Färber:

Quoted 8 lines

On a clean build, after generating trace.h, make would recurse into *-*-user without a clue how to build ../trace.o (added to $(obj-y) in Makefile.target) since its generation rule is in the main Makefile.
The softmmus are seemingly unaffected because the $(TOOLS), which each have a dependency on $(trace-obj-y), are built first for the build-all target.

Add a dependency on $(trace-obj-y) for %-user, as done for the qemu-* tools.

Quoted 8 lines

Let's be paranoid and do the same for %-softmmu while at it, just in case someone messes with $(TOOLS) or calls the Makefile target directly.

Cc Stefan Hajnoczi <[email protected]>
Cc Prerna Saxena <[email protected]>
Cc Blue Swirl <[email protected]>
Cc Anthony Liguori <[email protected]>

Ping? 7 days, one ack, one thank-you from the original author. Could someone please commit or comment please? This fixes a broken build configuration on all platforms.

Thanks,
Andreas

Quoted 25 lines

---
Makefile | 4 ++--

1 files changed, 2 insertions(+), 2 deletions(-)
Makefile +0 -0
index ab91d42..090d632 100644
@@ -80,9 +80,9 @@ include $(SRC_PATH)/Makefile.objs

endif

$(common-obj-y): $(GENERATED_HEADERS)
-$(filter %-softmmu,$(SUBDIR_RULES)): $(common-obj-y) subdir-libdis +$(filter %-softmmu,$(SUBDIR_RULES)): $(trace-obj-y) $(common-obj-y) subdir-libdis

-$(filter %-user,$(SUBDIR_RULES)): $(GENERATED_HEADERS) subdir- libdis-user subdir-libuser
+$(filter %-user,$(SUBDIR_RULES)): $(GENERATED_HEADERS) $(trace-obj-
y) subdir-libdis-user subdir-libuser

ROMSUBDIR_RULES=$(patsubst %,romsubdir-%, $(ROMS)) romsubdir-%:

Signature · 1 line
1.7.2.2
Applied
#4 lore raw

Thanks, applied.

Quoted 59 lines · Andreas Färber

Am 12.09.2010 um 17:21 schrieb Andreas Färber:

Quoted 12 lines

On a clean build, after generating trace.h, make would recurse into *-*-user
without a clue how to build ../trace.o (added to $(obj-y) in Makefile.target)
since its generation rule is in the main Makefile.
The softmmus are seemingly unaffected because the $(TOOLS), which each have
a dependency on $(trace-obj-y), are built first for the build-all target.

Add a dependency on $(trace-obj-y) for %-user, as done for the qemu-* tools.

Quoted 8 lines

Let's be paranoid and do the same for %-softmmu while at it, just in case someone messes with $(TOOLS) or calls the Makefile target directly.

Cc Stefan Hajnoczi <[email protected]>
Cc Prerna Saxena <[email protected]>
Cc Blue Swirl <[email protected]>
Cc Anthony Liguori <[email protected]>

Ping? 7 days, one ack, one thank-you from the original author. Could someone please commit or comment please? This fixes a broken build configuration on all platforms.

Thanks,
Andreas

Quoted 25 lines

---
Makefile |    4 ++--

1 files changed, 2 insertions(+), 2 deletions(-)
Makefile +0 -0
index ab91d42..090d632 100644
@@ -80,9 +80,9 @@ include $(SRC_PATH)/Makefile.objs

endif

$(common-obj-y): $(GENERATED_HEADERS)
-$(filter %-softmmu,$(SUBDIR_RULES)): $(common-obj-y) subdir-libdis +$(filter %-softmmu,$(SUBDIR_RULES)): $(trace-obj-y) $(common-obj-y) subdir-libdis

-$(filter %-user,$(SUBDIR_RULES)): $(GENERATED_HEADERS) subdir-libdis-user subdir-libuser
+$(filter %-user,$(SUBDIR_RULES)): $(GENERATED_HEADERS) $(trace-obj-y) subdir-libdis-user subdir-libuser

ROMSUBDIR_RULES=$(patsubst %,romsubdir-%, $(ROMS)) romsubdir-%:
--
1.7.2.2