Rename macro AC_ARG_WITH([cross_bootstrap] to AC_ARG_WITH([skip_mingw], in
order
to avoid confusion ...
About 10 years ago, Foley (1] was "messing around" with a stage1 cross-compiler
for Cygwin, and decided to rebuild cygwin1.dll, as he required only cygwin1.dll.
He did not like to rebuild assets, like cygcheck, strace, for which he was
forced
to install mingw-runtime (then: mingw-crt) and the MinGW toolchain.
To meet his intention, Foley decided to change the AC_ARG_WITH([mingw_progs]
macro
in winsup/configure.ac; he not only changed the option name of the macro, he
also
inverted the meaning of the --with-FOO switch (as Foley also inverted both
tests
that follow the macro) ...
with-FOO changed from: "Hunt for mingw" ... to "do NOT hunt for mingw".
Originally:
AC_ARG_WITH([mingw_progs], ...
if test "x$with_mingw_progs" != xno; then
Hunt for mingw
Foley:
AC_ARG_WITH([cross_bootstrap], ...
if test "x$with_cross_bootstrap" != "xyes"; then
Hunt for mingw
Foley changed the option name of the macro to "cross-bootstrap", which confused
not
only Corinna V. [2], but is still confusing to everyone today!
A better name would have been: "skip_mingw".
Once more: by --withOUT cross-bootstrap, Foley meant: Hunt for mingw
(contrary to
how the switch is usually interpreted) ...
[1]
-
https://cygwin.com/cgit/newlib-cygwin/commit/winsup/configure.ac?id=e7e6119241d02241c3d114cff037340c12245393
( Rename without-mingw-progs to with-cross-bootstrap ) ... 2016-04-02
[2]
-
https://cygwin.com/cgit/cygwin-htdocs/commit/faq/faq.html?id=9d693eea564ec608569c2f5d78536827e99f1661
( Cygwin 3.5.0 release ) ... 2024-02-01
Therefore I suggest to change the option name of the macro into "skip_mingw" ,
as
follows:
---
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..c52645eb7 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([skip_mingw],
+ [AS_HELP_STRING([--with-skip-mingw],
+ [do not build programs using the MinGW toolchain])],
+ [],
+ [with_skip_mingw=no])
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_skip_mingw" != "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"])
+AM_CONDITIONAL(SKIP_MINGW, [test "x$with_skip_mingw" != "xyes"])
AC_EXEEXT
diff --git a/winsup/doc/faq-programming.xml b/winsup/doc/faq-programming.xml
index ac361839a..2e69e7574 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>--with-skip-mingw</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>--with-skip-mingw</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..a3d33bb82 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 SKIP_MINGW
SUBDIRS = mingw
endif
diff --git a/winsup/utils/Makefile.am b/winsup/utils/Makefile.am
index 57a4f377c..7d05a83e6 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 SKIP_MINGW
SUBDIRS = mingw
endif
--
2.38.1