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". Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
388d475815
commit
937b1258b7
|
@ -177,6 +177,7 @@ user-obj-y =
|
||||||
user-obj-y += envlist.o path.o
|
user-obj-y += envlist.o path.o
|
||||||
user-obj-y += tcg-runtime.o host-utils.o
|
user-obj-y += tcg-runtime.o host-utils.o
|
||||||
user-obj-y += cutils.o cache-utils.o
|
user-obj-y += cutils.o cache-utils.o
|
||||||
|
user-obj-y += $(trace-obj-y)
|
||||||
|
|
||||||
######################################################################
|
######################################################################
|
||||||
# libhw
|
# libhw
|
||||||
|
@ -340,12 +341,12 @@ trace.h: trace.h-timestamp trace-dtrace.h
|
||||||
else
|
else
|
||||||
trace.h: trace.h-timestamp
|
trace.h: trace.h-timestamp
|
||||||
endif
|
endif
|
||||||
trace.h-timestamp: $(SRC_PATH)/trace-events config-host.mak
|
trace.h-timestamp: $(SRC_PATH)/trace-events $(BUILD_DIR)/config-host.mak
|
||||||
$(call quiet-command,sh $(SRC_PATH)/scripts/tracetool --$(TRACE_BACKEND) -h < $< > $@," GEN trace.h")
|
$(call quiet-command,sh $(SRC_PATH)/scripts/tracetool --$(TRACE_BACKEND) -h < $< > $@," GEN trace.h")
|
||||||
@cmp -s $@ trace.h || cp $@ trace.h
|
@cmp -s $@ trace.h || cp $@ trace.h
|
||||||
|
|
||||||
trace.c: trace.c-timestamp
|
trace.c: trace.c-timestamp
|
||||||
trace.c-timestamp: $(SRC_PATH)/trace-events config-host.mak
|
trace.c-timestamp: $(SRC_PATH)/trace-events $(BUILD_DIR)/config-host.mak
|
||||||
$(call quiet-command,sh $(SRC_PATH)/scripts/tracetool --$(TRACE_BACKEND) -c < $< > $@," GEN trace.c")
|
$(call quiet-command,sh $(SRC_PATH)/scripts/tracetool --$(TRACE_BACKEND) -c < $< > $@," GEN trace.c")
|
||||||
@cmp -s $@ trace.c || cp $@ trace.c
|
@cmp -s $@ trace.c || cp $@ trace.c
|
||||||
|
|
||||||
|
@ -358,7 +359,7 @@ trace-dtrace.h: trace-dtrace.dtrace
|
||||||
# but that gets picked up by QEMU's Makefile as an external dependency
|
# but that gets picked up by QEMU's Makefile as an external dependency
|
||||||
# rule file. So we use '.dtrace' instead
|
# rule file. So we use '.dtrace' instead
|
||||||
trace-dtrace.dtrace: trace-dtrace.dtrace-timestamp
|
trace-dtrace.dtrace: trace-dtrace.dtrace-timestamp
|
||||||
trace-dtrace.dtrace-timestamp: $(SRC_PATH)/trace-events config-host.mak
|
trace-dtrace.dtrace-timestamp: $(SRC_PATH)/trace-events $(BUILD_DIR)/config-host.mak
|
||||||
$(call quiet-command,sh $(SRC_PATH)/scripts/tracetool --$(TRACE_BACKEND) -d < $< > $@," GEN trace-dtrace.dtrace")
|
$(call quiet-command,sh $(SRC_PATH)/scripts/tracetool --$(TRACE_BACKEND) -d < $< > $@," GEN trace-dtrace.dtrace")
|
||||||
@cmp -s $@ trace-dtrace.dtrace || cp $@ trace-dtrace.dtrace
|
@cmp -s $@ trace-dtrace.dtrace || cp $@ trace-dtrace.dtrace
|
||||||
|
|
||||||
|
|
|
@ -383,6 +383,7 @@ obj-y += $(addprefix ../, $(common-obj-y))
|
||||||
obj-y += $(addprefix ../libdis/, $(libdis-y))
|
obj-y += $(addprefix ../libdis/, $(libdis-y))
|
||||||
obj-y += $(libobj-y)
|
obj-y += $(libobj-y)
|
||||||
obj-y += $(addprefix $(HWDIR)/, $(hw-obj-y))
|
obj-y += $(addprefix $(HWDIR)/, $(hw-obj-y))
|
||||||
|
obj-y += $(addprefix ../, $(trace-obj-y))
|
||||||
|
|
||||||
endif # CONFIG_SOFTMMU
|
endif # CONFIG_SOFTMMU
|
||||||
|
|
||||||
|
@ -394,7 +395,6 @@ obj-$(CONFIG_SMARTCARD_NSS) += $(addprefix ../libcacard/, $(libcacard-y))
|
||||||
endif # CONFIG_BSD_USER
|
endif # CONFIG_BSD_USER
|
||||||
endif # CONFIG_LINUX_USER
|
endif # CONFIG_LINUX_USER
|
||||||
|
|
||||||
obj-y += $(addprefix ../, $(trace-obj-y))
|
|
||||||
obj-$(CONFIG_GDBSTUB_XML) += gdbstub-xml.o
|
obj-$(CONFIG_GDBSTUB_XML) += gdbstub-xml.o
|
||||||
|
|
||||||
$(QEMU_PROG): $(obj-y) $(obj-$(TARGET_BASE_ARCH)-y)
|
$(QEMU_PROG): $(obj-y) $(obj-$(TARGET_BASE_ARCH)-y)
|
||||||
|
|
|
@ -17,7 +17,9 @@ all: $(user-obj-y)
|
||||||
@true
|
@true
|
||||||
|
|
||||||
clean:
|
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 automatically generated dependency files
|
||||||
-include $(wildcard *.d */*.d)
|
-include $(wildcard *.d */*.d)
|
||||||
|
|
|
@ -3669,6 +3669,7 @@ fi
|
||||||
|
|
||||||
d=libuser
|
d=libuser
|
||||||
mkdir -p $d
|
mkdir -p $d
|
||||||
|
mkdir -p $d/trace
|
||||||
symlink $source_path/Makefile.user $d/Makefile
|
symlink $source_path/Makefile.user $d/Makefile
|
||||||
if test "$static" = "no" -a "$user_pie" = "yes" ; then
|
if test "$static" = "no" -a "$user_pie" = "yes" ; then
|
||||||
echo "QEMU_CFLAGS+=-fpie" > $d/config.mak
|
echo "QEMU_CFLAGS+=-fpie" > $d/config.mak
|
||||||
|
|
Reference in New Issue