From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24280 invoked by alias); 26 Feb 2015 18:45:04 -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 24265 invoked by uid 89); 26 Feb 2015 18:45:04 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.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: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 26 Feb 2015 18:45:03 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t1QIiuIJ012059 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 26 Feb 2015 13:44:56 -0500 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t1QIisuT012931; Thu, 26 Feb 2015 13:44:55 -0500 Message-ID: <54EF69A5.3020902@redhat.com> Date: Thu, 26 Feb 2015 18:45:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Eli Zaretskii CC: bernd.edlinger@hotmail.de, gdb-patches@sourceware.org, dje@google.com, vapier@gentoo.org Subject: Re: [PATCH] Enable building GDB without installed libtermcap References: <54EB4FDF.1060909@redhat.com> <54EB513A.8050706@redhat.com> <54EF5C56.9010101@redhat.com> <83bnkg5z9q.fsf@gnu.org> In-Reply-To: <83bnkg5z9q.fsf@gnu.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2015-02/txt/msg00781.txt.bz2 On 02/26/2015 06:00 PM, Eli Zaretskii wrote: >> Date: Thu, 26 Feb 2015 17:48:06 +0000 >> From: Pedro Alves >> CC: GDB Patches , Doug Evans , Mike Frysinger >> >> My idea to work around that is to simply use __attribute__((weak)). >> Of all supported hosts >> (https://sourceware.org/gdb/wiki/Systems#Supported_Hosts), >> Windows/PE/COFF would be the one that I'd be worried about WRT use of >> weak, but the limited weak support in PE/COFF seems to work here. A >> cross build using x86_64-w64-mingw32 on Fedora 20 builds fine with >> this. > > With what version of GCC? Quick testing indicates that 4.8.1 supports > that, but 3.4.2 doesn't. Ah. This was: gcc version 4.8.3 20140522 (Fedora MinGW 4.8.3-1.fc20) (GCC) > > Which version of GCC is the minimal one we want to support? Hard to say at this point. I'd hope we'd move to requiring something more recent than 3.4.x. From past discussions, I was assuming we'd start by requiring 4.2 at least when finally require C++. > Or how about making this conditional on C++? Some want to build with -fno-common, even in C mode. Given that this stub file never needed these variables while it was Windows-only, how about we simply not define the variables if compiling for mingw/cygwin, but define them as weak everywhere else? The worse that can happen is some host that didn't use to build for lack of termcap will now fail to build due to lack of weak. In practical terms, you just end up with no gdb, just like before, so no worse. Thanks, Pedro Alves