Re: [PATCH libaio v2 03/10] Use new symver function attribute to support LTO builds

Guillem Jover <[email protected]>
Newsgroups gmane.linux.kernel.aio.general
Message-ID <[email protected]>
Hi!

On Tue, 2024-06-11 at 18:42:46 -0400, Jeff Moyer wrote:
> Guillem Jover <[email protected]> writes:
> > From: Guillem Jover <[email protected]>
> >
> > The LTO support cannot work properly when there are versioned symbols
> > via asm statements, as those are not seen by the compiler. Use the new
> > function attributes if supported instead of the asm statements.
> >
> > We need to move the SYMVER calls after the function definitions
> > otherwise it will reference symbols not yet seen.
> >
> 
> There is likely to be very little benefit from LTO for this library.
> What's the motivation for this patch?

I got a report from Ubuntu where they had enabled LTO by default in
their toolchain, and while I agree that LTO is unlikely to optimize
anything here, instead of disabling it as they proposed, it seemed
better to make the library build correctly with it, so that if other
people try to build it from upstream with such toolchains it would
build cleanly.

Thanks,
Guillem

--
To unsubscribe, send a message with 'unsubscribe linux-aio' in
the body to [email protected].  For more info on Linux AIO,
see: http://www.kvack.org/aio/
Don't email: <a href=mailto:"[email protected]">[email protected]</a>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.