Bug 60852 - LTO is always enabled
Summary: LTO is always enabled
Status: RESOLVED FIXED
Alias: None
Product: cairo
Classification: Unclassified
Component: general (show other bugs)
Version: 1.12.14
Hardware: Other All
: medium normal
Assignee: Chris Wilson
QA Contact: cairo-bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: cairo-1.14
  Show dependency treegraph
 
Reported: 2013-02-14 17:25 UTC by JS
Modified: 2014-07-10 23:25 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description JS 2013-02-14 17:25:21 UTC
Cairo always uses LTO, when it detects compiler support.
LTO is buggy in many/all versions of GCC and shouldn't be enabled by default.
Comment 1 David Heidelberg (okias) 2014-05-18 01:23:33 UTC
Cairo 1.12.16 is out, gcc 4.8.2 and 4.9. Is this still issue?
Comment 2 JS 2014-06-18 15:59:18 UTC
It seems to work fine. Compilation would probably fail if Cairo would be affected by GCC bug.
Comment 3 Bryce Harrington 2014-07-08 21:25:56 UTC
A number of distros ship cairo with patches to disable lto, so presumably this issue is still relevant.

Gentoo includes a patch that adds a --disable-lto option.  We should pull that upstream to give everyone a consistent way to work around this.
Comment 4 Bryce Harrington 2014-07-10 23:25:43 UTC
commit 67a846b14b647f139e00b6c306f30b8dd155efd0
Author: Bryce Harrington <b.harrington@samsung.com>
Date:   Tue Jul 8 13:14:20 2014 -0700

    configure.ac: Add a --disable-lto configure option

    Link-Time Optimization seems to be stable enough with gcc 4.8 and 4.9,
    but has proven to be an issue in the past for many cairo users (webkit,
    efl, ubuntu, opensuse, gentoo, arch...) who carry patches to disable it.

    Gentoo's patch[1] adds a --disable-lto option to leave it enabled by
    default but give users the ability to work around lto related build
    problems (c.f. fdo #77060).  Patch appears to have been authored by
    Alexandre Rostovtsev[2].

    1: sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/x11-libs/cairo/files/cairo-1.12.16-lto-optional.patch
    2: https://bugs.gentoo.org/show_bug.cgi?id=509552

    Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=60852
    Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
    Reviewed-by: Uli Schlachter <psychon@znc.in>


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.