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

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

> Date: Mon, 21 Oct 2019 19:36:17 +0300
> From: Eli Zaretskii <[email-masked]>
> Cc: [email-masked]
> 
> > See GNULIB_PORTCHECK_FORTIFY_SOURCE in configure.ac - the relevant macro
> > is _FORTIFY_SOURCE.
> 
> Thanks, I indeed missed that.
> 
> > Building with -D_FORTIFY_SOURCE=0 also works, but your suggestion to add
> > the missing library is a better workaround than disabling the checks.

Btw, this sounds like a bug in MinGW64 headers: they shouldn't
generate references to the _chk functions without making sure,
e.g. via specs or somesuch, that libssp is linked against.  It's worth
reporting to the MSYS2 folks, I think.