This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [patch binutils]: Fix build for cygwin and mingw of binutils tools
- From: Dave Korn <dave dot korn dot cygwin at googlemail dot com>
- To: Kai Tietz <ktietz70 at googlemail dot com>
- Cc: Binutils <binutils at sourceware dot org>
- Date: Thu, 07 May 2009 14:11:26 +0100
- Subject: Re: [patch binutils]: Fix build for cygwin and mingw of binutils tools
- References: <90baa01f0905070501i27cf14a4p91327b8c39e166df@mail.gmail.com>
Kai Tietz wrote:
> Hello,
>
> this patch fixes a breakage reasoned by resent changes to winuni.c.
Christian mentioned this the other day too, but I can't reproduce the
problem. Are you guys using 1.5 perhaps? In my $objdir/binutils/ build dir,
config.log shows a test for iconv failing:
configure:15843: checking for iconv
configure:15870: gcc -o conftest.exe -g -O2 conftest.c -lz >&5
/win/c/DOCUME~1/ADMINI~1/LOCALS~1/Temp/ccWQw6IQ.o: In function `main':
/gnu/binutils/obj/binutils/conftest.c:71: undefined reference to `_iconv_open'
/gnu/binutils/obj/binutils/conftest.c:72: undefined reference to `_iconv'
/gnu/binutils/obj/binutils/conftest.c:73: undefined reference to `_iconv_close'
collect2: ld returned 1 exit status
configure:15876: $? = 1
configure: failed program was:
$ cygcheck -c libiconv
Cygwin Package Information
Package Version Status
libiconv 1.12-10 OK
In this package, it's called libiconv_open() for some reason. Hmm, this is
bizarre; /usr/include/iconv.h and /usr/lib/libiconv{,.dll}.a disagree. Ah, my
libiconv installation must have gotten broken somehow. I'll have to reinstall it.
> ChangeLog
>
> 2009-05-07 Kai Tietz <kai.tietz@onevision.com>
>
> * winduni.c (iconv_onechar): Add it just if HAVE_ICONV
> is defined, but not __CYGWIN__ or _WIN32 is defined.
>
> I test it on i686-pc-cygwin and for x86_64-pc-mingw32.
> Patch ok for apply?
I think your changelog should also mention wind_iconv_cp, and the wording
"Add it just if ..." is a bit awkward, how about "Only define when ... but not
when ..."?
cheers,
DaveK