From patchwork Mon Aug 29 19:27:48 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Roth X-Patchwork-Id: 112123 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 7CCD2B6F90 for ; Tue, 30 Aug 2011 05:28:21 +1000 (EST) Received: from localhost ([::1]:40437 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qy7VK-0008Q4-DM for incoming@patchwork.ozlabs.org; Mon, 29 Aug 2011 15:28:18 -0400 Received: from eggs.gnu.org ([140.186.70.92]:35520) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qy7VF-0008Pz-68 for qemu-devel@nongnu.org; Mon, 29 Aug 2011 15:28:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qy7VD-0007bh-V3 for qemu-devel@nongnu.org; Mon, 29 Aug 2011 15:28:13 -0400 Received: from mout.perfora.net ([74.208.4.195]:54698) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qy7VD-0007bb-Nx for qemu-devel@nongnu.org; Mon, 29 Aug 2011 15:28:11 -0400 Received: from localhost.localdomain ([32.97.110.59]) by mrelay.perfora.net (node=mrus3) with ESMTP (Nemesis) id 0McV4q-1QgS7h1dZo-00I5Iz; Mon, 29 Aug 2011 15:28:04 -0400 From: Michael Roth To: qemu-devel@nongnu.org Date: Mon, 29 Aug 2011 14:27:48 -0500 Message-Id: <1314646068-31438-1-git-send-email-mdroth@linux.vnet.ibm.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <4E5BE7AF.5020906@linux.vnet.ibm.com> References: <4E5BE7AF.5020906@linux.vnet.ibm.com> X-Provags-ID: V02:K0:VrTuIcMUJOiG4IfQ1kRZH39LBnMfNBbZd7yjEysl4QZ FdVioMqBSkl9nDdB6iEzmOK+JiPL6dw8NmCITBfDvvKbZmCBlZ vtPcbvWCp+4fSMejuIWDEeO9GUbZJDWQRgeCBRybMBZZmHp0vC XKbZtL+AsSquIzXvEhXGJd9QUee1Q4lRtIjfjXcqO5FUPGBNVq x14z7adRAG2rnOodcCt+jaEYFRB9X52h2nnEfLm4wM/BfBTcaD 6gCOhwxLqL6cxN7BqJEiFKfpql77CD0lqwnRcBmxg+VolsUmbJ AqLvxN2kFzh5hMbhb/uxRRMQB2TKX6W1JJPjiMMj5PMWDSfK+1 oxsDkukOFFLPpiEXoyMd74ymXkshfb98jdJUpKbRgmvOGxQhz9 7o3RfN/uBwFPUzoDgoH26Ze9KmcXfDrKpw= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 74.208.4.195 Cc: blauwirbel@gmail.com, stefanha@gmail.com, xscript@gmx.net Subject: [Qemu-devel] [PATCH] Add CONFIG_QEMU_TIMER to handle qemu-timer-common.o dep 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 conditionally sets CONFIG_QEMU_TIMER in configure when something like --enable-trace-backend=simple is set which requires qemu-timer-common.o. Object groups dependent on such code can then simply do: x-obj-$(CONFIG_QEMU_TIMER) += qemu-timer-common.o This also fixes build issue with qemu-ga due due not linking in qemu-timer-common.o when using --enable-trace-backend=simple Signed-off-by: Michael Roth --- Makefile.objs | 3 ++- configure | 5 +++++ 2 files changed, 7 insertions(+), 1 deletions(-) diff --git a/Makefile.objs b/Makefile.objs index d1f3e5d..0048650 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-$(CONFIG_QEMU_TIMER) += qemu-timer-common.o ###################################################################### # libhw @@ -380,7 +381,6 @@ else trace-obj-y = trace.o ifeq ($(TRACE_BACKEND),simple) trace-obj-y += simpletrace.o -user-obj-y += qemu-timer-common.o endif endif @@ -404,6 +404,7 @@ qga-obj-y = $(addprefix qga/, $(qga-nested-y)) qga-obj-y += qemu-ga.o qemu-tool.o qemu-error.o qemu-sockets.o module.o qemu-option.o cutils.o osdep.o qga-obj-$(CONFIG_WIN32) += oslib-win32.o qga-obj-$(CONFIG_POSIX) += oslib-posix.o +qga-obj-$(CONFIG_QEMU_TIMER) += qemu-timer-common.o vl.o: QEMU_CFLAGS+=$(GPROF_CFLAGS) diff --git a/configure b/configure index 1340c33..64da275 100755 --- a/configure +++ b/configure @@ -183,6 +183,7 @@ usb_redir="" opengl="" zlib="yes" guest_agent="yes" +qemu_timer="no" # parse CC options first for opt do @@ -3071,6 +3072,7 @@ fi # Set the appropriate trace file. if test "$trace_backend" = "simple"; then trace_file="\"$trace_file-\" FMT_pid" + qemu_timer="yes" fi if test "$trace_backend" = "dtrace" -a "$trace_backend_stap" = "yes" ; then echo "CONFIG_SYSTEMTAP_TRACE=y" >> $config_host_mak @@ -3109,6 +3111,9 @@ echo "LIBS+=$LIBS" >> $config_host_mak echo "LIBS_TOOLS+=$libs_tools" >> $config_host_mak echo "EXESUF=$EXESUF" >> $config_host_mak echo "LIBS_QGA+=$libs_qga" >> $config_host_mak +if test "$qemu_timer" = "yes" ; then + echo "CONFIG_QEMU_TIMER=y" >>$config_host_mak +fi # generate list of library paths for linker script