[systemd-devel] [PATCH] build-sys: add configure option to disable LTO/gold

Lennart Poettering lennart at poettering.net
Wed Feb 18 11:34:46 PST 2015


On Wed, 18.02.15 16:25, Cristian Rodríguez (crrodriguez at opensuse.org) wrote:

> El 18/02/15 a las 15:58, Lennart Poettering escribió:
> >On Wed, 18.02.15 15:45, Cristian Rodríguez (crrodriguez at opensuse.org) wrote:
> >
> >>LTO may be unreliable, does not work properly in several archs
> >>It may crash or produce wrong code.
> >
> >Well, that's something to fix in the LTO code.
> >
> >>Compiler developers also said we should not provide production
> >>RPM packages with LTO enabled.
> >
> >We have been doing that for a number of releases on Fedora. Seems to
> >work fine.
> 
> Yes, it works in x86_64, except we need to produce working -debuginfo
> packages and LTO produces unusable debug infos..
> 
> Anyway,,currently this is not suitable for us at all. let me explain a
> bit...
> 
> Building systemd is affected by this GCC bug (not in fread but *poll)
> 
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61886
> 
> We can't just ignore the warnings like "warning: call to ‘__*_chk_warn’
> declared with attribute warning: poll called with fds buffer too small file
> nfds entries" why ? The openSUSE buildsystem considers this warnings as
> security holes and the package is automatically marked as failed and is
> automatically rejected for inclusion.

Maybe you should fix your build system then? This is brokeness in gcc,
that trips up your build system, and why do you think this should be
worked around in systemd? Fix it in gcc, or work-around it in your
build system, but we don't want such work-arounds in systemd upstream,
sorry.

> So we currently disable LTO with a patch, not as nice as the one I posted.

Well, why patch anything? You already have a configure option, just by
adding LDFLAGS= and CFLAGS= to the end of the configure line. What's
the point of having an explicit option for that?

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list