https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=9dc06b7ea8e9f523ec89cae367159a865c3c6d36

commit 9dc06b7ea8e9f523ec89cae367159a865c3c6d36
Author: J.H. vd Water <[email protected]>
Date:   Fri Jan 9 20:04:15 2026 +0100

    Cygwin: Rename cross-bootstrap config option back to mingw-progs to avoid 
confusion
    
    Revert the option name in AC_ARG_WITH([cross-bootstrap] back to its 
previous name,
    mingw-progs, in order to avoid confusion ... Also revert the meaning of the 
macro.
    
    About 10 years ago, Foley was messing around with a stage1 gcc 
cross-compiler
    for Cygwin on Linux, and decided he only required cygwin1.dll.
    
    He did not like to rebuild assets, like cygcheck, strace, for which he was 
forced
    to install the mingw-runtime (then: mingw-crt) and the MinGW toolchain.
    
    Foley decided to change the option name of the AC_ARG_WITH([mingw-progs] 
macro in
    winsup/configure.ac; however, he also inverted the meaning of the 
--with(out)-FOO
    switch (as Foley also inverted the test that follows the macro) ...
    
        --with-FOO changed from: "search for mingw" ... to "do NOT search for 
mingw"
        --without-FOO changed from: "do NOT search for mingw" ... to "search 
for mingw"
    
    Originally:
      AC_ARG_WITH([mingw-progs], ...
      if test "x$with_mingw_progs" != xno; then
      # search for MinGW
    
    After:
      AC_ARG_WITH([cross-bootstrap], ...
      if test "x$with_cross_bootstrap" != "xyes"; then
      # search for MinGW
    
    Foley changed the option name of the macro to "cross-bootstrap", which
    confused not only Corinna (since we went on to document the option as if it
    hadn't been inverted), but is still confusing to everyone today!
    
    Therefore I suggest to revert both the option name of the macro and the 
meaning of
    the macro to what they were: option name: mingw-progs, meaning: search for 
the MinGW
    toolchain (if --with-mingw-progs is specified).
    
    This reverts the remaining parts of 
e7e6119241d02241c3d114cff037340c12245393, after
    AC_WINDOWS_LIBS was removed in 78bfd7dbb96eae1d9541711578ff08e56ddbca5b.
    
    Signed-off-by: J.H. vd Water <[email protected]>
    Reviewed-by: Jon Turney <[email protected]>

Diff:
---
 winsup/configure.ac            | 10 +++++++---
 winsup/doc/faq-programming.xml |  4 ++--
 winsup/testsuite/Makefile.am   |  2 +-
 winsup/utils/Makefile.am       |  2 +-
 4 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/winsup/configure.ac b/winsup/configure.ac
index 05b5a9897..ac96968e4 100644
--- a/winsup/configure.ac
+++ b/winsup/configure.ac
@@ -40,7 +40,11 @@ AM_PROG_AS
 AC_LANG(C)
 AC_LANG(C++)
 
-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])
+AC_ARG_WITH([mingw-progs],
+  [AS_HELP_STRING([--without-mingw-progs],
+    [do not build programs using the MinGW toolchain])],
+  [],
+  [with_mingw_progs=yes])
 
 AC_CYGWIN_INCLUDES
 
@@ -132,13 +136,13 @@ if test -z "$XMLTO"; then
     fi
 fi
 
-if test "x$with_cross_bootstrap" != "xyes"; then
+if test "x$with_mingw_progs" != "xno"; 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"])
+AM_CONDITIONAL(MINGW_PROGS, [test "x$with_mingw_progs" != "xno"])
 
 AC_EXEEXT
 
diff --git a/winsup/doc/faq-programming.xml b/winsup/doc/faq-programming.xml
index ac361839a..0359e01f1 100644
--- a/winsup/doc/faq-programming.xml
+++ b/winsup/doc/faq-programming.xml
@@ -694,7 +694,7 @@ Additionally, building the <code>dumper</code> utility 
requires
 Building those Cygwin utilities which are not themselves Cygwin programs
 (e.g. <code>cygcheck</code> and <code>strace</code>) also requires
 <literal>mingw64-x86_64-gcc-g++</literal> and 
<literal>mingw64-x86_64-zlib</literal>.
-Building these programs can be disabled with the 
<literal>--without-cross-bootstrap</literal>
+Building these programs can be disabled with the 
<literal>--without-mingw-progs</literal>
 option to <literal>configure</literal>.
 </para>
 
@@ -707,7 +707,7 @@ Build of <literal>cygserver</literal> can be skipped with
 <para>
 In combination, <literal>--disable-cygserver</literal>,
 <literal>--disable-dumper</literal>, <literal>--disable-utils</literal>
-and <literal>--without-cross-bootstrap</literal> allow building of just
+and <literal>--without-mingw-progs</literal> allow building of just
 <literal>cygwin1.dll</literal> and <literal>crt0.o</literal> for a stage2
 compiler, when being built with stage1 compiler which does not support linking
 executables yet (because those files are missing).
diff --git a/winsup/testsuite/Makefile.am b/winsup/testsuite/Makefile.am
index 20e06b9c5..0ff23d041 100644
--- a/winsup/testsuite/Makefile.am
+++ b/winsup/testsuite/Makefile.am
@@ -382,6 +382,6 @@ clean-local:
        rm -f *.stackdump
        rm -rf ${builddir}/testinst/tmp
 
-if CROSS_BOOTSTRAP
+if MINGW_PROGS
 SUBDIRS = mingw
 endif
diff --git a/winsup/utils/Makefile.am b/winsup/utils/Makefile.am
index 57a4f377c..4a7936a6e 100644
--- a/winsup/utils/Makefile.am
+++ b/winsup/utils/Makefile.am
@@ -90,6 +90,6 @@ profiler_LDADD = $(LDADD) -lntdll
 cygps_LDADD = $(LDADD) -lpsapi -lntdll
 newgrp_LDADD = $(LDADD) -luserenv
 
-if CROSS_BOOTSTRAP
+if MINGW_PROGS
 SUBDIRS = mingw
 endif

Reply via email to