From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 52134 invoked by alias); 29 Aug 2018 08:04:27 -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 52122 invoked by uid 89); 29 Aug 2018 08:04:27 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mail-wm0-f48.google.com Received: from mail-wm0-f48.google.com (HELO mail-wm0-f48.google.com) (74.125.82.48) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 29 Aug 2018 08:04:25 +0000 Received: by mail-wm0-f48.google.com with SMTP id i134-v6so3802137wmf.0 for ; Wed, 29 Aug 2018 01:04:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:from:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=E5i/RU1QYTJe6ETmv8lC6BtaxcRxwSNQVEeZOhOWlgc=; b=lnVwxlKRFGCJ9L7TNyBZbCkBZ/XW/eN4Te7wLA4B5EbVqKsQox94HsM0oCcl+90pJJ gIopGS3QKQpKihXPHWeTiAcTvkOoa1IN6kLvqFjBhTOR6uAi/C4r8VVSVtIbctynqBGc DcYqBe9cleqNbfdnQzbkd/k5LMlwZ6qauY2OmjC1YGT/YXLaZlp7va7zBMrfo5AkikZA r4i92mWwk8bFTWA6skQd1oXynV3P5/x5GbxwA4lWkRAOGcEH+hH4XE/LkXzhwrpXt8xs Z1fjFj/qGSpYi+IpFgxx0QZpEuZDpEOOc1abMJQCT+R8Hld0rvgA4BcV4cSkmY22F9Bc nsXA== Return-Path: Received: from ?IPv6:2a01:e35:2eac:2a80:7c7d:2022:97ba:9bab? ([2a01:e35:2eac:2a80:7c7d:2022:97ba:9bab]) by smtp.gmail.com with ESMTPSA id 60-v6sm2743624wre.82.2018.08.29.01.04.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 29 Aug 2018 01:04:22 -0700 (PDT) Subject: Re: [PATCH][PR build/23568] Fix gdb-7.12.1 MinGW/MSYS build issue From: SiZiOUS To: Eli Zaretskii , Pedro Alves Cc: gdb-patches@sourceware.org References: <56c5911c-e0ba-5a17-64bb-3634af60a07d@gmail.com> <18eaf339-ca0a-061c-4a17-b837e6ef81a2@redhat.com> <83wosa2yos.fsf@gnu.org> <56153263-c5e6-45ce-8629-c5a77cf17f5b@gmail.com> Message-ID: Date: Wed, 29 Aug 2018 08:04:00 -0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.0 MIME-Version: 1.0 In-Reply-To: <56153263-c5e6-45ce-8629-c5a77cf17f5b@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-SW-Source: 2018-08/txt/msg00727.txt.bz2 Hi there, Just for your information, I tried to build gdb-8.1.1 under MinGW/MSYS and it doesn't work, due to a similar reason. I opened a bug: https://sourceware.org/bugzilla/show_bug.cgi?id=23583 Have a nice day. M. Laranjeira Le 29/08/2018 à 00:19, SiZiOUS a écrit : > Hello, > > Thank you very much for your interest to my patch. > > I'm using the MinGW/MSYS installer from the official SourceForge page: > https://sourceforge.net/projects/mingw/ > > Please note, I'm using the original MinGW/MSYS environment, not the > newer MinGW-w64/MSYS2 environment which is a completely new project, > with no links from the original one. > The problem for me with MinGW-w64/MSYS2 is they dropped Windows XP > support (and I understand that) but for my purpose I need XP support, > as I targetting an old exotic platform (Sega Dreamcast if you're > wondering), so I'm targetting GDB with sh-elf (fyi it's a Hitachi SH-4 > CPU). > > I did a new try on a completely fresh MinGW/MSYS installation just to > be sure: > > 1- Download "mingw-get-setup.exe" from > https://sourceforge.net/projects/mingw/ - it shows > v0.6.2-beta-20131004-1 (It's just the MinGW Installation Manager Setup > Tool version). > 2- Click Install. > 3- Install packages : mingw32-base, mingw32-gcc-g++, msys-base. GCC is > 6.3.0-1. > 4- Open MSYS Shell. > 5- Unpack gdb-7.12.1 in the home directory or somewhere else. > 6- Then execute the following command to launch the GDB build: > "configure --disable-werror --prefix=/opt/toolchains/dc/sh-elf > --target=sh-elf", followed by "make". > > If you not apply my patch, then you'll get the following error near > the build end: > > ser-mingw.c: In function 'int ser_windows_read_prim(serial*, size_t)': > ser-mingw.c:346:30: error: 'ERROR_IO_PENDING' was not declared in this > scope >        if (GetLastError () != ERROR_IO_PENDING >                               ^~~~~~~~~~~~~~~~ > ser-mingw.c: In function 'int ser_windows_write_prim(serial*, const > void*, size_t)': > ser-mingw.c:368:30: error: 'ERROR_IO_PENDING' was not declared in this > scope >        if (GetLastError () != ERROR_IO_PENDING >                               ^~~~~~~~~~~~~~~~ > make[2]: *** [ser-mingw.o] Error 1 > > I tried the latest 8.0 build but it doesn't compile too. > Anyway I'm sticking to the 7.x branch as the GDB 7.x is confirmed to > work with the Sega Dreamcast platform. > > And I know, the MinGW/MSYS original project is maintained but almost > deprecated in favour of MinGW-w64/MSYS2 project. But I really need XP > support for my needs. > I proposed this patch because it's really simple and not intrusive, > but you're right, how many people uses that old MinGW/MSYS project? > > Thank you for reading me in all the cases! > > BR, > SiZiOUS > > Le 28/08/2018 à 19:22, Eli Zaretskii a écrit : >>> From: Pedro Alves >>> Date: Tue, 28 Aug 2018 17:57:43 +0100 >>> >>> On 08/28/2018 01:01 PM, SiZiOUS wrote: >>>> This little patch was made to allow the compilation under the >>>> MinGW/MSYS legacy environment (I don't know for the newer >>>> MinGW-w64/MSYS2 environment!). >>>> If this patch is not applied, then the compilation of gdb-7.12.1 >>>> under MinGW/MSYS is impossible. >>> GDB 7.12 is old by now and not actively maintained. >>> >>> Can you check whether this is necessary on the master branch? >> AFAICS, we include winerror.h via serial.h, which includes winsock2.h, >> which includes winerror.h.  Older MinGW included that via the chain >> windows.h->windef.h->winnt.h. >> >> SiZiOUS, what version of the MinGW runtime are you using? >