When building a Mac OS X -> mingw32 cross compiler using the binutils-2.17.50 snapshot, the build fails with:
[localhost]$ tar jxf binutils-2.17.50.tar.bz2 [localhost]$ cd binutils-2.17.50/ [localhost]$ ./configure --target=i386-mingw32 checking build system type... i386-apple-darwin9.0.0b1 checking host system type... i386-apple-darwin9.0.0b1 checking target system type... i386-pc-mingw32 ... checking for ld used by GCC... /usr/libexec/gcc/i686-apple-darwin9/4.0.1/ld checking if the linker (/usr/libexec/gcc/i686-apple-darwin9/4.0.1/ld) is GNU ld... no checking for shared library run path origin... done checking for iconv... yes checking how to link with libiconv... -liconv checking for iconv declaration... extern size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); updating cache ./config.cache configure: creating ./config.status .... gcc -DHAVE_CONFIG_H -I. -I.././binutils -I. -D_GNU_SOURCE -I. -I.././binutils -I../bfd - I.././binutils/../bfd -I.././binutils/../include -I./../intl -DLOCALEDIR="\"/usr/local/share/locale\"" - Dbin_dummy_emulation=bin_vanilla_emulation -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Werror -g -O2 -c winduni.c gcc -DHAVE_CONFIG_H -I. -I.././binutils -I. -D_GNU_SOURCE -I. -I.././binutils -I../bfd - I.././binutils/../bfd -I.././binutils/../include -I./../intl -DLOCALEDIR="\"/usr/local/share/locale\"" - Dbin_dummy_emulation=bin_vanilla_emulation -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Werror -g -O2 -c resres.c make[4]: *** No rule to make target `-liconv', needed by `windres'. Stop. make[3]: *** [all-recursive] Error 1 make[2]: *** [all] Error 2 make[1]: *** [all-binutils] Error 2 make: *** [all] Error 2 The failure is with this target in binutils/Makefile: LIBICONV = -liconv ... windres_DEPENDENCIES = $(LIBINTL_DEP) $(LIBICONV) $(LIBIBERTY) $(BFDLIB) windmc_DEPENDENCIES = $(LIBINTL_DEP) $(LIBICONV) $(LIBIBERTY) $(BFDLIB) ... windres$(EXEEXT): $(windres_OBJECTS) $(windres_DEPENDENCIES) I think this is a bug in the makefile. On Mac OS X, libiconv is shipped with the OS but requires -liconv. Since libiconv is not being built from source in the same source tree, _DEPENDENCIES is not the appropraite place to put this. I believe it should be in windres_LDADD, like so: --- binutils/Makefile.am.orig 2007-06-23 09:14:56.000000000 -0700 +++ binutils/Makefile.am 2007-06-23 09:16:56.000000000 -0700 @@ -200,8 +200,8 @@ sysdump_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY) $(BFDLIB) coffdump_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY) $(BFDLIB) dlltool_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY) $(BFDLIB) -windres_DEPENDENCIES = $(LIBINTL_DEP) $(LIBICONV) $(LIBIBERTY) $(BFDLIB) -windmc_DEPENDENCIES = $(LIBINTL_DEP) $(LIBICONV) $(LIBIBERTY) $(BFDLIB) +windres_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY) $(BFDLIB) +windmc_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY) $(BFDLIB) addr2line_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY) $(BFDLIB) readelf_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY) dllwrap_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY) @@ -345,11 +345,11 @@ windres_SOURCES = windres.c resrc.c rescoff.c resbin.c rcparse.y rclex.c \ winduni.c resres.c $(BULIBS) -windres_LDADD = $(BFDLIB) $(LIBIBERTY) @LEXLIB@ $(LIBINTL) +windres_LDADD = $(BFDLIB) $(LIBICONV) $(LIBIBERTY) @LEXLIB@ $(LIBINTL) windmc_SOURCES = windmc.c mcparse.y mclex.c \ winduni.c $(BULIBS) -windmc_LDADD = $(BFDLIB) $(LIBIBERTY) @LEXLIB@ $(LIBINTL) +windmc_LDADD = $(BFDLIB) $(LIBICONV) $(LIBIBERTY) @LEXLIB@ $(LIBINTL) dllwrap_SOURCES = dllwrap.c version.c dllwrap_LDADD = $(LIBIBERTY) $(LIBINTL) With this change (and Makefile.in either manually hacked or regenerated with aclocal/automake), the build succeeds -- Summary: build fails with: No rule to make target `-liconv', needed by `windres'. Product: binutils Version: 2.18 (HEAD) Status: NEW Severity: normal Priority: P2 Component: binutils AssignedTo: unassigned at sources dot redhat dot com ReportedBy: ssen at apple dot com CC: bug-binutils at gnu dot org GCC build triplet: i686-apple-darwin GCC host triplet: i686-apple-darwin GCC target triplet: i386-pc-mingw32 http://sourceware.org/bugzilla/show_bug.cgi?id=4693 ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is. _______________________________________________ bug-binutils mailing list bug-binutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-binutils