From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26258 invoked by alias); 23 Dec 2014 11:54:59 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 26239 invoked by uid 89); 23 Dec 2014 11:54:57 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.0 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx6-phx2.redhat.com Received: from mx6-phx2.redhat.com (HELO mx6-phx2.redhat.com) (209.132.183.39) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Tue, 23 Dec 2014 11:54:51 +0000 Received: from zmail14.collab.prod.int.phx2.redhat.com (zmail14.collab.prod.int.phx2.redhat.com [10.5.83.16]) by mx6-phx2.redhat.com (8.14.4/8.14.4) with ESMTP id sBNBso1O018488; Tue, 23 Dec 2014 06:54:50 -0500 Date: Tue, 23 Dec 2014 11:54:00 -0000 From: Kai Tietz To: Jan Kratochvil Cc: gdb-patches@sourceware.org, Corinna Vinschen , Nicholas Clifton Message-ID: <108241234.1319759.1419335690162.JavaMail.zimbra@redhat.com> In-Reply-To: <20141222221229.GA30575@host2.jankratochvil.net> References: <20141222221229.GA30575@host2.jankratochvil.net> Subject: Re: [patch 1/2] mingw: update gnulib: prepare the sources MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-SW-Source: 2014-12/txt/msg00611.txt.bz2 Hi, ----- Urspr=C3=BCngliche Mail ----- ...=20 > The whole problem is that the gnulib update (in [patch 2/2]) will cause > (only) > for build_win64 many errors like this one: Only for win64? This is curious. As headers are shared between 32-bit and= 64-bit, and most part of Win32 API too. > x86_64-w64-mingw32-gcc -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=3D2 > -fexceptions --param=3Dssp-buffer-size=3D4 -D__USE_MINGW_ACCESS -I. > -I../../gdb -I../../gdb/common -I../../gdb/config > -DLOCALEDIR=3D"\"/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 =3D 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 >=20 > 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/ >=20 > This is because occasional #include will then #include also > MS-Windows headers and provide an incompatible definition of struct timev= al. > IIUC one should always #include to get all the struct timeval > definitions in the codebase the same. >=20 > But #including (and thus ) is a problem as source= ware > include/coff/ headers have duplicate/conflicting definitions with MS-Wind= ows > headers. So I have #ifndef-out their duplicate/conflicting parts during > 64-bit > MS-Windows builds. >=20 > 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). Well, IMO the real issue here is to include windows.h instead of sys/time.h= . Also a lot of changes done in second patch are strongly related to this = include. Sadly MS decided to pollute namespace with commonly used names in their pla= tform-headers. So in the past we tried to avoid to include things like win= dows.h in bfd and related headers, and to isolate files, which actually nee= d to include it (eg windows-unicode stuff in binutils/). To include it now= leads to a general architectural change of binutils' bfd (and other parts)= . I am not in general oppose to it, but I am wondering if this is really w= anted/needed. Kai =20 >=20 > Thanks, > Jan >=20 >=20 > [Textdatei:use.patch] >=20