https://gcc.gnu.org/bugzilla/show_bug.cgi?id=128972

--- Comment #5 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:e30b1f37f3abcd52ff98971b265f2104eb34f520

commit r17-6635-ge30b1f37f3abcd52ff98971b265f2104eb34f520
Author: Kyrylo Tkachov <[email protected]>
Date:   Tue Nov 24 08:17:29 2026 +0100

    build: Skip the gmp.h check in the build-machine configure [PR128972]

    PR128972 reports that gcc/configure stops with "cannot compile with gmp.h
    using GMPINC ()" when a cross compiler builds a native compiler, that is
    when host != build.

    When host != build, gcc/configure runs a nested configure for the build
    machine.  The nested run clears GMPINC and defines GENERATOR_FILE so that
    system.h does not include gmp.h and the build compiler does not need gmp
    headers.  The "whether gmp.h can be used" check added by commit 8383ac6fcda
    includes gmp.h unconditionally.  In the nested run it therefore looks for
    gmp.h on the build machine with no -I flag, and fails if the build
    machine has no gmp development headers installed.

    Guard the check with GENERATOR_FILE in the same way as system.h.  The
    nested configure no longer tests gmp.h, and the host run still stops
    with the error if gmp.h cannot be used.

    Tested the generated configure with GMPINC unset and CPPFLAGS set to
    -DGENERATOR_FILE on a machine without gmp.h in the default include path.
    The old configure stops at the gmp.h check, the new one passes it.  Without
    GENERATOR_FILE the new configure still stops with the error.

    gcc/ChangeLog:

            PR bootstrap/128972
            * configure.ac: Skip the gmp.h check when GENERATOR_FILE is
defined.
            * configure: Regenerate.

    Signed-off-by: Kyrylo Tkachov <[email protected]>

Reply via email to