From: "Christian Biesinger via gdb-patches" <gdb-patches@sourceware.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH] Link to -lssp when available (fixes mingw build)
Date: Wed, 18 Dec 2019 18:57:00 -0000 [thread overview]
Message-ID: <CAPTJ0XHS3mhnBzUmN0X1wJZMH69V_aQQPH7Trxf9TnQMfgH0ng@mail.gmail.com> (raw)
In-Reply-To: <83h81x323k.fsf@gnu.org>
On Wed, Dec 18, 2019 at 12:44 PM Eli Zaretskii <eliz@gnu.org> wrote:
>
> > Date: Wed, 18 Dec 2019 12:14:13 -0600
> > From: "Christian Biesinger via gdb-patches" <gdb-patches@sourceware.org>
> > Cc: Christian Biesinger <cbiesinger@google.com>
> >
> > Recent mingw versions require -lssp when using _FORTIFY_SOURCE, which
> > gdb does (in common-defs.h)
> > https://github.com/msys2/MINGW-packages/issues/5868#issuecomment-544107564
> >
> > gdb/ChangeLog:
> >
> > 2019-12-18 Christian Biesinger <cbiesinger@google.com>
> >
> > * configure: Regenerate.
> > * gdbsupport/common.m4: Look for -lssp to fix mingw.
>
> This will produce a GDB binary that requires libssp-0.dll to be
> present to run, won't it? And since libssp-0.dll is part of GCC,
> this will have 2 annoying effects:
>
> . we could be in "DLL hell" if there's an incompatibility between
> libssp against which GDB was linkes and the one actually installed
> on the system where we run GDB;
>
> . if someone wants to distribute MinGW binaries of GDB, they will
> have to distribute the GCC sources as well, since DLLs cannot
> enjoy the libgcc-type exception
That's a good point, I did not think of that.
> 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.
Christian
next prev parent reply other threads:[~2019-12-18 18:57 UTC|newest]
Thread overview: 24+ 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 [this message]
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
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
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=CAPTJ0XHS3mhnBzUmN0X1wJZMH69V_aQQPH7Trxf9TnQMfgH0ng@mail.gmail.com \
--to=gdb-patches@sourceware.org \
--cc=cbiesinger@google.com \
--cc=eliz@gnu.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