Re: [Patch v2] Enable math functions linking with static library for LTO

2019-08-23 Thread Richard Biener
On Fri, Aug 23, 2019 at 3:40 AM luoxhu wrote: > > Hi Richard, > > On 2019/8/13 17:10, Richard Biener wrote: > > On Tue, Aug 13, 2019 at 4:22 AM luoxhu wrote: > >> > >> Hi Richard, > >> > >> On 2019/8/12 16:51, Richard Biener wrote: > >>> On Mon, Aug 12, 2019 at 8:50 AM luoxhu wrote: > >

Re: [Patch v2] Enable math functions linking with static library for LTO

2019-08-22 Thread luoxhu
Hi Richard, On 2019/8/13 17:10, Richard Biener wrote: On Tue, Aug 13, 2019 at 4:22 AM luoxhu wrote: Hi Richard, On 2019/8/12 16:51, Richard Biener wrote: On Mon, Aug 12, 2019 at 8:50 AM luoxhu wrote: Hi Richard, Thanks for your comments, updated the v2 patch as below: 1. Define and use

Re: [Patch v2] Enable math functions linking with static library for LTO

2019-08-13 Thread Richard Biener
On Tue, Aug 13, 2019 at 4:22 AM luoxhu wrote: > > Hi Richard, > > On 2019/8/12 16:51, Richard Biener wrote: > > On Mon, Aug 12, 2019 at 8:50 AM luoxhu wrote: > >> > >> Hi Richard, > >> Thanks for your comments, updated the v2 patch as below: > >> 1. Define and use builtin_with_linkage_p. > >> 2.

Re: [Patch v2] Enable math functions linking with static library for LTO

2019-08-12 Thread luoxhu
On 2019/8/13 10:22, luoxhu wrote: diff --git a/gcc/testsuite/gcc.dg/pr91287.c b/gcc/testsuite/gcc.dg/pr91287.c new file mode 100644 index 000..c816e0537aa --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr91287.c @@ -0,0 +1,40 @@ +/* { dg-do assemble } */ +/* { dg-options "-O2" } */ You

Re: [Patch v2] Enable math functions linking with static library for LTO

2019-08-12 Thread luoxhu
Hi Richard, On 2019/8/12 16:51, Richard Biener wrote: On Mon, Aug 12, 2019 at 8:50 AM luoxhu wrote: Hi Richard, Thanks for your comments, updated the v2 patch as below: 1. Define and use builtin_with_linkage_p. 2. Add comments. 3. Add a testcase. In LTO mode, if static library and dynamic

Re: [Patch v2] Enable math functions linking with static library for LTO

2019-08-12 Thread Richard Biener
On Mon, Aug 12, 2019 at 8:50 AM luoxhu wrote: > > Hi Richard, > Thanks for your comments, updated the v2 patch as below: > 1. Define and use builtin_with_linkage_p. > 2. Add comments. > 3. Add a testcase. > > In LTO mode, if static library and dynamic library contains same > function and both

[Patch v2] Enable math functions linking with static library for LTO

2019-08-12 Thread luoxhu
Hi Richard, Thanks for your comments, updated the v2 patch as below: 1. Define and use builtin_with_linkage_p. 2. Add comments. 3. Add a testcase. In LTO mode, if static library and dynamic library contains same function and both libraries are passed as arguments, linker will link the function in