From patchwork Thu Sep 15 17:16:33 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Llu=C3=ADs_Vilanova?= X-Patchwork-Id: 114806 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 323DCB6F70 for ; Fri, 16 Sep 2011 03:17:48 +1000 (EST) Received: from localhost ([::1]:55932 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R4FZI-0007OP-Vj for incoming@patchwork.ozlabs.org; Thu, 15 Sep 2011 13:17:44 -0400 Received: from eggs.gnu.org ([140.186.70.92]:51686) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R4FZD-0007OI-El for qemu-devel@nongnu.org; Thu, 15 Sep 2011 13:17:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R4FZC-0003s4-7v for qemu-devel@nongnu.org; Thu, 15 Sep 2011 13:17:39 -0400 Received: from gw.ac.upc.es ([147.83.30.3]:46352 helo=gw.ac.upc.edu) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R4FZB-0003pN-SP for qemu-devel@nongnu.org; Thu, 15 Sep 2011 13:17:38 -0400 Received: from localhost (unknown [84.88.53.92]) by gw.ac.upc.edu (Postfix) with ESMTP id 66B796B01CF; Thu, 15 Sep 2011 19:17:33 +0200 (CEST) To: qemu-devel@nongnu.org From: =?utf-8?b?TGx1w61z?= Vilanova Date: Thu, 15 Sep 2011 19:16:33 +0200 Message-ID: <20110915171633.23144.55928.stgit@ginnungagap.bsc.es> User-Agent: StGit/0.15 MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 147.83.30.3 Cc: Richard Henderson Subject: [Qemu-devel] [PATCH] build: Move tracing objects into libuser on usermode emulation targets X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 --- Makefile.objs | 7 ++++--- Makefile.target | 2 +- Makefile.user | 4 +++- configure | 1 + 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/Makefile.objs b/Makefile.objs index 62020d7..1c65087 100644 --- a/Makefile.objs +++ b/Makefile.objs @@ -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 @@ -340,12 +341,12 @@ trace.h: trace.h-timestamp trace-dtrace.h else trace.h: trace.h-timestamp 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") @cmp -s $@ trace.h || cp $@ trace.h 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") @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 # rule file. So we use '.dtrace' instead 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") @cmp -s $@ trace-dtrace.dtrace || cp $@ trace-dtrace.dtrace diff --git a/Makefile.target b/Makefile.target index f708453..88d2f1f 100644 --- a/Makefile.target +++ b/Makefile.target @@ -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) diff --git a/Makefile.user b/Makefile.user index 024b773..2b1e4d1 100644 --- a/Makefile.user +++ b/Makefile.user @@ -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) diff --git a/configure b/configure index 0875f95..ad924c4 100755 --- a/configure +++ b/configure @@ -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