From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:43512) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TdlQN-0007Km-6P for qemu-devel@nongnu.org; Wed, 28 Nov 2012 12:27:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TdlQL-0003C8-Dw for qemu-devel@nongnu.org; Wed, 28 Nov 2012 12:27:51 -0500 Received: from cantor2.suse.de ([195.135.220.15]:58028 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TdlQL-00039b-3n for qemu-devel@nongnu.org; Wed, 28 Nov 2012 12:27:49 -0500 Message-ID: <50B64991.2020309@suse.de> Date: Wed, 28 Nov 2012 18:27:45 +0100 From: =?ISO-8859-15?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <1354092023-10897-1-git-send-email-pbonzini@redhat.com> In-Reply-To: <1354092023-10897-1-git-send-email-pbonzini@redhat.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v3 1.3] build: compile translate.o with -fno-gcse option on GCC 4.6.x and 4.7.[012] List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: peter.maydell@linaro.org, Bruce Rogers , qemu-devel@nongnu.org, kraxel@redhat.com Am 28.11.2012 09:40, schrieb Paolo Bonzini: > These versions of GCC require insane (>2GB) amounts of memory to compil= e > translate.o. As a countermeasure, disable the culprit optimization pas= s. > This should fix the buildbot failure for default_x86_64_fedora16. Anyw= ay > this is a good thing to do because people will try to compile 1.3 with > less than 2GB of memory and complain. >=20 > Signed-off-by: Paolo Bonzini Tested-by: Andreas F=E4rber > --- > Makefile.target | 3 +++ > configure | 16 ++++++++++++++++ > 2 files changed, 19 insertions(+) >=20 > diff --git a/Makefile.target b/Makefile.target > index 8b658c0..927347b 100644 > --- a/Makefile.target > +++ b/Makefile.target > @@ -143,6 +143,9 @@ GENERATED_HEADERS +=3D hmp-commands.h qmp-commands-= old.h > =20 > endif # CONFIG_SOFTMMU > =20 > +# Workaround for http://gcc.gnu.org/PR55489, see configure. > +%/translate.o: QEMU_CFLAGS +=3D $(TRANSLATE_OPT_CFLAGS) > + > nested-vars +=3D obj-y > =20 > # This resolves all nested paths, so it must come last > diff --git a/configure b/configure > index 780b19a..994f731 100755 > --- a/configure > +++ b/configure > @@ -1183,6 +1183,21 @@ for flag in $gcc_flags; do > fi > done > =20 > +# Workaround for http://gcc.gnu.org/PR55489. Happens with -fPIE/-fPIC= and > +# large functions that use global variables. The bug is in all releas= es of > +# GCC, but it became particularly acute in 4.6.x and 4.7.x. It is fix= ed in > +# 4.7.3 and 4.8.0. We should be able to delete this at the end of 201= 3. > +cat > $TMPC << EOF > +#if __GNUC__ =3D=3D 4 && (__GNUC_MINOR__ =3D=3D 6 || (__GNUC_MINOR__ =3D= =3D 7 && __GNUC_PATCHLEVEL__ <=3D 2)) FWIW this line looks overly long. > +int main(void) { return 0; } > +#else > +#error No bug in this compiler. Interesting logic. :) Andreas > +#endif > +EOF > +if compile_prog "-Werror -fno-gcse" "" ; then > + TRANSLATE_OPT_CFLAGS=3D-fno-gcse > +fi > + > if test "$static" =3D "yes" ; then > if test "$pie" =3D "yes" ; then > echo "static and pie are mutually incompatible" > @@ -3662,6 +3677,7 @@ echo "LIBS_TOOLS+=3D$libs_tools" >> $config_host_= mak > echo "EXESUF=3D$EXESUF" >> $config_host_mak > echo "LIBS_QGA+=3D$libs_qga" >> $config_host_mak > echo "POD2MAN=3D$POD2MAN" >> $config_host_mak > +echo "TRANSLATE_OPT_CFLAGS=3D$TRANSLATE_OPT_CFLAGS" >> $config_host_ma= k > =20 > # generate list of library paths for linker script > =20 >=20 --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrnbe= rg