Re: GMP test fails with -flto

2019-07-02 Thread Martin Liška
On 7/1/19 6:38 PM, Richard Biener wrote: > On Mon, Jul 1, 2019 at 5:27 PM Vincent Lefevre wrote: >> >> On 2019-07-01 16:59:06 +0200, Marc Glisse wrote: >>> On Mon, 1 Jul 2019, Vincent Lefevre wrote: I suggest another solution: First try like now. If the format is unknown, check whet

Re: GMP test fails with -flto

2019-07-02 Thread Torbjörn Granlund
Richard Biener writes: On Mon, Jul 1, 2019 at 11:13 PM Torbjörn Granlund wrote: > > Vincent Lefevre writes: > > Yes, with LTO, the object file does not contain the structure as is. > Thus the detection from "od -b conftest.$OBJEXT" does not work. > > That could be solved by

Re: GMP test fails with -flto

2019-07-02 Thread Richard Biener
On Mon, Jul 1, 2019 at 11:13 PM Torbjörn Granlund wrote: > > Vincent Lefevre writes: > > Yes, with LTO, the object file does not contain the structure as is. > Thus the detection from "od -b conftest.$OBJEXT" does not work. > > That could be solved by generating a final executable, right? Ye

Re: GMP test fails with -flto

2019-07-02 Thread Richard Biener
On Tue, Jul 2, 2019 at 12:41 PM Torbjörn Granlund wrote: > > Richard Biener writes: > > On Mon, Jul 1, 2019 at 11:13 PM Torbjörn Granlund wrote: > > > > Vincent Lefevre writes: > > > > Yes, with LTO, the object file does not contain the structure as is. > > Thus the detection fr

Re: GMP test fails with -flto

2019-07-02 Thread Torbjörn Granlund
Richard Biener writes: Yes, this should work. It probably has a slightly higher chance of mismatching the start/end patterns elsewhere in the file, but well... Thanks for checking my proposed patch! Yes, I realise that we could get unlucky now, something which really shouldn't happen with

Re: GMP test fails with -flto

2019-07-02 Thread Marc Glisse
On Tue, 2 Jul 2019, Torbjörn Granlund wrote: The main funcion is needed as we create an executable, its references to foo are needed, else LTO will remove foo altogether. *** /tmp/extdiff.MsIr0g/gmp-main.3300fbb5d615/acinclude.m4 Mon Jun 17 00:11:50 2019 --- /home/tege/prec/gmp-main/acinc