Subject: Re: bug#69689: 30.0.50; cannot native compile with -flto in native-comp-compiler-options

From: Eli Zaretskii <[email-masked]>
Date: Mon, 11 Mar 2024 15:38:35 +0200

> Date: Sun, 10 Mar 2024 14:08:48 -0700
> Cc: [email-masked]
> From: Paul Eggert <[email-masked]>
> 
> On 2024-03-10 10:32, StrawberryTea wrote:
> > Well, I wanted to ask here because I wanted to check if anyone else is
> > able to compile elisp files with -flto in native-comp-compiler-options.
> > I believe that the error is related to the native-comp branch, as a
> > Gentoo developer
> 
> Google searches suggest that "plugin needed to handle lto object" is an 
> issue that arises in Gentoo builds of other projects. The basic issue is 
> that if you're going to build everything from scratch, you must build 
> the infrastructure correctly first, and that can include linker plugins. 
> Sorry I can't help more, as I don't use Gentoo.

So I think this report should be sent to Gentoo, not to us.

> On 2024-03-09 22:24, Eli Zaretskii wrote:
>  > Paul, does Emacs even support -flto builds?
> 
> Yes, with './configure --enable-link-time-optimization'.

configure.ac says "experimental", so I guess it's not yet reliable
enough?

It also uses the getconf command (to figure out the number of CPU
cores?), which AFAIK is for glibc-only systems, right?

In any case, the OP didn't say whether he used this configure-time
option.