From: "Ben Taylor" <bentaylor.solx86@gmail.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] Qemu 32-bit i386, gcc >= 3.4 spill error fix
Date: Sun, 4 May 2008 17:41:25 -0400 [thread overview]
Message-ID: <cef699d70805041441i78ff3d06s989791f739ecf7ca@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 338 bytes --]
This patch applies some additional flags to op.c and helper.c
for compiling on i386 32-bit systems with gcc >= 3.4.
This has been tested on both ubuntu 7.10/32-bit and
Solaris SXCE/32-bit with both gcc-3.3 and gcc-3.4
and the behavior is consistent between both.
This is just a short term fix til the SSE ops are converted
to TCG.
Ben
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: qemu-gcc-3.4-spill-error.patch --]
[-- Type: text/x-patch; name=qemu-gcc-3.4-spill-error.patch, Size: 1482 bytes --]
diff -r qemu.ORIG/configure qemu/configure
1201a1202,1208
> 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
diff -r qemu.ORIG/Makefile.target qemu/Makefile.target
98a99,104
> # OP_CFLAGS needs 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)
> MTUNE_CFLAGS=-march=i486 -mtune=i686
> endif
312c318
< $(CC) $(OP_CFLAGS) $(CPPFLAGS) -c -o $@ $<
---
> $(CC) $(OP_CFLAGS) $(CPPFLAGS) $(MTUNE_CFLAGS) -c -o $@ $<
319a326,339
> # if current host is i386 and gcc >= -3.4, CFLAGS requires some
> # handling as helper.c generates a compiler spill error if
> # -march=i686 and -mtune=i686. We set
> # MTUNE_CFLAGS="-march=i486 -mtune=i686" here
> # Once SSE ops are converted to TCG, this can go away
> HCFLAGS=$(CFLAGS)
> ifeq ($(ARCH), i386)
> ifeq ($(HAVE_GT_GCC_3_3), true)
> # if CFLAGS has -march=i686, remove it so helper.o
> # can compile on 32-bit intel systems
> HCFLAGS=`echo $(CFLAGS) | sed 's,-march=i686,,'`
> endif
> endif
>
322c342
< $(CC) $(HELPER_CFLAGS) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
---
> $(CC) $(HELPER_CFLAGS) $(CPPFLAGS) $(MTUNE_CFLAGS) $(HCFLAGS) -c -o $@ $<
next reply other threads:[~2008-05-04 21:41 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-04 21:41 Ben Taylor [this message]
2008-05-05 1:13 ` [Qemu-devel] Re: Qemu 32-bit i386, gcc >= 3.4 spill error fix Ben Taylor
2008-05-05 3:56 ` Aurelien Jarno
2008-05-05 5:17 ` Ben Taylor
2008-05-05 11:32 ` [Qemu-devel] " Paul Brook
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cef699d70805041441i78ff3d06s989791f739ecf7ca@mail.gmail.com \
--to=bentaylor.solx86@gmail.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).