Skip to contentSkip to conversation

build: Move tracing objects into libuser on usermode emulation targets

PATCH In review Lluís Vilanova 2 participants 5 messages Sep 15, 2011 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 build: Move tracing objects into libuser on usermode emulation targets

This will apply libuser-specific compilation flags (like the ones added by --enable-user-pie), but keep softmmu emulation targets "as-is".

---
 Makefile.objs   |    1 +
 Makefile.target |    2 +-
 Makefile.user   |    4 +++-
 configure       |    1 +
 4 files changed, 6 insertions(+), 2 deletions(-)
Makefile.objs +1 -0
index 62020d7..fb11fba 100644
@@ -177,6 +177,7 @@ user-obj-y =
 user-obj-y += envlist.o path.o
 user-obj-y += tcg-runtime.o host-utils.o
 user-obj-y += cutils.o cache-utils.o
+user-obj-y += $(trace-obj-y)
 
 ######################################################################
 # libhw
Makefile.target +1 -1
index f708453..88d2f1f 100644
@@ -383,6 +383,7 @@ obj-y += $(addprefix ../, $(common-obj-y))
 obj-y += $(addprefix ../libdis/, $(libdis-y))
 obj-y += $(libobj-y)
 obj-y += $(addprefix $(HWDIR)/, $(hw-obj-y))
+obj-y += $(addprefix ../, $(trace-obj-y))
 
 endif # CONFIG_SOFTMMU
 
@@ -394,7 +395,6 @@ obj-$(CONFIG_SMARTCARD_NSS) += $(addprefix ../libcacard/, $(libcacard-y))
 endif # CONFIG_BSD_USER
 endif # CONFIG_LINUX_USER
 
-obj-y += $(addprefix ../, $(trace-obj-y))
 obj-$(CONFIG_GDBSTUB_XML) += gdbstub-xml.o
 
 $(QEMU_PROG): $(obj-y) $(obj-$(TARGET_BASE_ARCH)-y)
Makefile.user +3 -1
index 024b773..2b1e4d1 100644
@@ -17,7 +17,9 @@ all: $(user-obj-y)
 	@true
 
 clean:
-	rm -f *.o *.d *.a *~
+	for d in . trace; do \
+	rm -f $$d/*.o $$d/*.d $$d/*.a $$d/*~; \
+	done
 
 # Include automatically generated dependency files
 -include $(wildcard *.d */*.d)
configure +1 -0
index 0875f95..ad924c4 100755
@@ -3669,6 +3669,7 @@ fi
 
 d=libuser
 mkdir -p $d
+mkdir -p $d/trace
 symlink $source_path/Makefile.user $d/Makefile
 if test "$static" = "no" -a "$user_pie" = "yes" ; then
   echo "QEMU_CFLAGS+=-fpie" > $d/config.mak
#1 lore raw
Quoted 2 lines · Lluís Vilanova

This will apply libuser-specific compilation flags (like the ones added by --enable-user-pie), but keep softmmu emulation targets "as-is".

This is missing some dependencies.

make[1]: *** No rule to make target config-host.mak', needed by trace.c-timestamp'. Stop.
make: *** [subdir-libuser] Error 2

r~

#2 lore raw
Quoted 8 lines · Richard Henderson
Quoted 2 lines · Lluís Vilanova

This will apply libuser-specific compilation flags (like the ones added by --enable-user-pie), but keep softmmu emulation targets "as-is".

This is missing some dependencies.

make[1]: *** No rule to make target config-host.mak', needed by trace.c-timestamp'. Stop.
make: *** [subdir-libuser] Error 2

Is this for an out-of-tree compilation? I saw some errors regarding missing *.mak files that were already there before applying my changes.

Lluis

Signature · 4 lines
 "And it's much the same thing with knowledge, for whenever you learn
 something new, the whole world becomes that much richer."
 -- The Princess of Pure Reason, as told by Norton Juster in The Phantom
 Tollbooth
#3 lore raw
Quoted 2 lines · Lluís Vilanova

Is this for an out-of-tree compilation? I saw some errors regarding missing *.mak files that were already there before applying my changes.

Of course. I never build in-tree.

r~

#4 lore raw
In reply to Lluís Vilanova
Quoted 5 lines · Lluís Vilanova
Quoted 3 lines · Richard Henderson
Quoted 2 lines · Lluís Vilanova

This will apply libuser-specific compilation flags (like the ones added by --enable-user-pie), but keep softmmu emulation targets "as-is".

Quoted 7 lines
Quoted 4 lines

This is missing some dependencies.

make[1]: *** No rule to make target config-host.mak', needed by trace.c-timestamp'. Stop.
make: *** [subdir-libuser] Error 2

Is this for an out-of-tree compilation? I saw some errors regarding missing *.mak files that were already there before applying my changes.

Never mind. I had some in-tree files from previous compilations.

Lluis

Signature · 4 lines
 "And it's much the same thing with knowledge, for whenever you learn
 something new, the whole world becomes that much richer."
 -- The Princess of Pure Reason, as told by Norton Juster in The Phantom
 Tollbooth