[patch]: Decouple cygwin building from in-tree mingw/w32api building

Corinna Vinschen corinna-cygwin@cygwin.com
Mon Oct 22 15:01:00 GMT 2012

On Oct 22 14:23, Corinna Vinschen wrote:
> - OTOH, AC_NO_EXECUTABLES disables any linkage tests, so the LIBICONV
>   test in utils/configure.in has to be replaced or go away.  In my below
>   patch I opted for "go away".  I just replaced it by -liconv in
>   Makefile.in:

On (YA) second thought, maybe it would be better to use a
--print-file-name test for libiconv as well?

Index: utils/Makefile.in
@@ -83,21 +80,20 @@ strace.exe: MINGW_LDFLAGS += -lntdll
 ldd.exe: ALL_LDFLAGS += -lpsapi
 pldd.exe: ALL_LDFLAGS += -lpsapi
-ldh.exe: MINGW_LDLIBS :=
 ldh.exe: MINGW_LDFLAGS := -nostdlib -lkernel32
 # Check for dumper's requirements and enable it if found.
-LIBICONV := @libiconv@
 libbfd   := ${shell $(CC) -B$(bupdir2)/bfd/ --print-file-name=libbfd.a}
 libintl  := ${shell $(CC) -B$(bupdir2)/intl/ --print-file-name=libintl.a}
+libiconv  := ${shell $(CC) --print-file-name=libiconv.a}
 bfdlink	 := $(shell ${CC} -xc /dev/null -o /dev/null -c -B${bupdir2}/bfd/ -include bfd.h 2>&1)
-build_dumper := ${shell test -r $(libbfd) -a -r $(libintl) -a -n "$(LIBICONV)" -a -z "${bfdlink}" && echo 1}
+build_dumper := ${shell test -r $(libbfd) -a -r $(libintl) -a -r $(libiconv) -a -z "${bfdlink}" && echo 1}
 ifdef build_dumper
 CYGWIN_BINS += dumper.exe
 dumper.o module_info.o parse_pe.o: CXXFLAGS += -I$(bupdir2)/bfd -I$(updir1)/include
 dumper.o parse_pe.o: dumper.h
 dumper.exe: module_info.o parse_pe.o
-dumper.exe: ALL_LDFLAGS += ${libbfd} ${libintl} -L$(bupdir1)/libiberty $(LIBICONV) -liberty -lz
+dumper.exe: ALL_LDFLAGS += ${libbfd} ${libintl} -L$(bupdir1)/libiberty ${libiconv} -liberty -lz
 all: warn_dumper


Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

More information about the Cygwin-patches mailing list