[Bug 261977] lang/gcc12-devel: enable LTO
- In reply to: bugzilla-noreply_a_freebsd.org: "[Bug 261977] lang/gcc12-devel: enable LTO"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 19 Apr 2022 17:06:43 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=261977 --- Comment #23 from Matthias Andree <mandree@FreeBSD.org> --- Re compiler bootstrapping with LTO, it is pointless per se because you build the first compiler stage with whatever is on the system (which is pretty reasonable on FreeBSD), then you build the second compiler stage, i. e. the full compiler with the stage-1-compiler, and in the third stage, you build the SAME THING again with the stage-2-compiler and compare stage 2 to stage 3, i. e. check if the self-compiled compiler is the same. If it weren't for a comparison, we would not need LTO in stages one and two because they are disposed of, and only the compiler built in stage 3 will be used. And in essence, stage 3 is all you build if you build the compiler as a cross-compiler without full bootstrap (you knew that already). So if our base compilers are good enough, let's just build all GCC as cross, or at least all Tier-1 and Tier-2. And my builder runs up to(*) 16 Zen threads (AMD Ryzen 7 1700, 8 cores w/ 2 threads each), but I usually need to take that down to 4-ish or so because else this deadlocks pretty soon with the 12 or how many GBytes of RAM I pass to it. FreeBSD 13.0, ZFS-based poudriere, no swap. -- You are receiving this mail because: You are on the CC list for the bug.