From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 72715 invoked by alias); 18 Dec 2019 19:12:50 -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 72706 invoked by uid 89); 18 Dec 2019 19:12:50 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-15.8 required=5.0 tests=AWL,BAYES_00,ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,RCVD_IN_JMF_BL,SPF_PASS,USER_IN_DEF_SPF_WL autolearn=no version=3.3.1 spammy=H*RU:209.85.167.193, HX-Spam-Relays-External:209.85.167.193 X-HELO: mail-oi1-f193.google.com Received: from mail-oi1-f193.google.com (HELO mail-oi1-f193.google.com) (209.85.167.193) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 18 Dec 2019 19:12:48 +0000 Received: by mail-oi1-f193.google.com with SMTP id a67so1688617oib.6 for ; Wed, 18 Dec 2019 11:12:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=J3NShxo4SBpS8t2fnyMmnSNMsfAAhGeMEuTLj9vaW1k=; b=CnNU8G1X2mAr8IPhiMnGShcGiiIfSRNkNjhs/G6rs5HXuIRXEvYzQFEzNK2BmWwNDY RYbgMnG5xLC/oDSVYUSbPO5oA3DqiYPLy/iMfCatFCwcgjoi02JDEoZL72b7LkxYf13j GADeVZgPKKFdRvUUpCTwPZsWSSpoGZOwQmESdTV+pCJMxiqFj1a2F6LhzSKpjKxGQUhI XQHGfsquhipcuRi9dhu6rJH4dp7Ja8BdfM+3Cgu9a036X3/00m8xEyNO4WGmy3Nq64w+ TpfZOkFHJWYjov/NNzaFspTESgHTz84WxeCFEXfB9yiR+6xdy188WCV7al4Gs82CPAN4 zIkA== MIME-Version: 1.0 References: <20191218181413.128412-1-cbiesinger@google.com> <83h81x323k.fsf@gnu.org> <83fthh310d.fsf@gnu.org> In-Reply-To: <83fthh310d.fsf@gnu.org> From: "Christian Biesinger via gdb-patches" Reply-To: Christian Biesinger Date: Wed, 18 Dec 2019 19:12:00 -0000 Message-ID: Subject: Re: [PATCH] Link to -lssp when available (fixes mingw build) To: Eli Zaretskii Cc: gdb-patches Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2019-12/txt/msg00789.txt.bz2 On Wed, Dec 18, 2019 at 1:08 PM Eli Zaretskii wrote: > > > From: Christian Biesinger > > Date: Wed, 18 Dec 2019 12:56:26 -0600 > > Cc: gdb-patches > > > > > Is there a way to link against libssp.a statically? If so, it would > > > be better to do that. Failing that, I'd recommend not to define > > > _FORTIFY_SOURCE in MinGW builds, because the above annoyances IMO > > > outweigh its utility. > > > > Looks like the way to do that would be -Wl,-Bstatic -lssp -Wl,-Bdynamic > > > > However, I'm not sure that all the required autoconf changes are worth > > it at this point, and maybe we should just not define _FORTIFY_SOURCE > > on mingw? I'll send a patch for that shortly. > > Thanks, I think it's a good solution for one more reason: searching > the Internet for related issues suggests that Cygwin doesn't package a > static libssp library, so a static link against that might be > impossible for a Cygwin build of GDB. (Please take that with a grain > of salt, as I don't use Cygwin and know very little about it; what > I've read on the Internet might be outdated.) My cygwin installation does have a static ssp: /usr/lib/gcc/i586-pc-msdosdjgpp/5.4.0/libssp.a /usr/lib/gcc/i586-pc-msdosdjgpp/5.4.0/libssp_nonshared.a /usr/lib/gcc/i686-w64-mingw32/7.4.0/libssp.a /usr/lib/gcc/i686-w64-mingw32/7.4.0/libssp.dll.a /usr/lib/gcc/i686-w64-mingw32/7.4.0/libssp_nonshared.a /usr/lib/gcc/x86_64-w64-mingw32/7.4.0/libssp.a /usr/lib/gcc/x86_64-w64-mingw32/7.4.0/libssp.dll.a /usr/lib/gcc/x86_64-w64-mingw32/7.4.0/libssp_nonshared.a /usr/lib/libssp.a But I'm not sure that for cygwin this matters as much anyway. (If libssp_nonshared.a existed on my "native" mingw that would be great, but sadly it doesn't...) Christian