News: 0001639527

  ARM Give a man a fire and he's warm for a day, but set fire to him and he's warm for the rest of his life (Terry Pratchett, Jingo)

NVIDIA Engineer Devises Patch To Significantly Reduce GCC Bootstrap Time

([GNU] 2 Hours Ago Faster GCC Builds)


NVIDIA engineer Kyrylo Tkachov posted a patch for testing yesterday to significantly reduce the amount of time it takes the GNU Compiler Collection (GCC) for conducting a native bootstrap. The time spent in the configure process for native GCC builds is reduced by around 43% while the overall bootstrap wall time is lowered by around 15%.

Performing a GCC bootstrap ends up running Autoconf configure during each of GCC's three build stages. But with the configure scripts executed serially and being quite time consuming in the case of the GCC compiler with its large codebase, it ends up being a significant amount of time spent.

The proposed patch is to cache the configure results so that they can be used across the three compiler stages of GCC, thereby avoiding a lot of time spent in the serial script execution. In the case of native bootstraps rather than cross-compiling, the configure scripts shouldn't change.

[1]

On an unnamed "large multi-core AArch64 machine" that is more than likely NVIDIA Vera, Kyrylo Tkachov noted that around 30% of the wall time spent during the compiler bootstrap is spent running configure scripts and is bound at under 15% machine utilization for nearly half the build process.

The end result with the initial patches:

"This roughly halves the time spent in configure (about a 43% reduction) and cuts the overall bootstrap wall time by about 15%, with no change in the generated configuration: the produced config headers are identical to a non-cached build and the stage 2 / stage 3 comparison still succeeds. Verified with "make bootstrap”; cross, Canadian and --disable-bootstrap builds should be unaffected.

Bootstrapped and tested on aarch64-none-linux-gnu and x86_64-linux."

The patch is out for testing on the [2]gcc-patches mailing list .

In response, there was already one suggestion that this caching of configure results is more of a "hack" and arguing that the configure scripts could be further cleaned up for helping to reduce the time spent. There are configure checks now deemed useless, the possibility of removing GNU Gold linker support, and other remnants that could be removed or at least cleaned up. Cleaning up the configure scripts would also benefit cross-compiling builds too and just not the native bootstraps.

We'll see where this work leads but any effort to significantly reduce the time spent performing GCC bootstraps is very much worthwhile.



[1] https://www.phoronix.com/image-viewer.php?id=2026&image=vera_bootstrap_lrg

[2] https://gcc.gnu.org/pipermail/gcc-patches/2026-June/719831.html



Tao is source of the ten thousand things.
It is the treasure of the good man, and the refuge of the bad.
Sweet words can buy honor;
Good deeds can gain respect.
If a man is bad, do not abandon him.
Therefore on the day the emperor is crowned,
Or the three officers of state installed,
Do not send a gift of jade and a team of four horses,
But remain still and offer the Tao.
Why does everyone like the Tao so much at first?
Isn't it because you find what you seek and are forgiven when you sin?
Therefore this is the greatest treasure of the universe.