From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:48143) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TdXUl-0006UB-Pu for qemu-devel@nongnu.org; Tue, 27 Nov 2012 21:35:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TdXUk-0004xm-Ce for qemu-devel@nongnu.org; Tue, 27 Nov 2012 21:35:27 -0500 Received: from e28smtp07.in.ibm.com ([122.248.162.7]:36594) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TdXUj-0004xg-Qo for qemu-devel@nongnu.org; Tue, 27 Nov 2012 21:35:26 -0500 Received: from /spool/local by e28smtp07.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 28 Nov 2012 08:05:22 +0530 Received: from d28av04.in.ibm.com (d28av04.in.ibm.com [9.184.220.66]) by d28relay02.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id qAS2ZIrS24838246 for ; Wed, 28 Nov 2012 08:05:18 +0530 Received: from d28av04.in.ibm.com (loopback [127.0.0.1]) by d28av04.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id qAS85920011124 for ; Wed, 28 Nov 2012 19:05:09 +1100 Message-ID: <50B57837.2000609@linux.vnet.ibm.com> Date: Wed, 28 Nov 2012 10:34:31 +0800 From: Wenchao Xia MIME-Version: 1.0 References: <1354033263-32748-1-git-send-email-pbonzini@redhat.com> <20121128020151.GA32688@cs.nctu.edu.tw> In-Reply-To: <20121128020151.GA32688@cs.nctu.edu.tw> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH v2 1.3] build: compile translate.o with -fno-gcse option List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?B?IumZs+mfi+S7uyAoV2VpLVJlbiBDaGVuKSI=?= Cc: Paolo Bonzini , kraxel@redhat.com, qemu-devel@nongnu.org, peter.maydell@linaro.org 于 2012-11-28 10:01, 陳韋任 (Wei-Ren Chen) 写道: > On Tue, Nov 27, 2012 at 05:21:03PM +0100, Paolo Bonzini wrote: >> Some versions of GCC require insane (>2GB) amounts of memory to compile >> translate.o. As a countermeasure, disable the culprit optimization pass. >> This should fix the buildbot failure for default_x86_64_fedora16. >> Anyway is a good thing to do because people will try to compile 1.3 with >> less than 2GB of memory and complain. >> >> Signed-off-by: Paolo Bonzini >> --- >> Makefile.target | 6 ++++++ >> 1 file changed, 6 insertions(+) >> >> diff --git a/Makefile.target b/Makefile.target >> index 8b658c0..d38bb58 100644 >> --- a/Makefile.target >> +++ b/Makefile.target >> @@ -143,6 +143,12 @@ GENERATED_HEADERS += hmp-commands.h qmp-commands-old.h >> >> endif # CONFIG_SOFTMMU >> >> +# Workaround for http://gcc.gnu.org/PR55489. Happens with -fPIE/-fPIC >> +# and large functions that use global variables. The bug is in all >> +# releases of GCC, but it became particularly acute in 4.7.x. We >> +# should be able to delete this at the end of 2013. >> +%/translate.o: QEMU_CFLAGS += -fno-gcse >> + >> nested-vars += obj-y >> >> # This resolves all nested paths, so it must come last > > No objection here. But will we remove this option when GCC fix this pr > or we just leave it there? If we're going to remove it in the future, > better keep a note on the release change log or somewhere else. > > Regards, > chenwj > +1, I think -fno-gcse is good enough to fix the problem quickly, and a note would be nice which remind people that translate.o was compiled with special flag now. If some one find it problem with special compiler, or some thing about performance, he can find the reason quickly. -- Best Regards Wenchao Xia