Thank you Bruce for the comment.  The original patch set did not manage
to get to the dev list (I've sent it from my Marvell account and it
stuck at moderation).  So I'll take your "indent" comment and will send
another version which will hopefully get through.

On 10/21/19 2:59 PM, Bruce Richardson wrote:
[...]
>> diff --git a/config/meson.build b/config/meson.build
>> index 2bafea530..97bbc323b 100644
>> --- a/config/meson.build
>> +++ b/config/meson.build
>> @@ -196,3 +196,18 @@ add_project_arguments('-D_GNU_SOURCE', language: 'c')
>>  if is_freebsd
>>      add_project_arguments('-D__BSD_VISIBLE', language: 'c')
>>  endif
>> +
>> +if get_option('b_lto')
>> +    if cc.has_argument('-ffat-lto-objects')
>> +            add_project_arguments('-ffat-lto-objects', language: 'c')
>> +    else
>> +            error('compiler does not support fat LTO objects - please turn 
>> LTO off')
>> +    endif
>> +    if cc.get_id() == 'gcc'
>> +            # workaround for bug 81440
>> +            if cc.version().version_compare('<8.0')
>> +                    add_project_arguments('-Wno-lto-type-mismatch', 
>> language: 'c')
>> +                    add_project_link_arguments('-Wno-lto-type-mismatch', 
>> language: 'c')
>> +            endif
>> +    endif
>> +endif
> 
> Just wondering on this what would be the impact with blindly disabling this
> warning? Would we miss any common issues accidentally?

This warning is for the cases where declarations (of e.g. global
variable) have different types in different compilation units - these
type of things can only be caught with LTO.  I don't think we need be
worrying about that in DPDK - the problem is a bug in gcc that produces
these warnings for the case of structs with flexible arrays at the end
(which are fairly common in DPDK).

> If we keep the current conditional code, suggest we merge the two checks
> for gcc and gcc version together into one if statement so we can reduce
> indentation level by one.

Agree.  Will send another version - which hopefully will get through to
the dev list.

Regards
Andrzej

Reply via email to