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

Eli Zaretskii
2019-12-18T19:40:38Z

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

OK, so what I've read _was_ indeed outdated.

> But I'm not sure that for cygwin this matters as much anyway.

Neither am I.

> (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?