This is the mail archive of the
cygwin-patches
mailing list for the Cygwin project.
cygcheck linking without libz
- From: "Yaakov (Cygwin Ports)" <yselkowitz at users dot sourceforge dot net>
- To: cygwin-patches at cygwin dot com
- Date: Wed, 30 Jul 2008 00:57:26 -0500
- Subject: cygcheck linking without libz
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
"godlygeek" in IRC just came across a bug with building cygcheck where
mingw-zlib is not installed. The link fails with undefined symbols
because -lntdll is only specified if libz is present. (bloda.cc
requires ntdll regardless of the zlib usage.)
Patch attached.
Yaakov
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEAREIAAYFAkiQAsYACgkQpiWmPGlmQSNl6ACaAlY5juJ7aNuSXToKtZ7GrQlY
vIQAnAl3btQ3sDUZh5gMvs564yduXbAn
=dKL5
-----END PGP SIGNATURE-----
--- winsup/utils/ChangeLog.orig 2008-07-30 00:51:43.890625000 -0500
+++ winsup/utils/ChangeLog 2008-07-30 00:54:15.125000000 -0500
@@ -1,3 +1,7 @@
+2008-07-30 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
+
+ * Makefile.in: Link cygcheck with -lntdll even without mingw-zlib.
+
2008-07-27 Christopher Faylor <me+cygwin@cgf.cx>
* cygcheck.cc (load_cygwin): Free the cygwin dll after we're done with
--- winsup/utils/Makefile.in.orig 2008-07-30 00:43:31.062500000 -0500
+++ winsup/utils/Makefile.in 2008-07-30 00:46:06.968750000 -0500
@@ -71,6 +71,7 @@
cygcheck.exe: bloda.o path.o dump_setup.o
# Provide any necessary per-target variable overrides.
+cygcheck.exe: MINGW_LDFLAGS += -lntdll
cygpath.exe: ALL_LDFLAGS += -lntdll
# Check for dumper's requirements and enable it if found.
@@ -94,7 +95,7 @@
zlib_h := -include ${patsubst %/lib/mingw/libz.a,%/include/zlib.h,${patsubst %/lib/libz.a,%/include/zlib.h,$(libz)}}
zconf_h := ${patsubst %/zlib.h,%/zconf.h,$(zlib_h)}
dump_setup.o: MINGW_CXXFLAGS += $(zconf_h) $(zlib_h)
-cygcheck.exe: MINGW_LDFLAGS += $(libz) -lntdll
+cygcheck.exe: MINGW_LDFLAGS += $(libz)
else
all: warn_cygcheck_zlib
endif