From patchwork Mon Aug 3 12:46:24 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juan Quintela X-Patchwork-Id: 30534 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by bilbo.ozlabs.org (Postfix) with ESMTPS id 6351EB6F31 for ; Mon, 3 Aug 2009 23:52:10 +1000 (EST) Received: from localhost ([127.0.0.1]:46033 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MXxxO-0005dJ-Sc for incoming@patchwork.ozlabs.org; Mon, 03 Aug 2009 09:52:06 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MXwzF-0003Pc-Bu for qemu-devel@nongnu.org; Mon, 03 Aug 2009 08:49:57 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MXwzA-0003M0-Ie for qemu-devel@nongnu.org; Mon, 03 Aug 2009 08:49:56 -0400 Received: from [199.232.76.173] (port=51683 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MXwzA-0003Lk-CF for qemu-devel@nongnu.org; Mon, 03 Aug 2009 08:49:52 -0400 Received: from mx2.redhat.com ([66.187.237.31]:40812) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MXwz9-00071L-Kz for qemu-devel@nongnu.org; Mon, 03 Aug 2009 08:49:51 -0400 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n73CnpPC006579; Mon, 3 Aug 2009 08:49:51 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n73CnoTJ026121; Mon, 3 Aug 2009 08:49:50 -0400 Received: from localhost.localdomain (vpn-12-117.rdu.redhat.com [10.11.12.117]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n73Cn8Mb009715; Mon, 3 Aug 2009 08:49:48 -0400 From: Juan Quintela To: qemu-devel@nongnu.org Date: Mon, 3 Aug 2009 14:46:24 +0200 Message-Id: <84fbc31d8483e897ab6b2e8922349555149ae24d.1249301360.git.quintela@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.58 on 172.16.27.26 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Cc: aliguori@us.ibm.com Subject: [Qemu-devel] [PATCH 33/81] Refactor HELPER_CFLAGS X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Calculate its value in ./configure. Put together all its uses Signed-off-by: Juan Quintela --- Makefile.target | 28 ++++------------------------ configure | 4 ++++ 2 files changed, 8 insertions(+), 24 deletions(-) diff --git a/Makefile.target b/Makefile.target index 60eba31..d5e38b3 100644 --- a/Makefile.target +++ b/Makefile.target @@ -19,22 +19,10 @@ endif PROGS=$(QEMU_PROG) -HELPER_CFLAGS= - -ifeq ($(ARCH),i386) -HELPER_CFLAGS+=-fomit-frame-pointer -endif - ifeq ($(subst ppc64,ppc,$(ARCH))$(TARGET_BASE_ARCH),ppcppc) translate.o: QEMU_CFLAGS := $(QEMU_CFLAGS) $(call cc-option, $(QEMU_CFLAGS), -fno-unit-at-a-time,) endif -ifeq ($(ARCH),sparc) - ifneq ($(CONFIG_SOLARIS),y) - HELPER_CFLAGS+=-ffixed-i0 - endif -endif - ifeq ($(ARCH),alpha) # Ensure there's only a single GP QEMU_CFLAGS+=-msmall-data @@ -153,6 +141,10 @@ op_helper.o: QEMU_CFLAGS += $(HELPER_CFLAGS) cpu-exec.o: QEMU_CFLAGS += $(HELPER_CFLAGS) +# Note: this is a workaround. The real fix is to avoid compiling +# cpu_signal_handler() in cpu-exec.c. +signal.o: QEMU_CFLAGS += $(HELPER_CFLAGS) + ######################################################### # Linux user emulator target @@ -188,10 +180,6 @@ obj-arm-y += arm-semi.o obj-m68k-y += m68k-sim.o m68k-semi.o -# Note: this is a workaround. The real fix is to avoid compiling -# cpu_signal_handler() in cpu-exec.c. -signal.o: QEMU_CFLAGS += $(HELPER_CFLAGS) - ARLIBS=../libqemu_user.a libqemu.a endif #CONFIG_LINUX_USER @@ -211,10 +199,6 @@ LIBS+=-lmx obj-y = main.o commpage.o machload.o mmap.o signal.o syscall.o thunk.o \ gdbstub.o gdbstub-xml.o ioport-user.o -# Note: this is a workaround. The real fix is to avoid compiling -# cpu_signal_handler() in cpu-exec.c. -signal.o: QEMU_CFLAGS += $(HELPER_CFLAGS) - ARLIBS=libqemu.a endif #CONFIG_DARWIN_USER @@ -231,10 +215,6 @@ obj-y = main.o bsdload.o elfload.o mmap.o path.o signal.o strace.o syscall.o \ gdbstub.o gdbstub-xml.o ioport-user.o obj-y += uaccess.o -# Note: this is a workaround. The real fix is to avoid compiling -# cpu_signal_handler() in cpu-exec.c. -signal.o: QEMU_CFLAGS += $(HELPER_CFLAGS) - ARLIBS=libqemu.a ../libqemu_user.a endif #CONFIG_BSD_USER diff --git a/configure b/configure index 01e667f..1a3ced7 100755 --- a/configure +++ b/configure @@ -44,6 +44,7 @@ make="make" install="install" objcopy="objcopy" ld="ld" +helper_cflags="" # parse CC options first for opt do @@ -533,6 +534,7 @@ case "$cpu" in QEMU_CFLAGS="-m32 -ffixed-g2 -ffixed-g3 $QEMU_CFLAGS" if test "$solaris" = "no" ; then QEMU_CFLAGS="-ffixed-g1 -ffixed-g6 $QEMU_CFLAGS" + helper_cflags="-ffixed-i0" fi ;; sparc64) @@ -549,6 +551,7 @@ case "$cpu" in i386) QEMU_CFLAGS="-m32 $QEMU_CFLAGS" LDFLAGS="-m32 $LDFLAGS" + helper_cflags="-fomit-frame-pointer" host_guest_base="yes" ;; x86_64) @@ -1753,6 +1756,7 @@ echo "OBJCOPY=$objcopy" >> $config_host_mak echo "LD=$ld" >> $config_host_mak echo "CFLAGS=$CFLAGS" >> $config_host_mak echo "QEMU_CFLAGS=$QEMU_CFLAGS" >> $config_host_mak +echo "HELPER_CFLAGS=$helper_cflags" >> $config_host_mak echo "LDFLAGS=$LDFLAGS" >> $config_host_mak echo "ARLIBS_BEGIN=$arlibs_begin" >> $config_host_mak echo "ARLIBS_END=$arlibs_end" >> $config_host_mak