[Bug 265254] lang/gcc11: build gets stuck

From: <bugzilla-noreply_at_freebsd.org>
Date: Tue, 19 Jul 2022 15:11:43 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=265254

--- Comment #23 from Lorenzo Salvadore <salvadore@freebsd.org> ---
As it can be read in the bug Yuri has reported upstream, the bug is confirmed.
Now we should agree on a strategy to deal with it while we wait for an upstream
resolution.

Yuri suggested disabling LTO for lang/gcc11. It makes sense since there are
cases that stucks the buil. However, I don't see those cases so common. Until
now, Yuri is the only one who has noticed the issue (while LTO is quite new on
default gcc version on FreeBSD, it has already been around for a long time in
other systems, but it seems Yuri has reported the first bug upstream on the
topic), so I think the issue does not affect most of our users. Moreover, we
know it does not affect the official packages builders either.

I think we should choose between these three strategies (but more ideas are
welcome of course):

1 - Leave LTO enabled by default on all gcc ports having it.

2 - Disable LTO on all gcc ports having it.

3 - Leave LTO enabled on some ports and disable it on others. In that case, I
would suggest to leave it enabled on -devel ports and disable it on gcc11 and
gcc12.

Moreover I believe we should update pkg-help to inform about this bug for all
gcc ports where the LTO_BOOTSTRAP option exists: an additional warning is
always better.

Personally, I prefer strategy 3. I see the following advantages:

- gcc11 (default version) builds flawlessly;

- disabling LTO requires a PORTREVISION bump, but the gcc11 and gcc12 ports
with standard bootstrap (which I would enable by default instead of lto
bootstrap) are quick enough to compile;

- leaving LTO enabled on -devel ports allows us to monitor lto state, notice
bugs, fix them and then better understand when LTO is ready to be enabled on
the production ports.

Please let me know your thoughts about it.

-- 
You are receiving this mail because:
You are the assignee for the bug.