Re: [PATCH v2 3/6] configure: add option to enable LTO

2020-10-29 Thread Paolo Bonzini
On 28/10/20 19:22, Daniele Buono wrote: > If LTO is enabled with the wrong linker/ar: > - with the checks, it will exit at configure with an error. I can change > this in a warning and disabling LTO if preferred. > - without the checks compilation will fail > > If LTO is enabled with the wrong com

Re: [PATCH v2 3/6] configure: add option to enable LTO

2020-10-28 Thread Daniele Buono
On 10/28/2020 5:35 AM, Alex Bennée wrote: Breakage in both system and linux-user emulation probably points at something in the instruction decode being broken. Shame we don't have a working risu setup for sparc64 to give the instruction handling a proper work out. This is what I'm thinking too.

Re: [PATCH v2 3/6] configure: add option to enable LTO

2020-10-28 Thread Daniele Buono
If LTO is enabled with the wrong linker/ar: - with the checks, it will exit at configure with an error. I can change this in a warning and disabling LTO if preferred. - without the checks compilation will fail If LTO is enabled with the wrong compiler (e.g. old gcc), you may get a bunch of war

Re: [PATCH v2 3/6] configure: add option to enable LTO

2020-10-28 Thread Alex Bennée
Daniele Buono writes: > In terms of ar and linker, if you don't have the right mix it will just > stop at link time with an error. > > In terms of using gcc the errors may be a bit more subtle, similar to > what Daniel mentioned. Succesfully compiling but then showing issues at > runtime or in

Re: [PATCH v2 3/6] configure: add option to enable LTO

2020-10-27 Thread Paolo Bonzini
On 27/10/20 21:42, Daniele Buono wrote: > Ok, no problem. I can definitely disable the check on GCC. > > Paolo, would you like me to disable checks on AR/linker for lto too? > If so, should I add some of this information on a document, perhaps > docs/devel/lto.rst, so it is written somewhere for f

Re: [PATCH v2 3/6] configure: add option to enable LTO

2020-10-27 Thread Daniele Buono
Ok, no problem. I can definitely disable the check on GCC. Paolo, would you like me to disable checks on AR/linker for lto too? If so, should I add some of this information on a document, perhaps docs/devel/lto.rst, so it is written somewhere for future uses? -- Btw, using lto with gcc I found

Re: [PATCH v2 3/6] configure: add option to enable LTO

2020-10-27 Thread Daniele Buono
In terms of ar and linker, if you don't have the right mix it will just stop at link time with an error. In terms of using gcc the errors may be a bit more subtle, similar to what Daniel mentioned. Succesfully compiling but then showing issues at runtime or in the test suite. I'm using ubuntu 18

Re: [PATCH v2 3/6] configure: add option to enable LTO

2020-10-27 Thread Daniel P . Berrangé
On Tue, Oct 27, 2020 at 10:57:14AM -0400, Daniele Buono wrote: > In terms of ar and linker, if you don't have the right mix it will just > stop at link time with an error. > > In terms of using gcc the errors may be a bit more subtle, similar to > what Daniel mentioned. Succesfully compiling but t

Re: [PATCH v2 3/6] configure: add option to enable LTO

2020-10-26 Thread Daniel P . Berrangé
On Mon, Oct 26, 2020 at 10:51:43AM +0100, Paolo Bonzini wrote: > On 23/10/20 22:06, Daniele Buono wrote: > > This patch allows to compile QEMU with link-time optimization (LTO). > > Compilation with LTO is handled directly by meson. This patch adds checks > > in configure to make sure the toolchain

Re: [PATCH v2 3/6] configure: add option to enable LTO

2020-10-26 Thread Paolo Bonzini
On 23/10/20 22:06, Daniele Buono wrote: > This patch allows to compile QEMU with link-time optimization (LTO). > Compilation with LTO is handled directly by meson. This patch adds checks > in configure to make sure the toolchain supports LTO. > > Currently, allow LTO only with clang, since I have

[PATCH v2 3/6] configure: add option to enable LTO

2020-10-23 Thread Daniele Buono
This patch allows to compile QEMU with link-time optimization (LTO). Compilation with LTO is handled directly by meson. This patch adds checks in configure to make sure the toolchain supports LTO. Currently, allow LTO only with clang, since I have found a couple of issues with gcc-based LTO. In c