On 17/06/2022 11.12, Chris Lamb wrote:
> Hi Roland,
> 
>> would enabling LTO cause reproducible issues?
>> If I remember correctly, Bernhard mentioned some issues, which got 
>> 'solved' by using less parallel builds (-j1 or -j4?).
> 
> Good question. There was definitely at least one LTO-related issue in the
> past. Take, for instance, this bug report from 2015 about "FAT" LTO objects:
> 
>   https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66305
> 
> I don't know whether this is still valid and/or we would encounter it
> with Doko's proposal, however.

I think it can still be an issue.

We strip the unreproducible sections at the end of builds:
https://github.com/openSUSE/brp-check-suse/pull/29/files

The downside is that you don't get extra optimization when linking
external .a files, but such static linking is discouraged anyway for
maintainability.


The other thing we had to do was that we started to use -flto=auto
instead of -flto=$cpus
to avoid embedding this detail into debuginfo and such.

Ciao
Bernhard M.

Attachment: OpenPGP_signature
Description: OpenPGP digital signature

Reply via email to