public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Christian Biesinger <cbiesinger@google.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] Link to -lssp when available (fixes mingw build)
Date: Wed, 18 Dec 2019 19:57:00 -0000	[thread overview]
Message-ID: <83d0cl2yqd.fsf@gnu.org> (raw)
In-Reply-To: <CAPTJ0XEsNSFwrrqeKD+6QFgUGESvduTdnmk00uKXScZVhtvR=g@mail.gmail.com>	(message from Christian Biesinger on Wed, 18 Dec 2019 13:50:00 -0600)

> From: Christian Biesinger <cbiesinger@google.com>
> Date: Wed, 18 Dec 2019 13:50:00 -0600
> Cc: gdb-patches <gdb-patches@sourceware.org>
> 
> 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

AFAIK, you need to link with -lssp_nonshared -lssp.  My GCC's specs
have this:

  *link_ssp:
  %{fstack-protector|fstack-protector-all|fstack-protector-strong|fstack-protector-explicit:-lssp_nonshared -lssp}

> 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.

I agree, FWIW.

  reply	other threads:[~2019-12-18 19:57 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-18 18:14 Christian Biesinger via gdb-patches
2019-12-18 18:23 ` Christian Biesinger via gdb-patches
2019-12-18 18:45 ` Eli Zaretskii
2019-12-18 18:57   ` Christian Biesinger via gdb-patches
2019-12-18 19:07     ` [PATCH v2] Don't define _FORTIFY_SOURCE on mingw Christian Biesinger via gdb-patches
2020-01-02 11:31       ` Joel Brobecker
2020-01-07 23:43         ` Christian Biesinger via gdb-patches
2020-01-08  3:30           ` Eli Zaretskii
2020-01-09 22:23           ` Tom Tromey
2020-01-09 22:32             ` Christian Biesinger via gdb-patches
2020-01-10  0:28               ` Tom Tromey
2020-01-10 17:41                 ` Christian Biesinger via gdb-patches
2019-12-18 19:08     ` [PATCH] Link to -lssp when available (fixes mingw build) Eli Zaretskii
2019-12-18 19:12       ` Christian Biesinger via gdb-patches
2019-12-18 19:40         ` Eli Zaretskii
2019-12-18 19:50           ` Christian Biesinger via gdb-patches
2019-12-18 19:57             ` Eli Zaretskii [this message]
2019-12-18 20:41               ` Christian Biesinger via gdb-patches
2019-12-18 23:12                 ` Eli Zaretskii
2019-12-18 23:24                   ` Christian Biesinger via gdb-patches
2019-12-19 14:19                     ` Pedro Alves
2019-12-19 15:49                       ` Eli Zaretskii
2020-02-15 14:06                         ` Eli Zaretskii
2019-12-19 20:41                       ` Christian Biesinger via gdb-patches
2019-12-19 15:32                     ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83d0cl2yqd.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=cbiesinger@google.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).