Hello. This patch adds configure option allowing to disable build of `cygserver`. This is useful when one needs to build only `cygwin1.dll` with stage1 compiler that is not yet capable of linking executables as it's missing `cygwin1.dl` and `crt0.o`.
Radek --- >From c0254ff2f6631a2775bfb74483b7813f0822fb0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Radek=20Barto=C5=88?= <radek.bar...@microsoft.com> Date: Sat, 21 Jun 2025 22:56:58 +0200 Subject: [PATCH] Cygwin: cygserver: add possibility to skip cygserver build MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Radek BartoĊ <radek.bar...@microsoft.com> --- winsup/Makefile.am | 12 ++++++++++-- winsup/configure.ac | 7 +++++++ winsup/cygserver/Makefile.am | 2 ++ 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/winsup/Makefile.am b/winsup/Makefile.am index 9efdd4cb1..a8a82d4c8 100644 --- a/winsup/Makefile.am +++ b/winsup/Makefile.am @@ -14,10 +14,18 @@ cygdoc_DATA = \ CYGWIN_LICENSE \ COPYING -SUBDIRS = cygwin cygserver utils testsuite +SUBDIRS = cygwin utils testsuite + +if BUILD_CYGSERVER +SUBDIRS += cygserver +endif if BUILD_DOC SUBDIRS += doc endif -cygserver utils testsuite: cygwin +utils testsuite: cygwin + +if BUILD_CYGSERVER +cygserver: cygwin +endif diff --git a/winsup/configure.ac b/winsup/configure.ac index 13aa309b2..59b19486c 100644 --- a/winsup/configure.ac +++ b/winsup/configure.ac @@ -83,6 +83,13 @@ AC_ARG_ENABLE(doc, enable_doc=yes) AM_CONDITIONAL(BUILD_DOC, [test $enable_doc != "no"]) +# Disabling build of cygserver is needed for zero-bootstrap build of stage 1 +# Cygwin toolchain where the linker is not able to produce executables yet. +AC_ARG_ENABLE(cygserver, + [AS_HELP_STRING([--disable-cygserver], [do not build cygserver])],, + enable_cygserver=yes) +AM_CONDITIONAL(BUILD_CYGSERVER, [test $enable_cygserver != "no"]) + AC_CHECK_PROGS([DOCBOOK2XTEXI], [docbook2x-texi db2x_docbook2texi]) if test -z "$DOCBOOK2XTEXI" ; then if test "x$enable_doc" != "xno"; then diff --git a/winsup/cygserver/Makefile.am b/winsup/cygserver/Makefile.am index ec7a62240..efb578e53 100644 --- a/winsup/cygserver/Makefile.am +++ b/winsup/cygserver/Makefile.am @@ -12,7 +12,9 @@ cygserver_flags=$(cxxflags_common) -Wimplicit-fallthrough=5 -Werror -DSYSCONFDIR AM_CXXFLAGS = $(CFLAGS) noinst_LIBRARIES = libcygserver.a +if BUILD_CYGSERVER sbin_PROGRAMS = cygserver +endif bin_SCRIPTS = cygserver-config cygserver_SOURCES = \ -- 2.49.0.vfs.0.4
0001-Cygwin-cygserver-add-possibility-to-skip-cygserver-build.patch
Description: 0001-Cygwin-cygserver-add-possibility-to-skip-cygserver-build.patch