Configute option --without-cross-bootstrap works in opposite

Ivan Vorontsov ivrntsv@yandex.ru
Sun Nov 10 13:16:37 GMT 2024


I tried to build cygwin from sources. As FAQ suggests I used
--without-cross-bootstrap option to configure to build without using
mingw64-x86_64-gcc-g++. It turns out this option works in opposite. I used
--with-cross-bootstrap option and build went successfully. But that's a
bug, I think.

In file winsup/configure.ac snippet below uses inverted logic:

    if test "x$with_cross_bootstrap" != "xyes"; then
        AC_CHECK_PROGS(MINGW_CXX, ${target_cpu}-w64-mingw32-g++)
        test -n "$MINGW_CXX" || AC_MSG_ERROR([no acceptable MinGW g++ found in \$PATH])
        AC_CHECK_PROGS(MINGW_CC, ${target_cpu}-w64-mingw32-gcc)
        test -n "$MINGW_CC" || AC_MSG_ERROR([no acceptable MinGW gcc found in \$PATH])
    fi
    AM_CONDITIONAL(CROSS_BOOTSTRAP, [test "x$with_cross_bootstrap" != "xyes"])

I think it should be:

    if test "x$with_cross_bootstrap" = "xyes"; then
    ...
    AM_CONDITIONAL(CROSS_BOOTSTRAP, [test "x$with_cross_bootstrap" = "xyes"])

And I think help message should be changed as well.

    AC_ARG_WITH([cross-bootstrap],[AS_HELP_STRING([--with-cross-bootstrap],[do not build programs using the MinGW toolchain or check for MinGW libraries (useful for bootstrapping a cross-compiler)])],[],[with_cross_bootstrap=no])

to:

    AC_ARG_WITH([cross-bootstrap],[AS_HELP_STRING([--without-cross-bootstrap],[do not build programs using the MinGW toolchain or check for MinGW libraries (useful for bootstrapping a cross-compiler)])],[],[with_cross_bootstrap=no])

Though, I'm not an expert. All this was found through experimentation.


More information about the Cygwin mailing list