Configute option --without-cross-bootstrap works in opposite
Jon Turney
jon.turney@dronecode.org.uk
Thu Nov 14 15:10:34 GMT 2024
On 10/11/2024 13:16, Ivan Vorontsov via Cygwin wrote:
> 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.
Thanks for reporting this.
So, this actually looks like a mix-up in [1], where we inverted the
meaning of the option, and it's default, but didn't change the help text.
It is confusing, but I think after that commit, the default is
"--without-cross-bootstrap", with the meaning "I am not doing a
bootstrap, so check for and build everything".
So the help text should probably be changed to read "build programs
using the MinGW toolchain or check for MinGW libraries (disable if you
are bootstrapping a Cygwin-targeted cross-compiler, or don't have a
MinGW compiler available)"
(Of course, in the meantime, the use of AC_WINDOWS_{HEADERS,LIBS} has
been removed, so this option now only has the effects that
'--without-mingw-progs' had.)
So, I'm not entirely sure what to do here.
[1]
https://cygwin.com/cgit/newlib-cygwin/commit/?id=e7e6119241d02241c3d114cff037340c12245393
More information about the Cygwin
mailing list