summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoraurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162>2008-05-05 06:00:27 +0000
committeraurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162>2008-05-05 06:00:27 +0000
commitf2bf094ee7d5ca77fe6ed0b8d6599a945d97664d (patch)
treeb765fade858e2bbbc6b898746592fdc5b1250e4e
parentb6cd0ea1205dd4623ccfe796ee6c1a4da3141d99 (diff)
downloadhqemu-f2bf094ee7d5ca77fe6ed0b8d6599a945d97664d.zip
hqemu-f2bf094ee7d5ca77fe6ed0b8d6599a945d97664d.tar.gz
Qemu 32-bit i386, gcc >= 3.4 spill error fix
(Ben Taylor) git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4337 c046a42c-6fe2-441c-8c8c-71466251a162
-rw-r--r--Makefile.target10
-rwxr-xr-xconfigure7
2 files changed, 15 insertions, 2 deletions
diff --git a/Makefile.target b/Makefile.target
index f5f1c1d..bb2edd8 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -96,6 +96,12 @@ HELPER_CFLAGS=
ifeq ($(ARCH),i386)
HELPER_CFLAGS+=-fomit-frame-pointer
OP_CFLAGS+=-mpreferred-stack-boundary=2 -fomit-frame-pointer
+# op.c and helper.c need this on 32-bit x86 system to avoid
+# a compiler spill error. This can probably go away
+# once the SSE ops have been converted to TCG
+ifeq ($(HAVE_GT_GCC_3_3), true)
+I386_CFLAGS=-march=i586 -mtune=i686
+endif
endif
ifeq ($(ARCH),ppc)
@@ -309,7 +315,7 @@ gen-op.h: op.o $(DYNGEN)
$(DYNGEN) -g -o $@ $<
op.o: op.c
- $(CC) $(OP_CFLAGS) $(CPPFLAGS) -c -o $@ $<
+ $(CC) $(OP_CFLAGS) $(CPPFLAGS) $(I386_CFLAGS) -c -o $@ $<
machine.o: machine.c
$(CC) $(OP_CFLAGS) $(CPPFLAGS) -c -o $@ $<
@@ -319,7 +325,7 @@ machine.o: machine.c
ifeq ($(TARGET_BASE_ARCH), i386)
# XXX: rename helper.c to op_helper.c
helper.o: helper.c
- $(CC) $(HELPER_CFLAGS) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
+ $(CC) $(HELPER_CFLAGS) $(CPPFLAGS) $(CFLAGS) $(I386_CFLAGS) -c -o $@ $<
else
op_helper.o: op_helper.c
$(CC) $(HELPER_CFLAGS) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
diff --git a/configure b/configure
index bbef4c6..974a419 100755
--- a/configure
+++ b/configure
@@ -1199,6 +1199,13 @@ case "$target_cpu" in
then
echo "#define USE_KQEMU 1" >> $config_h
fi
+ gcc3minver=`$cc --version 2> /dev/null| fgrep "(GCC) 3." | awk '{ print $3 }' | cut -f2 -d.`
+ if test -n "$gcc3minver" -a $gcc3minver -gt 3
+ then
+ echo "HAVE_GT_GCC_3_3=true" >> $config_mak
+ else
+ echo "HAVE_GT_GCC_3_3=false" >> $config_mak
+ fi
;;
x86_64)
echo "TARGET_ARCH=x86_64" >> $config_mak
OpenPOWER on IntegriCloud