https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112422
--- Comment #32 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Kyrylo Tkachov <[email protected]>: https://gcc.gnu.org/g:8383ac6fcda32c79291a54f01fcdc688f8f832f0 commit r17-5429-g8383ac6fcda32c79291a54f01fcdc688f8f832f0 Author: Kyrylo Tkachov <[email protected]> Date: Tue Oct 13 15:05:37 2026 +0200 build: let configure-gcc start once gmp is configured configure-gcc waits for gmp, mpfr, mpc and isl to be built. In a bootstrap with the libraries in the tree, each stage builds them first, gmp then mpfr and isl then mpc, and gcc/configure, which is serial, can only start after all four are done. gcc/configure needs none of the four libraries built. It only compiles conftests that include system.h, which includes gmp.h, and it does not link with GMPLIBS or ISLLIBS. gmp.h is generated by gmp's configure, and mpfr.h and mpc.h are source files. The dependencies came from two changes: r0-121281-g458752def198a1 made configure-gcc depend on all-gmp because system.h had started to include gmp.h, so the declaration checks in gcc/configure failed with an in-tree gmp that was not yet configured. configure-gmp is enough for that. r5-5388-g45c89690541ea6 added all-mpfr, all-mpc and all-isl for the isl link test that r5-5495-g797d88589e5ccb then added to gcc/configure. r7-6653-gf877b3adba2d94 removed the last such test. Make configure-gcc depend on configure-gmp only, as it already depends on configure-gettext rather than all-gettext. Give all-gcc back its direct dependency on all-gmp, which it otherwise has only through mpfr and isl. gcc/configure then relies on gmp's configure to create gmp.h. Check that gmp.h can be used before the first test that includes system.h, and stop with an error if not. Without the check, a missing gmp.h would only make the declaration checks fail and give a wrong auto-host.h. gcc/configure now runs while the libraries build. A bootstrap is 7% shorter on aarch64 GNU/Linux at -j144 and on x86_64 GNU/Linux at -j128, over two pairs of runs on each. auto-host.h is the same in every stage, the stage comparison passes, and the full testsuite does not change. A non-bootstrap build, and one against an external gmp, mpfr and mpc, give the same auto-host.h as before. An in-tree build where gmp.h is removed after gmp is configured stops gcc/configure with the new error. ChangeLog: PR bootstrap/112422 * Makefile.def (configure-gcc): Depend on configure-gmp rather than all-gmp, all-mpfr, all-mpc and all-isl. Add a comment. (all-gcc): Depend on all-gmp. * Makefile.in: Regenerate. gcc/ChangeLog: PR bootstrap/112422 * configure.ac: Check that gmp.h can be used. * configure: Regenerate. Signed-off-by: Kyrylo Tkachov <[email protected]>
