https://sourceware.org/bugzilla/show_bug.cgi?id=24498

--- Comment #13 from Mark Wielaard <mark at klomp dot org> ---
(In reply to Martin Liška from comment #11)
> (In reply to kloczek from comment #10)
> > > I would add a configure option --enable-lto that will append -flto to 
> > > {C,LD}FLAGS.
> > 
> > Please don't do that.
> > 
> > LTO can be driven using only env variable.
> > 
> > % CFLAGS="<clto_cflags>" LDFLAGS="<lto_ldflags>" ./configure
> 
> Works for me.

Sorry, but what are the clto_cflags and lto_ldflags precisely?
And we now (also) have some c++ code for the debuginfod server, which I assume
needs some CXXFLAGS too?

> > Please use KISS principle and do not implement something which can be
> > already done other way *without* touching existing code.
> > 
> > PS. Changing {C,LD}FLAGS is not only part of using LTO. You need to pass NM,
> > RANLIB and AR env variables.
> 
> Not necessarily. Typical Linux systems, like openSUSE, utilize auto-loading
> mechanism of LTO plugins:

On Fedora32 that doesn't seem to work with:

$ CFLAGS="-O2 -g -flto" CXXFLAGS="-O2 -g -flto" LDFLAGS="-flto" ./configure
--enable-maintainer-mode
$ make
[...]
ar: elf_version.o: plugin needed to handle lto object
ranlib libelf.a
ranlib: libelf.a(elf_version.o): plugin needed to handle lto object

Am I using the wrong flags?
Or are the default ar and ranlib tools not build with the correct flags?

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Reply via email to