From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 114474 invoked by alias); 18 Dec 2019 19:50:40 -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 114463 invoked by uid 89); 18 Dec 2019 19:50:40 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-17.3 required=5.0 tests=AWL,BAYES_00,ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_PASS,USER_IN_DEF_SPF_WL autolearn=ham version=3.3.1 spammy=9.2.0 X-HELO: mail-oi1-f196.google.com Received: from mail-oi1-f196.google.com (HELO mail-oi1-f196.google.com) (209.85.167.196) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 18 Dec 2019 19:50:38 +0000 Received: by mail-oi1-f196.google.com with SMTP id c16so1779677oic.3 for ; Wed, 18 Dec 2019 11:50:38 -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=cXz/NP1MKzAhNRsc+qobTMc85ztFeG+Iv3q3UsCDUDY=; b=T0zTTSlUsaidzJAjYwRt6+Acs9u2B+oo4zQGzcsN6mFi03FhxdJ2r3pVTaP2FpiqdA 4PVK8vJyAkhJBUdD9ApDcjSq1lFw0+su4cDDyhEdxEdfavCRsq715FMVlrGDo8YMhbDS kNr3f2DfaXZKOvmYn5ukeAguFNoIMmTXIhAhVBAPt9HCJAgPbbkunzyGYkU6EltxFAR5 wo9Suo3Wv37uptNgfutpWaGo3MfweVe1FkRZQ85PAukwReWadoYoIxTCBFQaiDsV/uoB OFm3jK8oq5E6k4di+Y0VQ/8hkw3vy28HqS9StLEONyhf34bdHVdAd/wMD6R5HR5AYImC 1biQ== MIME-Version: 1.0 References: <20191218181413.128412-1-cbiesinger@google.com> <83h81x323k.fsf@gnu.org> <83fthh310d.fsf@gnu.org> <83eex12zj1.fsf@gnu.org> In-Reply-To: <83eex12zj1.fsf@gnu.org> From: "Christian Biesinger via gdb-patches" Reply-To: Christian Biesinger Date: Wed, 18 Dec 2019 19:50: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/msg00792.txt.bz2 On Wed, Dec 18, 2019 at 1:40 PM Eli Zaretskii wrote: > > > From: Christian Biesinger > > Date: Wed, 18 Dec 2019 13:12:10 -0600 > > Cc: gdb-patches > > (If libssp_nonshared.a existed on my "native" mingw that would be > > great, but sadly it doesn't...) > > Not sure I follow. I do have libssp_nonshared.a in my MinGW > installation, although it's mingw.org's MinGW, not MinGW64. But the > above list indicates you also have the nonshared version, no? Hmm, yeah, you are right. But it doesn't work! $ g++ test.cc -O2 -lssp_nonshared C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\msys64\tmp\ccmAuUCu.o:test.cc:(.text.startup+0x1f): undefined reference to `__strcpy_chk' collect2.exe: error: ld returned 1 exit status $ nm /mingw64/lib/gcc/x86_64-w64-mingw32/9.2.0/libssp_nonshared.a libssp_nonshared_la-ssp-local.o: 0000000000000000 b .bss 0000000000000000 d .data 0000000000000000 r .pdata 0000000000000000 r .rdata$zzz 0000000000000000 t .text 0000000000000000 r .xdata U __stack_chk_fail 0000000000000000 T __stack_chk_fail_local So I guess that's actually for something else? I think https://sourceware.org/ml/gdb-patches/2019-12/msg00787.html is the best option. Christian