Re: [PATCH v2] Don't define _FORTIFY_SOURCE on mingw

Eli Zaretskii
2020-01-08T03:30:28Z

> From: "Christian Biesinger via gdb-patches" <gdb-patches@sourceware.org>
> Date: Tue, 7 Jan 2020 17:42:55 -0600
> Cc: Christian Biesinger via gdb-patches <gdb-patches@sourceware.org>
>
> > I was also thinking of adding a NEWS entry. However, IIUC, this option
> > had no effect with previous versions of MinGW? Thus, in the end,
> > this patch makes the situation stay the same regardless of MinGW
> > version, meaning no NEWS updated needed.
>
> My understanding is that this did use to work (maybe it automatically
> linked against -lssp?). But I'm not sure a NEWS entry is needed? This
> does not seem user-visible.

I think it used to work because the MinGW GCC wasn't reacting to
_FORTIFY_SOURCE, so it was largely a no-op for MinGW. This changed in
a recent version of MinGW GCC.

I'm also not sure this should be in NEWS. It depends on how MinGW
users who build GDB are sensitive to _FORTIFY_SOURCE.