Subject: bug#37852: Build failure on MSYS2 (undefined reference to _chk functions)

From: Eli Zaretskii <[email-masked]>
Date: Mon, 21 Oct 2019 19:01:20 +0300

> From: Richard Copley <[email-masked]>
> Date: Mon, 21 Oct 2019 15:04:34 +0100
> Cc: [email-masked]
> 
>  or is this an option you
>  added manually?
> 
> No, I built in a clean checkout of master, with these commands:
> 
> ./autogen.sh
> ./configure --without-pop --without-dbus --without-gconf --without-gsettings "CFLAGS=-O2"
> make

Hmm... okay, could you please grep Makefiles in lib-src/ and src/, and
see if FORTIFY_SOURCE appears in any of them?  If not, I guess the
references to those _chk functions are coming from some libraries
linked into the programs we compile, and that probably means we need
to use -lssp for MinGW just in case?

Possibly relevant discussion:

  https://github.com/msys2/MINGW-packages/issues/5803