qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Gerd Hoffmann <kraxel@redhat.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 1.3] build: compile translate.o at -O1 optimization
Date: Tue, 27 Nov 2012 15:10:32 +0100	[thread overview]
Message-ID: <50B4C9D8.6080403@redhat.com> (raw)
In-Reply-To: <CAFEAcA_4bY=24Zu9RsLpeBdV5jX=zZedHu+B8bqrrjaUR-tzjw@mail.gmail.com>

Il 27/11/2012 14:46, Peter Maydell ha scritto:
> On 27 November 2012 13:45, Gerd Hoffmann <kraxel@redhat.com> wrote:
>> On 11/27/12 14:24, Peter Maydell wrote:
>>> This is a well known bug in old gcc (ie fixed in 4.5, 4.6 and
>>> trunk a year ago). Use a newer gcc, or a 64 bit build system
>>> with a reasonable amount of RAM, or as a workaround apply some
>>> suitable compiler flags by passing configure
>>> '--extra-cflags=-fno-var-tracking'. This patch definitely
>>> shouldn't be applied as we shouldn't be hampering the majority
>>> for the benefit of old broken systems.
>>
>> It isn't that simple.  It's Fedora 17 with gcc 4.7.2 which runs oom
>> while compiling translate.c
> 
> In that case it is a new (or regressed) gcc bug and we should be
> pursuing it with the upstream gcc folk. We still shouldn't be
> putting random workarounds in our configure script.

Sure we should, but we're also one week from release.  Pretty sure a lot
of people will compile QEMU on a machine with <2GB and fail; the choice
is between documenting the problem and workaround in the release
information, or doing it for everyone in the Makefile.

Unfortunately, this one is not fixed by settling for worse debug
information, and it happens with GCC 4.7.2 (latest stable).  It is fixed
in GCC trunk, but it is also possible that it is just latent because I
found that several GCC switches fix it:

* -fPIE is what causes it.  Removing it obviously fixes it, but I'm not
sure it is a good idea (does it break linux-user self-virtualization?)

* -fno-gcse turns off the pass that explodes, and fixes it

* -fno-tree-pre turns off a similar but unrelated pass, but also fixes
it (found by chance because I confused it with -fno-gcse :)).

I think -fno-gcse is a valid workaround, and better than this patch.

Paolo

  reply	other threads:[~2012-11-27 14:11 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-27  8:34 [Qemu-devel] [PATCH 1.3] build: compile translate.o at -O1 optimization Paolo Bonzini
2012-11-27 13:24 ` Peter Maydell
2012-11-27 13:45   ` Gerd Hoffmann
2012-11-27 13:46     ` Peter Maydell
2012-11-27 14:10       ` Paolo Bonzini [this message]
2012-11-27 13:49     ` 陳韋任 (Wei-Ren Chen)
2012-11-27 15:05       ` Paolo Bonzini
2012-11-27 16:24       ` Andreas Färber
2012-11-27 15:53 ` Avi Kivity
2012-11-27 16:02   ` Paolo Bonzini
2012-11-27 16:49   ` Markus Armbruster
2012-11-27 16:55     ` Paolo Bonzini
  -- strict thread matches above, loose matches on Subject: below --
2012-11-27  8:36 Paolo Bonzini
2012-11-27  9:27 ` Wenchao Xia
2012-11-27  9:37   ` Paolo Bonzini
2012-11-27 12:09     ` Gerd Hoffmann

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=50B4C9D8.6080403@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=peter.maydell@linaro.org \
    --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).