Skip to content

Commit 437d2d6

Browse files
Blackhexjon-turney
authored andcommitted
Cygwin: configure: add possibility to skip build of cygserver and utils
This patch adds configure options allowing to disable build of cygserver and Cygwin utilities. This is useful when one needs to build only cygwin1.dll and crt0.o with stage1 compiler that is not yet capable of linking executables as it is missing cygwin1.dll and crt0.o. Signed-off-by: Radek Bartoň <radek.barton@microsoft.com>
1 parent e29e1cf commit 437d2d6

4 files changed

Lines changed: 48 additions & 3 deletions

File tree

winsup/Makefile.am

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,26 @@ cygdoc_DATA = \
1414
CYGWIN_LICENSE \
1515
COPYING
1616

17-
SUBDIRS = cygwin cygserver utils testsuite
17+
SUBDIRS = cygwin testsuite
18+
19+
if BUILD_CYGSERVER
20+
SUBDIRS += cygserver
21+
endif
22+
23+
if BUILD_UTILS
24+
SUBDIRS += utils
25+
endif
1826

1927
if BUILD_DOC
2028
SUBDIRS += doc
2129
endif
2230

23-
cygserver utils testsuite: cygwin
31+
testsuite: cygwin
32+
33+
if BUILD_CYGSERVER
34+
cygserver: cygwin
35+
endif
36+
37+
if BUILD_UTILS
38+
utils: cygwin
39+
endif

winsup/configure.ac

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,18 @@ AC_ARG_ENABLE(doc,
8383
enable_doc=yes)
8484
AM_CONDITIONAL(BUILD_DOC, [test $enable_doc != "no"])
8585

86+
# Disabling build of cygserver and utils is needed for zero-bootstrap build of
87+
# stage 1 Cygwin toolchain where the linker is not able to produce executables
88+
# yet.
89+
AC_ARG_ENABLE(cygserver,
90+
[AS_HELP_STRING([--disable-cygserver], [do not build cygserver])],,
91+
enable_cygserver=yes)
92+
AM_CONDITIONAL(BUILD_CYGSERVER, [test $enable_cygserver != "no"])
93+
AC_ARG_ENABLE(utils,
94+
[AS_HELP_STRING([--disable-utils], [do not build utils])],,
95+
enable_utils=yes)
96+
AM_CONDITIONAL(BUILD_UTILS, [test $enable_utils != "no"])
97+
8698
AC_CHECK_PROGS([DOCBOOK2XTEXI], [docbook2x-texi db2x_docbook2texi])
8799
if test -z "$DOCBOOK2XTEXI" ; then
88100
if test "x$enable_doc" != "xno"; then

winsup/cygserver/Makefile.am

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ cygserver_flags=$(cxxflags_common) -Wimplicit-fallthrough=5 -Werror -DSYSCONFDIR
1212
AM_CXXFLAGS = $(CFLAGS)
1313

1414
noinst_LIBRARIES = libcygserver.a
15+
if BUILD_CYGSERVER
1516
sbin_PROGRAMS = cygserver
17+
endif
1618
bin_SCRIPTS = cygserver-config
1719

1820
cygserver_SOURCES = \

winsup/doc/faq-programming.xml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -698,8 +698,23 @@ Building these programs can be disabled with the <literal>--without-cross-bootst
698698
option to <literal>configure</literal>.
699699
</para>
700700

701+
<para>
702+
Build of <literal>cygserver</literal> can be skipped with
703+
<literal>--disable-cygserver</literal> and build of other Cygwin utilities with
704+
<literal>--disable-utils</literal>.
705+
</para>
706+
707+
<para>
708+
In combination, <literal>--disable-cygserver</literal>,
709+
<literal>--disable-dumper</literal>, <literal>--disable-utils</literal>
710+
and <literal>--without-cross-bootstrap</literal> allow building of just
711+
<literal>cygwin1.dll</literal> and <literal>crt0.o</literal> for a stage2
712+
compiler, when being built with stage1 compiler which does not support linking
713+
executables yet (because those files are missing).
714+
</para>
715+
701716
<!-- If you want to run the tests <literal>busybox</literal> and
702-
<literal>cygutils-extra<literal> are also required. -->
717+
<literal>cygutils-extra</literal> are also required. -->
703718

704719
<para>
705720
Building the documentation also requires the <literal>dblatex</literal>,

0 commit comments

Comments
 (0)