[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 33/42] Refactor HELPER_CFLAGS
From: |
Juan Quintela |
Subject: |
[Qemu-devel] [PATCH 33/42] Refactor HELPER_CFLAGS |
Date: |
Thu, 30 Jul 2009 04:07:28 +0200 |
Calculate its value in ./configure.
Put together all its uses
Signed-off-by: Juan Quintela <address@hidden>
---
Makefile.target | 28 ++++------------------------
configure | 4 ++++
2 files changed, 8 insertions(+), 24 deletions(-)
diff --git a/Makefile.target b/Makefile.target
index 344d8f8..04b98be 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: CFLAGS := $(CFLAGS) $(call cc-option, $(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
CFLAGS+=-msmall-data
@@ -153,6 +141,10 @@ op_helper.o: CFLAGS += $(HELPER_CFLAGS)
cpu-exec.o: CFLAGS += $(HELPER_CFLAGS)
+# Note: this is a workaround. The real fix is to avoid compiling
+# cpu_signal_handler() in cpu-exec.c.
+signal.o: 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: 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: 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: CFLAGS += $(HELPER_CFLAGS)
-
ARLIBS=libqemu.a ../libqemu_user.a
endif #CONFIG_BSD_USER
diff --git a/configure b/configure
index 18fe664..08c6e12 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
CFLAGS="-m32 -ffixed-g2 -ffixed-g3 $CFLAGS"
if test "$solaris" = "no" ; then
CFLAGS="-ffixed-g1 -ffixed-g6 $CFLAGS"
+ helper_cflags="-ffixed-i0"
fi
;;
sparc64)
@@ -549,6 +551,7 @@ case "$cpu" in
i386)
CFLAGS="-m32 $CFLAGS"
LDFLAGS="-m32 $LDFLAGS"
+ helper_cflags="-fomit-frame-pointer"
host_guest_base="yes"
;;
x86_64)
@@ -1750,6 +1753,7 @@ echo "AR=$ar" >> $config_host_mak
echo "OBJCOPY=$objcopy" >> $config_host_mak
echo "LD=$ld" >> $config_host_mak
echo "CFLAGS=$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
--
1.6.2.5
- [Qemu-devel] Re: [PATCH 30/42] Rename CPPFLAGS to CFLAGS, (continued)
- [Qemu-devel] Re: [PATCH 30/42] Rename CPPFLAGS to CFLAGS, Paolo Bonzini, 2009/07/30
- [Qemu-devel] Re: [PATCH 30/42] Rename CPPFLAGS to CFLAGS, Juan Quintela, 2009/07/30
- [Qemu-devel] Re: [PATCH 30/42] Rename CPPFLAGS to CFLAGS, Paolo Bonzini, 2009/07/30
- [Qemu-devel] Re: [PATCH 30/42] Rename CPPFLAGS to CFLAGS, Juan Quintela, 2009/07/30
- [Qemu-devel] Re: [PATCH 30/42] Rename CPPFLAGS to CFLAGS, Paolo Bonzini, 2009/07/30
- [Qemu-devel] Re: [PATCH 30/42] Rename CPPFLAGS to CFLAGS, Juan Quintela, 2009/07/30
- Re: [Qemu-devel] Re: [PATCH 30/42] Rename CPPFLAGS to CFLAGS, Jamie Lokier, 2009/07/30
- [Qemu-devel] Re: [PATCH 30/42] Rename CPPFLAGS to CFLAGS, Juan Quintela, 2009/07/30
- Re: [Qemu-devel] Re: [PATCH 30/42] Rename CPPFLAGS to CFLAGS, malc, 2009/07/30
[Qemu-devel] [PATCH 32/42] move common CFLAGS to configure, Juan Quintela, 2009/07/29
[Qemu-devel] [PATCH 33/42] Refactor HELPER_CFLAGS,
Juan Quintela <=
[Qemu-devel] [PATCH 31/42] split CFLAGS very long line, Juan Quintela, 2009/07/29
[Qemu-devel] [PATCH 34/42] move SDL_LIBS Win32 hack to configure, Juan Quintela, 2009/07/29
[Qemu-devel] [PATCH 35/42] Add libs_softmmu variable, Juan Quintela, 2009/07/29
[Qemu-devel] [PATCH 36/42] Add SDL_LIBS to libs_softmmu, Juan Quintela, 2009/07/29
[Qemu-devel] [PATCH 37/42] gcc generates the right dependency for this file, Juan Quintela, 2009/07/29
[Qemu-devel] [PATCH 39/42] Move sound library selection to sound selection, Juan Quintela, 2009/07/29
[Qemu-devel] [PATCH 38/42] move coreaudio libraries to coreaudio selection, Juan Quintela, 2009/07/29
[Qemu-devel] [PATCH 40/42] files are only compiled when CONFIG_ADLIB is defined, Juan Quintela, 2009/07/29
[Qemu-devel] [PATCH 41/42] Test if we need -lutil in ,/configure, Juan Quintela, 2009/07/29
[Qemu-devel] [PATCH 42/42] Fold CURSES_LIBS into libsoftmmu_libs, Juan Quintela, 2009/07/29