1mn20 -> 1mn50: bug 1688820
1mn20 -> 3mn40: bug 1689933
3mn40 -> 24mn: bug 1674524
24mn -> 15mn: bug 1690967
15mn -> 19mn25: bug 1678119 (but with interestingly an intermediate regression to 40m with the last patch out of the picture)
19mn25 -> 24mn40: bug 1692731
I didn't go further to find where we got further up to 27mn30 on the current release branch.
gl.o as built by GCC 10 on the current release branch contains 9.7MB of code, vs. 2.7MB as built by clang, which sounds like an awful lot, even for clang.
About 60% of the CPU time is spent in the assembler. So not only does GCC take a lot of time (and memory, > 15GB!) generating a large amount of code, but gas also takes a large amount of time (and memory, > 6GB) processing that code into an object file.
g++ -S generates the assembly in 10 minutes, and the resulting file is 1.37GB!! Removing
-g brings that down to 5mn44 and 42.6MB.
Also worth noting that GCC 11 (gcc-11 (Debian 11-20210319-1) 11.0.1 20210319 (experimental) [master revision bd9b262fa92:73ac0472bc3:287e3e8466f44f9d395a2e4dcfcda56cc34ceb1c]), is even slower (cc1plus currently has used 85 minutes of CPU time, and it's still running).
It might be worth filing bugs against both GCC and binutils.