From 66444a6b4036ddd31483c106ad9854e24a3ed76a Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Tue, 27 Nov 2012 21:32:36 +0000 Subject: [PATCH] * Makefile.in (ZLIBS): Common define to force static load. (MINGW_LDFLAGS): Use static libgcc. --- winsup/utils/ChangeLog | 5 +++++ winsup/utils/Makefile.in | 7 ++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/winsup/utils/ChangeLog b/winsup/utils/ChangeLog index b15c4174d..1ad1a1b2e 100644 --- a/winsup/utils/ChangeLog +++ b/winsup/utils/ChangeLog @@ -1,3 +1,8 @@ +2012-11-27 Christopher Faylor + + * Makefile.in (ZLIBS): Common define to force static load. + (MINGW_LDFLAGS): Use static libgcc. + 2012-11-27 Christopher Faylor * Makefile.in: Make sure that libz is always loaded staticly. diff --git a/winsup/utils/Makefile.in b/winsup/utils/Makefile.in index 0a60052ab..484b0770f 100644 --- a/winsup/utils/Makefile.in +++ b/winsup/utils/Makefile.in @@ -67,9 +67,10 @@ MINGW_BINS := ${addsuffix .exe,cygcheck cygwin-console-helper ldh strace} # list will will be compiled in Cygwin mode implicitly, so there is no # need for a CYGWIN_OBJS. MINGW_OBJS := bloda.o cygcheck.o dump_setup.o ldh.o path.o strace.o -MINGW_LDFLAGS:=-L${WINDOWS_LIBDIR} +MINGW_LDFLAGS:=-L${WINDOWS_LIBDIR} -static-libgcc CYGCHECK_OBJS:=cygcheck.o bloda.o path.o dump_setup.o +ZLIB:=-Wl,-dn,-lz,-dy .PHONY: all all: @@ -85,7 +86,7 @@ mount.exe: path-mount.o # Provide any necessary per-target variable overrides. -cygcheck.exe: MINGW_LDFLAGS += -lpsapi -lntdll --static -lz +cygcheck.exe: MINGW_LDFLAGS += ${ZLIB} -lpsapi -lntdll cygcheck.exe: ${CYGCHECK_OBJS} cygpath.o: CXXFLAGS += -fno-threadsafe-statics @@ -107,7 +108,7 @@ CYGWIN_BINS += dumper.exe dumper.o module_info.o parse_pe.o: CXXFLAGS += -I$(top_srcdir)/include dumper.o parse_pe.o: dumper.h dumper.exe: module_info.o parse_pe.o -dumper.exe: CYGWIN_LDFLAGS += -lbfd -lintl -liconv -liberty --static -lz +dumper.exe: CYGWIN_LDFLAGS += -lbfd -lintl -liconv -liberty ${ZLIB} else all: warn_dumper endif