From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29795 invoked by alias); 4 Mar 2018 17:19:30 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 29777 invoked by uid 89); 4 Mar 2018 17:19:29 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-5.7 required=5.0 tests=BAYES_00,GIT_PATCH_2,KAM_LAZY_DOMAIN_SECURITY,KAM_LOTSOFHASH,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=guy, H*r:238, H*r:2901 X-HELO: relay.fit.cvut.cz Received: from relay.fit.cvut.cz (HELO relay.fit.cvut.cz) (147.32.232.237) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 04 Mar 2018 17:19:25 +0000 Received: from imap.fit.cvut.cz (imap.fit.cvut.cz [IPv6:2001:718:2:2901:0:0:0:238] (may be forged)) by relay.fit.cvut.cz (8.15.2/8.15.2) with ESMTPS id w24HJHUk080704 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=OK) for ; Sun, 4 Mar 2018 18:19:18 +0100 (CET) (envelope-from jan.vrany@fit.cvut.cz) Received: from sao (02de09d2.bb.sky.com [2.222.9.210] (may be forged)) (authenticated bits=0 as user vranyj1) by imap.fit.cvut.cz (8.15.2/8.15.2) with ESMTPSA id w24HJFin047758 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Sun, 4 Mar 2018 18:19:16 +0100 (CET) (envelope-from jan.vrany@fit.cvut.cz) Message-ID: <1520183955.32035.2.camel@fit.cvut.cz> Subject: Compiling GDB on Windows using mingw64 toolchain From: Jan Vrany To: "gdb@sourceware.org" Date: Sun, 04 Mar 2018 17:19:00 -0000 Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-FIT-MailScanner-Information: X-FIT-MailScanner-ID: w24HJHUk080704 X-FIT-MailScanner: Found to be clean X-FIT-MailScanner-SpamCheck: not spam, SpamAssassin (score=-0.01, required 6, autolearn=not spam, T_RP_MATCHES_RCVD -0.01) X-FIT-MailScanner-From: jan.vrany@fit.cvut.cz X-FIT-MailScanner-Watermark: 1520205560.02786@tpJLVCG7nVqRdLJVFj+qjA X-IsSubscribed: yes X-SW-Source: 2018-03/txt/msg00011.txt.bz2 Hi there, I'm trying to compile recent (git master or 8.x) GDB in Windows using mingw64 toolchain, but so far I failed. git master as well as gdb-8.1-branch and gdb-8.0- branch fail to compile with following error: --- x86_64-w64-mingw32-g++ -x c++ -g -O2 -I. -I../../gdb -I../../gdb/common -I../../gdb/config -DLOCALEDIR="\"/c/msys64/mingw64/share/locale\"" -DHAVE_CONFIG_H -I../../gdb/../include/opcode -I../../gdb/../opcodes/.. - I../../gdb/../zlib -I../bfd -I../../gdb/../bfd -I../../gdb/../include -I../libdecnumber -I../../gdb/../libdecnumber - I../../gdb/gnulib/import -Ibuild-gnulib/import -DTUI=1 -I/c/msys64/mingw64/include -DMS_WIN64 - I/mingw64/include/python2.7 -Wall -Wpointer-arith -Wno-unused -Wunused- value -Wunused-function -Wno-switch -Wno-char-subscripts -Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable -Wno-sign-compare -Wno-narrowing -Wno-error=maybe-uninitialized -Wno-format -c -o gdb.o -MT gdb.o -MMD -MP -MF ./.deps/gdb.Tpo ../../gdb/gdb.c In file included from C:/msys64/mingw64/include/c++/6.3.0/cwchar:44:0, from C:/msys64/mingw64/include/c++/6.3.0/bits/postypes.h:40, from C:/msys64/mingw64/include/c++/6.3.0/bits/char_traits.h:40, from C:/msys64/mingw64/include/c++/6.3.0/string:40, from ../../gdb/common/common-utils.h:23, from ../../gdb/common/common-defs.h:78, from ../../gdb/defs.h:28, from ../../gdb/gdb.c:19: C:/msys64/mingw64/include/c++/6.3.0/cwchar:139:11: error: expected unqualified-id before 'int' using ::wint_t; --- The first commit that seems to fail with this error - according to my tests - is da804164742b83965b487bbff5b6334f2e63fe91 (Introduce gdb::unique_ptr). However, the older commist than this one don't compile either (other errors in `windows-nat.c`, see below). The GCC I'm using to compile GDB is MSYS2-built GCC 6.3. I tried to compile master on Linux with GCC 6.4 and, as expected, it compiles just fine). You may find more details (such as params to configure, GCC version and and compilation output below. I'd appreciate any help, I'm not a C++ guy (and not much of a Windows guy, too) so I'm bit lost. Does anyone here tried to compile GDB under mingw64? If so, could you please share the details how you managed so I can try following the same steps? Thanks a lot! Jan * Parameters to `configure`: MINGW_CHOST=x86_64-w64-mingw32 MINGW_PREFIX=/c/msys64/mingw64 ./configure \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ --target=${MINGW_CHOST} \ --prefix=${MINGW_PREFIX} \ --enable-targets="i686-w64-mingw32,x86_64-w64-mingw32" \ --enable-64-bit-bfd \ --disable-werror \ --disable-win32-registry \ --disable-rpath \ --with-system-gdbinit=${MINGW_PREFIX}/etc/gdbinit \ --with-python=${MINGW_PREFIX}/bin/python-config-u.sh \ --with-expat \ --with-libiconv-prefix=${MINGW_PREFIX} \ --with-zlib \ --with-lzma \ --with-system-readline \ --enable-tui * GCC version: > x86_64-w64-mingw32-g++ --version x86_64-w64-mingw32-g++ (Rev3, Built by MSYS2 project) 6.3.0 Copyright (C) 2016 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * Master: commit b9671caf8fe1abd737846edf7dcd627870f986cc (handle_general_set: Remove useless xstrdup) --- x86_64-w64-mingw32-g++ -x c++ -g -O2 -I. -I../../gdb -I../../gdb/common -I../../gdb/config -DLOCALEDIR="\"/c/msys64/mingw64/ share/locale\"" -DHAVE_CONFIG_H -I../../gdb/../include/opcode -I../../gdb/../opcodes/.. -I../../gdb/../zlib -I../bfd -I../../g db/../bfd -I../../gdb/../include -I../libdecnumber -I../../gdb/../libdecnumber -I../../gdb/gnulib/import -Ibuild- gnulib/import -DTUI=1 -I/c/msys64/mingw64/include -DMS_WIN64 - I/mingw64/include/python2.7 -Wall -Wpointer-arith -Wno-unused -Wunused- val ue -Wunused-function -Wno-switch -Wno-char-subscripts -Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable -Wno-si gn-compare -Wno-narrowing -Wno-error=maybe-uninitialized -Wno-format - c -o arch/i386.o -MT arch/i386.o -MMD -MP -MF arch/.deps /i386.Tpo ../../gdb/arch/i386.c In file included from C:/msys64/mingw64/include/c++/6.3.0/cwchar:44:0, from C:/msys64/mingw64/include/c++/6.3.0/bits/postypes.h:40, from C:/msys64/mingw64/include/c++/6.3.0/bits/char_traits.h:40, from C:/msys64/mingw64/include/c++/6.3.0/string:40, from ../../gdb/common/common- utils.h:23, from ../../gdb/common/common- defs.h:78, from ../../gdb/arch/i386.c:18: C:/msys64/mingw64/include/c++/6.3.0/cwchar:139:11: error: expected unqualified-id before 'int' using ::wint_t; ^ C:/msys64/mingw64/include/c++/6.3.0/cwchar:139:11: error: expected ';' before 'int' C:/msys64/mingw64/include/c++/6.3.0/cwchar:139:11: error: declaration does not declare anything [-fpermissive] In file included from ../../gdb/common/gdb_unique_ptr.h:23:0, from ../../gdb/common/common- defs.h:92, from ../../gdb/arch/i386.c:18: C:/msys64/mingw64/include/c++/6.3.0/memory: In function 'void* std::align(std::size_t, std::size_t, void*&, std::size_t&)': C:/msys64/mingw64/include/c++/6.3.0/memory:117:58: error: cast from 'void*' to 'gl_uintptr_t {aka long unsigned int}' loses pre cision [- fpermissive] const auto __intptr = reinterpret_cast(__ptr); ^ make[2]: *** [Makefile:1600: arch/i386.o] Error 1 make[2]: *** Waiting for unfinished jobs.... In file included from C:/msys64/mingw64/include/c++/6.3.0/cwchar:44:0, from C:/msys64/mingw64/include/c++/6.3.0/bits/postypes.h:40, from C:/msys64/mingw64/include/c++/6.3.0/bits/char_traits.h:40, from C:/msys64/mingw64/include/c++/6.3.0/string:40, from ../../gdb/common/common- utils.h:23, from ../../gdb/common/common- defs.h:78, from ../../gdb/defs.h:28, from ../../gdb/gdb.c:19: C:/msys64/mingw64/include/c++/6.3.0/cwchar:139:11: error: expected unqualified-id before 'int' using ::wint_t; ^ C:/msys64/mingw64/include/c++/6.3.0/cwchar:139:11: error: expected ';' before 'int' C:/msys64/mingw64/include/c++/6.3.0/cwchar:139:11: error: declaration does not declare anything [-fpermissive] In file included from ../../gdb/common/gdb_unique_ptr.h:23:0, from ../../gdb/common/common- defs.h:92, from ../../gdb/defs.h:28, from ../../gdb/gdb.c:19: C:/msys64/mingw64/include/c++/6.3.0/memory: In function 'void* std::align(std::size_t, std::size_t, void*&, std::size_t&)': C:/msys64/mingw64/include/c++/6.3.0/memory:117:58: error: cast from 'void*' to 'gl_uintptr_t {aka long unsigned int}' loses pre cision [- fpermissive] const auto __intptr = reinterpret_cast(__ptr); ^ make[2]: *** [Makefile:1600: gdb.o] Error 1 In file included from C:/msys64/mingw64/include/c++/6.3.0/cwchar:44:0, from C:/msys64/mingw64/include/c++/6.3.0/bits/postypes.h:40, from C:/msys64/mingw64/include/c++/6.3.0/bits/char_traits.h:40, from C:/msys64/mingw64/include/c++/6.3.0/string:40, from ../../gdb/common/common- utils.h:23, from ../../gdb/common/common- defs.h:78, from ../../gdb/defs.h:28, from ../../gdb/i386- tdep.c:20: C:/msys64/mingw64/include/c++/6.3.0/cwchar:139:11: error: expected unqualified-id before 'int' using ::wint_t; ^ C:/msys64/mingw64/include/c++/6.3.0/cwchar:139:11: error: expected ';' before 'int' C:/msys64/mingw64/include/c++/6.3.0/cwchar:139:11: error: declaration does not declare anything [-fpermissive] In file included from ../../gdb/common/gdb_unique_ptr.h:23:0, from ../../gdb/common/common- defs.h:92, from ../../gdb/defs.h:28, from ../../gdb/i386- tdep.c:20: C:/msys64/mingw64/include/c++/6.3.0/memory: In function 'void* std::align(std::size_t, std::size_t, void*&, std::size_t&)': C:/msys64/mingw64/include/c++/6.3.0/memory:117:58: error: cast from 'void*' to 'gl_uintptr_t {aka long unsigned int}' loses pre cision [- fpermissive] const auto __intptr = reinterpret_cast(__ptr); ^ make[2]: *** [Makefile:1600: i386-tdep.o] Error 1 make[2]: Leaving directory '/h/Projects/gdb/sources_win/build-x86_64- w64-mingw32/gdb' make[1]: *** [Makefile:10428: all-gdb] Error 2 make[1]: Leaving directory '/h/Projects/gdb/sources_win/build-x86_64- w64-mingw32' make: *** [Makefile:857: all] Error 2 jv@WIN7 H:\Projects\gdb --- * First bad revision: commit da804164742b83965b487bbff5b6334f2e63fe91 (Introduce gdb::unique_ptr) --- x86_64-w64-mingw32-g++ -g -O2 -I. -I../../gdb -I../../gdb/common -I../../gdb/config -DLOCALEDIR="\"/c/msys64/mingw64/share/locale\"" -DHAVE_CONFIG_H -I../../gdb/../include/opcode -I../../gdb/../opcodes/.. -I../../gdb/../zlib -I../bfd -I../../gdb/../bfd -I../../gdb/../include -I../libdecnumber -I../../gdb/../libdecnumber -I../../gdb/gnulib/import -Ibuild- gnulib/import -DTUI=1 -I/c/msys64/mingw64/include -DMS_WIN64 - I/mingw64/include/python2.7 -Wall -Wpointer-arith -Wno-unused -Wunused- value -Wunused-function -Wno-switch -Wno-char-subscripts -Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable -Wno-sign-compare -Wno-write-strings -Wno-narrowing -Wno-format -c -o amd64-windows- tdep.o -MT amd64-windows-tdep.o -MMD -MP -MF .deps/amd64-windows- tdep.Tpo ../../gdb/amd64-windows-tdep.c In file included from C:/msys64/mingw64/include/c++/6.3.0/cwchar:44:0, from C:/msys64/mingw64/include/c++/6.3.0/bits/postypes.h:40, from C:/msys64/mingw64/include/c++/6.3.0/iosfwd:40, from C:/msys64/mingw64/include/c++/6.3.0/memory:72, from ../../gdb/common/gdb_unique_ptr.h:77, from ../../gdb/common/common-defs.h:86, from ../../gdb/defs.h:28, from ../../gdb/gdb.c:19: C:/msys64/mingw64/include/c++/6.3.0/cwchar:139:11: error: expected unqualified-id before 'int' using ::wint_t; ^ C:/msys64/mingw64/include/c++/6.3.0/cwchar:139:11: error: expected ';' before 'int' C:/msys64/mingw64/include/c++/6.3.0/cwchar:139:11: error: declaration does not declare anything [-fpermissive] In file included from ../../gdb/common/gdb_unique_ptr.h:77:0, from ../../gdb/common/common-defs.h:86, from ../../gdb/defs.h:28, from ../../gdb/gdb.c:19: C:/msys64/mingw64/include/c++/6.3.0/memory: In function 'void* std::align(std::size_t, std::size_t, void*&, std::size_t&)': C:/msys64/mingw64/include/c++/6.3.0/memory:117:58: error: cast from 'void*' to 'gl_uintptr_t {aka long unsigned int}' loses precision [- fpermissive] const auto __intptr = reinterpret_cast(__ptr); ^ make[2]: *** [Makefile:1124: gdb.o] Error 1 make[2]: *** Waiting for unfinished jobs.... In file included from C:/msys64/mingw64/include/c++/6.3.0/cwchar:44:0, from C:/msys64/mingw64/include/c++/6.3.0/bits/postypes.h:40, from C:/msys64/mingw64/include/c++/6.3.0/iosfwd:40, from C:/msys64/mingw64/include/c++/6.3.0/memory:72, from ../../gdb/common/gdb_unique_ptr.h:77, from ../../gdb/common/common-defs.h:86, from ../../gdb/defs.h:28, from ../../gdb/amd64-windows-tdep.c:18: C:/msys64/mingw64/include/c++/6.3.0/cwchar:139:11: error: expected unqualified-id before 'int' using ::wint_t; ^ C:/msys64/mingw64/include/c++/6.3.0/cwchar:139:11: error: expected ';' before 'int' C:/msys64/mingw64/include/c++/6.3.0/cwchar:139:11: error: declaration does not declare anything [-fpermissive] In file included from ../../gdb/common/gdb_unique_ptr.h:77:0, from ../../gdb/common/common-defs.h:86, from ../../gdb/defs.h:28, from ../../gdb/amd64-windows-tdep.c:18: C:/msys64/mingw64/include/c++/6.3.0/memory: In function 'void* std::align(std::size_t, std::size_t, void*&, std::size_t&)': C:/msys64/mingw64/include/c++/6.3.0/memory:117:58: error: cast from 'void*' to 'gl_uintptr_t {aka long unsigned int}' loses precision [- fpermissive] const auto __intptr = reinterpret_cast(__ptr); ^ make[2]: *** [Makefile:1124: amd64-windows-tdep.o] Error 1 In file included from C:/msys64/mingw64/include/c++/6.3.0/cwchar:44:0, from C:/msys64/mingw64/include/c++/6.3.0/bits/postypes.h:40, from C:/msys64/mingw64/include/c++/6.3.0/iosfwd:40, from C:/msys64/mingw64/include/c++/6.3.0/memory:72, from ../../gdb/common/gdb_unique_ptr.h:77, from ../../gdb/common/common-defs.h:86, from ../../gdb/defs.h:28, from ../../gdb/amd64-tdep.c:22: C:/msys64/mingw64/include/c++/6.3.0/cwchar:139:11: error: expected unqualified-id before 'int' using ::wint_t; ^ C:/msys64/mingw64/include/c++/6.3.0/cwchar:139:11: error: expected ';' before 'int' C:/msys64/mingw64/include/c++/6.3.0/cwchar:139:11: error: declaration does not declare anything [-fpermissive] In file included from ../../gdb/common/gdb_unique_ptr.h:77:0, from ../../gdb/common/common-defs.h:86, from ../../gdb/defs.h:28, from ../../gdb/amd64-tdep.c:22: C:/msys64/mingw64/include/c++/6.3.0/memory: In function 'void* std::align(std::size_t, std::size_t, void*&, std::size_t&)': C:/msys64/mingw64/include/c++/6.3.0/memory:117:58: error: cast from 'void*' to 'gl_uintptr_t {aka long unsigned int}' loses precision [- fpermissive] const auto __intptr = reinterpret_cast(__ptr); ^ make[2]: *** [Makefile:1124: amd64-tdep.o] Error 1 make[2]: Leaving directory '/h/Projects/gdb/sources_win/build-x86_64- w64-mingw32/gdb' make[1]: *** [Makefile:10463: all-gdb] Error 2 make[1]: Leaving directory '/h/Projects/gdb/sources_win/build-x86_64- w64-mingw32' make: *** [Makefile:858: all] Error 2 jv@WIN7 H:\Projects\gdb --- * Last good revision: commit b928b56ea67da30216b79abd6a87ffda99fc911d (HEAD, refs/bisect/good-b928b56ea67da30216b79abd6a87ffda99fc911d) Fails to compie: --- x86_64-w64-mingw32-g++ -g -O2 -I. -I../../gdb -I../../gdb/common -I../../gdb/config -DLOCALEDIR="\"/c/msys64/mingw64/share/locale\"" -DHAVE_CONFIG_H -I../../gdb/../include/opcode -I../../gdb/../opcodes/.. -I../../gdb/../zlib -I../bfd -I../../gdb/../bfd -I../../gdb/../include -I../libdecnumber -I../../gdb/../libdecnumber -I../../gdb/gnulib/import -Ibuild- gnulib/import -DTUI=1 -I/c/msys64/mingw64/include -DMS_WIN64 - I/mingw64/include/python2.7 -Wall -Wpointer-arith -Wno-unused -Wunused- value -Wunused-function -Wno-switch -Wno-char-subscripts -Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable -Wno-sign-compare -Wno-write-strings -Wno-narrowing -Wno-format -c -o x86-dregs.o -MT x86-dregs.o -MMD -MP -MF .deps/x86-dregs.Tpo ../../gdb/nat/x86-dregs.c x86_64-w64-mingw32-g++ -g -O2 -I. -I../../gdb -I../../gdb/common -I../../gdb/config -DLOCALEDIR="\"/c/msys64/mingw64/share/locale\"" -DHAVE_CONFIG_H -I../../gdb/../include/opcode -I../../gdb/../opcodes/.. -I../../gdb/../zlib -I../bfd -I../../gdb/../bfd -I../../gdb/../include -I../libdecnumber -I../../gdb/../libdecnumber -I../../gdb/gnulib/import -Ibuild- gnulib/import -DTUI=1 -I/c/msys64/mingw64/include -DMS_WIN64 - I/mingw64/include/python2.7 -Wall -Wpointer-arith -Wno-unused -Wunused- value -Wunused-function -Wno-switch -Wno-char-subscripts -Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable -Wno-sign-compare -Wno-write-strings -Wno-narrowing -Wno-format -c -o windows-nat.o -MT windows-nat.o -MMD -MP -MF .deps/windows-nat.Tpo ../../gdb/windows- nat.c ../../gdb/ser-mingw.c: In function 'int ser_windows_open(serial*, const char*)': ../../gdb/ser-mingw.c:67:41: error: cast from 'HANDLE {aka void*}' to 'gl_intptr_t {aka long int}' loses precision [-fpermissive] scb->fd = _open_osfhandle ((intptr_t) h, O_RDWR); ^ ../../gdb/ser-mingw.c: In function 'int ser_windows_drain_output(serial*)': ../../gdb/ser-mingw.c:109:46: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] HANDLE h = (HANDLE) _get_osfhandle (scb->fd); ^ ../../gdb/ser-mingw.c: In function 'int ser_windows_flush_output(serial*)': ../../gdb/ser-mingw.c:117:46: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] HANDLE h = (HANDLE) _get_osfhandle (scb->fd); ^ ../../gdb/ser-mingw.c: In function 'int ser_windows_flush_input(serial*)': ../../gdb/ser-mingw.c:125:46: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] HANDLE h = (HANDLE) _get_osfhandle (scb->fd); ^ ../../gdb/ser-mingw.c: In function 'int ser_windows_send_break(serial*)': ../../gdb/ser-mingw.c:133:46: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] HANDLE h = (HANDLE) _get_osfhandle (scb->fd); ^ ../../gdb/ser-mingw.c: In function 'void ser_windows_raw(serial*)': ../../gdb/ser-mingw.c:150:46: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] HANDLE h = (HANDLE) _get_osfhandle (scb->fd); ^ ../../gdb/ser-mingw.c: In function 'int ser_windows_setstopbits(serial*, int)': ../../gdb/ser-mingw.c:175:46: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] HANDLE h = (HANDLE) _get_osfhandle (scb->fd); ^ ../../gdb/ser-mingw.c: In function 'int ser_windows_setparity(serial*, int)': ../../gdb/ser-mingw.c:204:46: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] HANDLE h = (HANDLE) _get_osfhandle (scb->fd); ^ ../../gdb/ser-mingw.c: In function 'int ser_windows_setbaudrate(serial*, int)': ../../gdb/ser-mingw.c:236:46: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] HANDLE h = (HANDLE) _get_osfhandle (scb->fd); ^ ../../gdb/ser-mingw.c: In function 'void ser_windows_close(serial*)': ../../gdb/ser-mingw.c:257:47: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] CancelIo ((HANDLE) _get_osfhandle (scb->fd)); ^ ../../gdb/ser-mingw.c: In function 'void ser_windows_wait_handle(serial*, void**, void**)': ../../gdb/ser-mingw.c:277:46: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] HANDLE h = (HANDLE) _get_osfhandle (scb->fd); ^ ../../gdb/ser-mingw.c: In function 'int ser_windows_read_prim(serial*, size_t)': ../../gdb/ser-mingw.c:342:39: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] h = (HANDLE) _get_osfhandle (scb->fd); ^ ../../gdb/ser-mingw.c: In function 'int ser_windows_write_prim(serial*, const void*, size_t)': ../../gdb/ser-mingw.c:365:39: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] h = (HANDLE) _get_osfhandle (scb->fd); ^ ../../gdb/ser-mingw.c: In function 'DWORD console_select_thread(void*)': ../../gdb/ser-mingw.c:542:39: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] h = (HANDLE) _get_osfhandle (scb->fd); ^ ../../gdb/ser-mingw.c: In function 'int fd_is_pipe(int)': ../../gdb/ser-mingw.c:621:49: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] if (PeekNamedPipe ((HANDLE) _get_osfhandle (fd), NULL, 0, NULL, NULL, NULL)) ^ ../../gdb/ser-mingw.c: In function 'int fd_is_file(int)': ../../gdb/ser-mingw.c:630:47: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] if (GetFileType ((HANDLE) _get_osfhandle (fd)) == FILE_TYPE_DISK) ^ ../../gdb/ser-mingw.c: In function 'DWORD pipe_select_thread(void*)': ../../gdb/ser-mingw.c:645:39: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] h = (HANDLE) _get_osfhandle (scb->fd); ^ ../../gdb/ser-mingw.c: In function 'DWORD file_select_thread(void*)': ../../gdb/ser-mingw.c:688:39: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] h = (HANDLE) _get_osfhandle (scb->fd); ^ ../../gdb/ser-mingw.c: In function 'int pipe_windows_read(serial*, size_t)': ../../gdb/ser-mingw.c:974:57: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] HANDLE pipeline_out = (HANDLE) _get_osfhandle (scb->fd); ^ ../../gdb/ser-mingw.c: In function 'int pipe_windows_write(serial*, const void*, size_t)': ../../gdb/ser-mingw.c:1005:56: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] pipeline_in = (HANDLE) _get_osfhandle (pipeline_in_fd); ^ ../../gdb/ser-mingw.c: In function 'int pipe_avail(serial*, int)': ../../gdb/ser-mingw.c:1052:41: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] HANDLE h = (HANDLE) _get_osfhandle (fd); ^ make[2]: *** [Makefile:1124: ser-mingw.o] Error 1 make[2]: *** Waiting for unfinished jobs.... ../../gdb/windows-nat.c: In function 'windows_thread_info* windows_add_thread(ptid_t, HANDLE, void*)': ../../gdb/windows-nat.c:390:51: error: cast from 'void*' to 'gl_uintptr_t {aka long unsigned int}' loses precision [-fpermissive] th->thread_local_base = (CORE_ADDR) (uintptr_t) tlb; ^~~ ../../gdb/windows-nat.c: In function 'void signal_event_command(char*, int)': ../../gdb/windows-nat.c:855:17: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] ((HANDLE) event_id == INVALID_HANDLE_VALUE)) ^~~~~~~~ ../../gdb/windows-nat.c:858:22: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] SetEvent ((HANDLE) event_id); ^~~~~~~~ ../../gdb/windows-nat.c:859:25: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] CloseHandle ((HANDLE) event_id); ^~~~~~~~ ../../gdb/windows-nat.c: In function 'int handle_output_debug_string(target_waitstatus*)': ../../gdb/windows-nat.c:872:55: error: cast from 'LPSTR {aka char*}' to 'gl_uintptr_t {aka long unsigned int}' loses precision [-fpermissive] ((CORE_ADDR) (uintptr_t) current_event.u.DebugString.lpDebugStringData, ^~~~~~~~~~~~~~~~ ~ ../../gdb/windows-nat.c: In function 'target_xfer_status windows_xfer_memory(gdb_byte*, const gdb_byte*, ULONGEST, ULONGEST, ULONGEST*)': ../../gdb/windows-nat.c:2428:30: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] (LPVOID) (uintptr_t) memaddr, writebuf, ^~~~~~~ ../../gdb/windows-nat.c:2433:31: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] (LPCVOID) (uintptr_t) memaddr, len); ^~~~~~~ ../../gdb/windows-nat.c:2440:30: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] (LPCVOID) (uintptr_t) memaddr, readbuf, ^~~~~~~ ../../gdb/windows-nat.c: In function 'target_xfer_status windows_xfer_shared_libraries(target_ops*, target_object, const char*, gdb_byte*, const gdb_byte*, ULONGEST, ULONGEST, ULONGEST*)': ../../gdb/windows-nat.c:2512:31: error: cast from 'LPVOID {aka void*}' to 'gl_uintptr_t {aka long unsigned int}' loses precision [- fpermissive] (uintptr_t) so->lm_info->load_addr, ^~~~~~~~~ make[2]: *** [Makefile:1124: windows-nat.o] Error 1 make[2]: Leaving directory '/h/Projects/gdb/sources_win/build-x86_64- w64-mingw32/gdb' make[1]: *** [Makefile:10463: all-gdb] Error 2 make[1]: Leaving directory '/h/Projects/gdb/sources_win/build-x86_64- w64-mingw32' make: *** [Makefile:858: all] Error 2 jv@WIN7 H:\Projects\gdb ---