[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: -flto to become more of a routine - any change in opinion since 2011?



1. LTO object format is not stable and ABI-persistent: e.g., LTO
objects compiled with gcc 5.2 may not work when using gcc 5.3
(versions are just for example). Ref: gcc doc.
2. Slim LTO objects are usable only with GCC of same version (see
above). To provide wider support, you'll need to ship fat LTO objects.
3. LTO is usable in most cases, but not all. AFAIK, Linux kernel won't
build with LTO.

2016-03-29 23:53 GMT+03:00 Adam Borowski <kilobyte@angband.pl>:
> On Tue, Mar 29, 2016 at 10:27:20PM +0200, Jakub Wilk wrote:
>> * Steffen Möller <steffen_moeller@gmx.de>, 2016-03-29, 16:27:
>> >I admit to be a fan of link time optimisation and would like to see this
>> >challenge promoted towards more of a routine challenge to establish for
>> >our packages.
>>
>> gcc-5 manpage says: "Link-time optimization does not work well with
>> generation of debugging information. Combining -flto with -g is currently
>> experimental and expected to produce unexpected results."
>>
>> Um... Automatic debug packages or LTO, choose one?
>
> I just built a C package with LTO, installed -dbgsym and debugging seems to
> work fine, just as well as any optimized code.
>
> I guess this warning is mostly obsolete as in gcc-4.5 debugging LTO was
> indeed broken.  Or perhaps, there are some corner cases not yet fixed.
>
> --
> A tit a day keeps the vet away.
>



-- 
SY,
Konstantin Demin


Reply to: