On 2013-10-3 3:15, Yaakov (Cygwin/X) wrote:
> On 2013-10-02 13:55, LRN wrote:
>> On 02.10.2013 22:50, Alexey Pavlov wrote:
>>> 2013/10/2 LRN wrote:
>>>> (offtopic: it looks like a bug that gdb links to libexpat.a instead of
>>>> libexpat.dll.a)
>
> FWIW, this also affects libiconv and libintl when building with NLS.
>
>>> Why it a bug? I'm build GDB with static libexpat very often.
>>
>> Because nothing htere indicates that it should be linked statically. It
>> should be linked statically when you make a static build, and linked
>> dynamically by default (or when it's clearly stated by configure or m4
>> macro that static libexpat is needed). I don't see any of that here
>> (though i have to admit that gdb configure system is one big mystery).
>
> The problem is with lib-link.m4:AC_LIB_HAVE_LINKFLAGS macro and the old
> config.rpath at the top of cygnus trees (binutils, gcc, gdb, cygwin, newlib).
> Either use the attached patch when building any of these packages, or
> configure then with --without-libiconv-prefix --without-libintl-prefix (and
> for gdb, --without-libexpat-prefix).
>
>
> Yaakov
> Cygwin Ports
>
I configure gdb like:
../gdb/configure \
CFLAGS="-O0 -g" \
--prefix=/mingw \
--host=mingw32 \
--build=mingw32 \
--target=mingw32 \
--with-python=/python/python \
--with-expat \
--disable-nls
I build iconv, zlib, expat library with --enable-static --disable-shared
option, and install them to /mingw, so I think your patch is not necessary in
my case, right?
I build gdb very often with such option, and it works OK with an old MinGW-w64
GCC 4.6.3, the failure happens when I try to build gdb with
mingw-builds\x32-4.8.1-posix-dwarf-rev5
I see the symbol __time32 is in the msvcrt library, here is the result:
$ nm -A --defined-only /mingw/i686-w64-mingw32/lib/*.a | grep "_time32"
D:/mingw-builds/x32-4.8.1-posix-dwarf-rev5/mingw32/i686-w64-mingw32/lib/libmsvcr
100.a:dcrfs01238.o:00000000 I __imp___time32
D:/mingw-builds/x32-4.8.1-posix-dwarf-rev5/mingw32/i686-w64-mingw32/lib/libmsvcr
100.a:dcrfs01238.o:00000000 T __time32
D:/mingw-builds/x32-4.8.1-posix-dwarf-rev5/mingw32/i686-w64-mingw32/lib/libmsvcr
110.a:dkhfs01310.o:00000000 I __imp___time32
D:/mingw-builds/x32-4.8.1-posix-dwarf-rev5/mingw32/i686-w64-mingw32/lib/libmsvcr
110.a:dkhfs01310.o:00000000 T __time32
D:/mingw-builds/x32-4.8.1-posix-dwarf-rev5/mingw32/i686-w64-mingw32/lib/libmsvcr
80.a:dkbgs00593.o:00000000 I __imp___time32
D:/mingw-builds/x32-4.8.1-posix-dwarf-rev5/mingw32/i686-w64-mingw32/lib/libmsvcr
80.a:dkbgs00593.o:00000000 T __time32
D:/mingw-builds/x32-4.8.1-posix-dwarf-rev5/mingw32/i686-w64-mingw32/lib/libmsvcr
90.a:daacs01070.o:00000000 I __imp___time32
D:/mingw-builds/x32-4.8.1-posix-dwarf-rev5/mingw32/i686-w64-mingw32/lib/libmsvcr
90.a:daacs01070.o:00000000 T __time32
D:/mingw-builds/x32-4.8.1-posix-dwarf-rev5/mingw32/i686-w64-mingw32/lib/libmsvcr
90d.a:dgpbs01133.o:00000000 I __imp___time32
D:/mingw-builds/x32-4.8.1-posix-dwarf-rev5/mingw32/i686-w64-mingw32/lib/libmsvcr
90d.a:dgpbs01133.o:00000000 T __time32
D:/mingw-builds/x32-4.8.1-posix-dwarf-rev5/mingw32/i686-w64-mingw32/lib/libmsvcr
t.a:desfs01239.o:00000000 I __imp___time32
D:/mingw-builds/x32-4.8.1-posix-dwarf-rev5/mingw32/i686-w64-mingw32/lib/libmsvcr
t.a:desfs01239.o:00000000 T __time32
D:\mingw-builds\x32-4.8.1-posix-dwarf-rev5\mingw32\bin\nm.exe: D:/mingw-builds/x
32-4.8.1-posix-dwarf-rev5/mingw32/i686-w64-mingw32/lib/libruntimeobject.a: File
format not recognized
BTW: the below code build successfully
#include <time.h>
int main() {
time_t t;
_time32(&t);
}
I'm not sure the failure reason of detecting expat library in gdb.
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134791&iu=/4140/ostg.clktrk
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public