On Wed, 2021-05-12 at 16:04 -0700, Khem Raj wrote:
> On Wed, May 12, 2021 at 2:32 PM Richard Purdie
> <[email protected]> wrote:
> > 
> > lto tends to break reproducibility and makes ovmf near impossible to debug
> > reproducibility issues in. Disable it and supress the warnings that then
> > generates from Werror.
> > 
> > Signed-off-by: Richard Purdie <[email protected]>
> > ---
> >  meta/recipes-core/ovmf/ovmf_git.bb | 9 ++++++++-
> >  1 file changed, 8 insertions(+), 1 deletion(-)
> > 
> > diff --git a/meta/recipes-core/ovmf/ovmf_git.bb 
> > b/meta/recipes-core/ovmf/ovmf_git.bb
> > index 1fe01146d6b..ef5545bf705 100644
> > --- a/meta/recipes-core/ovmf/ovmf_git.bb
> > +++ b/meta/recipes-core/ovmf/ovmf_git.bb
> > @@ -102,15 +102,22 @@ fix_toolchain_append_class-native() {
> >      # to make ovmf-native reusable across distros.
> >      sed -i \
> >          -e 's#^\(DEFINE GCC.*DLINK.*FLAGS  *=\)#\1 -fuse-ld=bfd#' \
> > +        -e 's#-flto#-fno-lto#g' \
> > +        -e 's#-DUSING_LTO##g' \
> >          ${S}/BaseTools/Conf/tools_def.template
> >  }
> > 
> > +# We disable lto above since the results are not reproducible and make it 
> > hard to compare
> > +# binary build aretfacts to debug reproducibility problems.
> > +# Surprisingly, if you disable lto, you see compiler warnings which are 
> > fatal. We therefore
> > +# have to hack warnings overrides into GCC_PREFIX_MAP to allow it to build.
> > +
> 
> could lto piece be turned into a packageconfig,as I think LTO usage
> will only grow in coming future
> some distros may prefer LTO over reproducibility for performance reasons.

If someone wants to do it, sure. I've had enough problems with this horrid 
build 
system already today. You don't want to know how many hours the reproducibility 
fixes have taken :(.

Cheers,

Richard

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#151691): 
https://lists.openembedded.org/g/openembedded-core/message/151691
Mute This Topic: https://lists.openembedded.org/mt/82784424/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to