LTO and ABI compatibility

2022-07-19 Thread Ian Jackson
I have just received Bug#1015348 reporting that adns doesn't work with LTO (link-time optimisation). How does LTO work with ABI compatibility, which we rely on very heavily ? Eg, my reading of the spec is as follows: if I add members to an enum in a new library version, making a combined program

Re: LTO and ABI compatibility

2022-07-22 Thread Hideki Yamane
On Tue, 19 Jul 2022 18:24:07 +0100 Ian Jackson wrote: > Frannkly, I think enabling LTO by default is a mistake. The > performance benefits are not likely to be worth the bugs silently > introduced across our codebase. Fedora, openSUSE, and Ubuntu did LTO by default, and I've not heard about an

Re: LTO and ABI compatibility

2022-07-22 Thread Seth Arnold
On Fri, Jul 22, 2022 at 03:30:16PM +0200, Hideki Yamane wrote: > Fedora, openSUSE, and Ubuntu did LTO by default, and I've not heard about > any wrong. Is the situation in Debian differ from theirs? Not everything works with LTO right away: debugging build problems or runtime problems takes effo

Re: LTO and ABI compatibility

2022-07-22 Thread Jérémy Lal
Le sam. 23 juil. 2022 à 02:45, Seth Arnold a écrit : > On Fri, Jul 22, 2022 at 03:30:16PM +0200, Hideki Yamane wrote: > > Fedora, openSUSE, and Ubuntu did LTO by default, and I've not heard > about > > any wrong. Is the situation in Debian differ from theirs? > > Not everything works with LTO r

Re: LTO and ABI compatibility

2022-07-23 Thread Hideki Yamane
On Sat, 23 Jul 2022 00:37:37 + Seth Arnold wrote: > Debian supports more architectures than Ubuntu or Fedora or OpenSUSE; this > might mean there's costs unique to Debian. How about applying it to only amd64 and arm64 first, then expanding to other archs? It is an efficient way, IMO. --

Re: LTO and ABI compatibility

2022-07-25 Thread Simon Richter
Hi Ian, On 7/19/22 19:24, Ian Jackson wrote: How does LTO work with ABI compatibility, which we rely on very heavily ? Symbols that are visible to the dynamic linker or that have their address taken are hard borders for optimization, even in non-LTO builds. For example, int a() { retu