qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 1.3] build: compile translate.o at -O1 optimizat


From: Markus Armbruster
Subject: Re: [Qemu-devel] [PATCH 1.3] build: compile translate.o at -O1 optimization
Date: Tue, 27 Nov 2012 17:49:59 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux)

Avi Kivity <address@hidden> writes:

> On 11/27/2012 10:34 AM, Paolo Bonzini wrote:
>> Some versions of GCC require insane (>2GB) amounts of memory
>> to compile translate.o.  As a countermeasure, compile it
>> with -O1.  This should fix the buildbot failure for
>> default_x86_64_fedora16.
>> 
>> Signed-off-by: Paolo Bonzini <address@hidden>
>> ---
>>  Makefile.target | 2 ++
>>  1 file changed, 2 insertions(+)
>> 
>> diff --git a/Makefile.target b/Makefile.target
>> index 8b658c0..3981931 100644
>> --- a/Makefile.target
>> +++ b/Makefile.target
>> @@ -143,6 +143,8 @@ GENERATED_HEADERS += hmp-commands.h qmp-commands-old.h
>>  
>>  endif # CONFIG_SOFTMMU
>>  
>> +%/translate.o: CFLAGS := $(patsubst -O2,-O1,$(CFLAGS))
>> +
>
> This may change some string argument in CFLAGS, for example an argument
> to -I.
>
> How about:
>
>   CFLAGS_opt = -O2
>   CFLAGS += $(CFLAGS_opt)
>   ...
>   %/translate.o: CFLAGS_opt = -O1

Just append -O1 to CFLAGS; the last -O wins.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]