GCC Newspaper
OCTOBER 6, 2026
Date
/
Architectures
Components
Topics
News & Policy
Other
gcc Performance Win

Run the bootstrap object comparison in parallel.

Speeds up GCC bootstrap object comparison by running comparisons in parallel.

This change significantly accelerates the GCC bootstrap process by parallelizing the comparison of stage 2 and stage 3 objects. Previously, these comparisons were performed serially, creating a bottleneck. The new implementation generates individual make targets for each object comparison and utilizes $(MAKE) to run them in parallel, leveraging the existing jobserver. This reduces comparison wall time by approximately 95% on highly parallel systems.

In Details

The GCC bootstrap process includes object comparisons between stages (e.g., stage 2 vs. stage 3). This patch refactors the comparison logic in Makefile.tpl to run these comparisons in parallel. Instead of a serial shell loop executing cmp commands, it now generates a parallel make target that invokes $(MAKE) recursively. This ensures that comparisons are distributed across available cores, managed by the main jobserver, and temporary files are cleaned up appropriately. Comparator non-zero/non-one statuses are now correctly diagnosed as operational errors.

For Context
bootstrap
The process of building a compiler using an earlier version of itself. This is a common method for building complex software like compilers to ensure self-hosting capabilities.
stage 2 and stage 3 objects
In a multi-stage build process for a compiler, these refer to the object files produced by the compiler after its second and third build iterations, respectively. Comparing them verifies consistency across stages.
jobserver
A mechanism used by make to control the degree of parallelism across nested make invocations, preventing overwhelming the system.
wall time
The total elapsed time from the start to the end of a process, including any time spent waiting or idle.
Filed Under: buildperformancebootstrapparallelism