Re: [PATCH] Link to -lssp when available (fixes mingw build)

Eli Zaretskii
2019-12-18T19:08:33Z

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