Hi, GDB sources currently contain gdb/gnulib/ import from Dec 2012. To fix a bit unrelated problem gdb build failure with -Werror https://sourceware.org/bugzilla/show_bug.cgi?id=17718 gdb/compile/compile.c: In function ‘do_rmdir’: gdb/compile/compile.c:176:10: error: ignoring return value of ‘system’, declared with attribute warn_unused_result [-Werror=unused-result] It is being discussed in the long thread: [patch] compile: rm -rf -> ftw()+rmdir()+unlink() [Re: [patch] compile: Fix MinGW build] https://sourceware.org/ml/gdb-patches/2014-12/msg00501.html I need to update gnulib first to prevent a bug in that 2012 gnulib when trying to import its fts module (unrelated to this patchset) which was: i686-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I../../../../gdb/gnulib/import -I.. -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -D__USE_MINGW_ACCESS -MT msvc-inval.o -MD -MP -MF .deps/msvc-inval.Tpo -c -o msvc-inval.o ../../../../gdb/gnulib/import/msvc-inval.c ../../../../gdb/gnulib/import/msvc-inval.c:32:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'gl_msvc_invalid_parameter_handler' gl_msvc_invalid_parameter_handler (const wchar_t *expression, ^ ../../../../gdb/gnulib/import/msvc-inval.c: In function 'gl_msvc_inval_ensure_handler': ../../../../gdb/gnulib/import/msvc-inval.c:124:39: error: 'gl_msvc_invalid_parameter_handler' undeclared (first use in this function) _set_invalid_parameter_handler (gl_msvc_invalid_parameter_handler); ^ ../../../../gdb/gnulib/import/msvc-inval.c:124:39: note: each undeclared identifier is reported only once for each function it appears in Makefile:1511: recipe for target 'msvc-inval.o' failed make[8]: *** [msvc-inval.o] Error 1 Besides that it would be probably good to update gdb/gnulib/ anyway. ------------------------------------------------------------------------------ The whole problem is that the gnulib update (in [patch 2/2]) will cause (only) for build_win64 many errors like this one: x86_64-w64-mingw32-gcc -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -D__USE_MINGW_ACCESS -I. -I../../gdb -I../../gdb/common -I../../gdb/config -DLOCALEDIR="\"/usr/x86_64-w64-mingw32/sys-root/mingw/share/locale\"" -DHAVE_CONFIG_H -I../../gdb/../include/opcode -I../../gdb/../opcodes/.. -I../../gdb/../readline/.. -I../bfd -I../../gdb/../bfd -I../../gdb/../include -I../libdecnumber -I../../gdb/../libdecnumber -I./../intl -I../../gdb/gnulib/import -Ibuild-gnulib/import -Wall -Wdeclaration-after-statement -Wpointer-arith -Wpointer-sign -Wno-unused -Wunused-value -Wunused-function -Wno-switch -Wno-char-subscripts -Wmissing-prototypes -Wdeclaration-after-statement -Wempty-body -Wmissing-parameter-type -Wold-style-declaration -Wold-style-definition -Wno-format -Werror -c -o ser-tcp.o -MT ser-tcp.o -MMD -MP -MF .deps/ser-tcp.Tpo ../../gdb/ser-tcp.c ../../gdb/ser-tcp.c: In function 'wait_for_connect': ../../gdb/ser-tcp.c:137:53: error: passing argument 5 of 'select' from incompatible pointer type [-Werror] n = select (scb->fd + 1, &rset, &wset, &eset, &t); ^ In file included from ../../gdb/serial.h:23:0, from ../../gdb/ser-tcp.c:21: /usr/x86_64-w64-mingw32/sys-root/mingw/include/winsock2.h:995:34: note: expected 'PTIMEVAL' but argument is of type 'struct rpl_timeval *' WINSOCK_API_LINKAGE int WSAAPI select(int nfds,fd_set *readfds,fd_set *writefds,fd_set *exceptfds,const PTIMEVAL timeout); ^ cc1: all warnings being treated as errors Makefile:1100: recipe for target 'ser-tcp.o' failed This IIUC comes from this mingw64 change: [Mingw-w64-public] [patch] Replace struct timeval usage with PTIMEVAL and define TIMEVAL differently on LP64 http://sourceforge.net/p/mingw-w64/mailman/message/29610438/ This is because occasional #include will then #include also MS-Windows headers and provide an incompatible definition of struct timeval. IIUC one should always #include to get all the struct timeval definitions in the codebase the same. But #including (and thus ) is a problem as sourceware include/coff/ headers have duplicate/conflicting definitions with MS-Windows headers. So I have #ifndef-out their duplicate/conflicting parts during 64-bit MS-Windows builds. I have no idea what is the best way, my only goal was to make it buildable (not runtime tested as Wine does not work so well for gdb.exe). Thanks, Jan