On 4/15/19 12:23 PM, Richard Biener wrote:
> On Mon, Apr 15, 2019 at 9:46 AM Martin Liška <mli...@suse.cz> wrote:
>>
>> Hi.
>>
>> The patch is fixing bootstrap-lto-lean.mk where with PGO LTO was
>> wrongly used in STAGEtrain.
>>
>> Tested on openSUSE gcc9 package, I'm attaching build log.
>>
>> Ready to be installed?
> 
> I wonder why 'override' is necessary given before we include the build-config
> .mk fragment we do
> 
> STAGEtrain_CFLAGS = $(filter-out -fchecking=1,$(STAGE3_CFLAGS))
> 
> I suppose you checked w/o override and it didn't work?  Or ist the issue
> that you have to use := here to get the previous addition to STAGE3_CFLAGS
> resolved?

Fails due to:
[   16s] + setarch x86_64 -R make profiledbootstrap 'STAGE1_CFLAGS=-g -O2' 
'BOOT_CFLAGS=-O2 -D_FORTIFY_SOURCE=2 -funwind-tables 
-fasynchronous-unwind-tables -fstack-clash-protection -g -U_FORTIFY_SOURCE' 
-j160
[   16s] ../config/bootstrap-lto-lean.mk:5: *** Recursive variable 
'STAGEtrain_CFLAGS' references itself (eventually).  Stop.

> 
> A make expert might want to chime in here.
> 
> Maybe a simpler solution is to do
> 
> STAGEtrain_CFLAGS := $(filter-out -fchecking=1,$(STAGE3_CFLAGS))

This one will work of course. I would wait for some time and we can eventually
take this change.

Martin

> 
> instead of the '=' assignment in the toplevel Makefile to not cause
> build-config fragments changing the values of derived flags?
> (if, then consistently for all, of course).
> 
> Richard.
> 
>> Thanks,
>> Martin
>>
>> config/ChangeLog:
>>
>> 2019-04-15  Martin Liska  <mli...@suse.cz>
>>
>>         * bootstrap-lto-lean.mk: Filter out -flto in STAGEtrain_CFLAGS.
>> ---
>>  config/bootstrap-lto-lean.mk | 1 +
>>  1 file changed, 1 insertion(+)
>>
>>

Reply via email to