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

2019-08-22 Thread Richard Biener
On August 22, 2019 2:36:47 PM GMT+02:00, Joseph Myers wrote: >On Thu, 22 Aug 2019, Richard Biener wrote: > >> Not sure if that helps answering your question. In essence, >> this function should tell whether we would emit an UNDEF >> in the end and we want to know that early, at LTO IL generation

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

2019-08-22 Thread Joseph Myers
On Thu, 22 Aug 2019, Richard Biener wrote: > Not sure if that helps answering your question. In essence, > this function should tell whether we would emit an UNDEF > in the end and we want to know that early, at LTO IL generation > time to communicate this to the linker plugin. Given previous T

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

2019-08-22 Thread Richard Biener
On Wed, Aug 21, 2019 at 9:56 PM Joseph Myers wrote: > > I'm afraid I'm not clear on the semantics of builtin_with_linkage_p (as in > the current checked-in version). It says: > > /* Return true if the builtin DECL is implemented in a standard library. >Otherwise returns false which doesn't gu

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

2019-08-21 Thread Joseph Myers
I'm afraid I'm not clear on the semantics of builtin_with_linkage_p (as in the current checked-in version). It says: /* Return true if the builtin DECL is implemented in a standard library. Otherwise returns false which doesn't guarantee it is not (thus the list of handled builtins below m

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

2019-08-09 Thread Richard Biener
On Fri, Aug 9, 2019 at 10:13 AM Xiong Hu Luo wrote: > > 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 dynamic library no matter the sequence. This patch > will output LTO symbol node as UN

[RFC] Enable math functions linking with static library for LTO

2019-08-09 Thread Xiong Hu Luo
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 dynamic library no matter the sequence. This patch will output LTO symbol node as UNDEF if BUILT_IN_NORMAL function FNDECL is a math function, then