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

From: Eli Zaretskii <[email-masked]>
Date: Tue, 22 Oct 2019 05:37:53 +0300

> Cc: [email-masked], Richard Copley <[email-masked]>
> From: Paul Eggert <[email-masked]>
> Date: Mon, 21 Oct 2019 17:40:12 -0700
> 
> I installed the attached patch, to cause the problem to occur only if 
> one configures explicitly with --enable-gcc-warnings. This should fix 
> the problem that Richard reported.

Thanks.

> I don't understand MSYS2 well enough to suggest fixes for Emacs, other 
> than "don't configure with --enable-gcc-warnings and don't compile with 
> _FORTIFY_SOURCE defined".

Should we perhaps test for -lssp, and if it is found, add it to the
link command when we define _FORTIFY_SOURCE?