[autotools-build] Disable _FORTIFY_SOURCE when enable-debug
Summary:
Since enable-debug disables optimization entirely, _FORTIFY_SOURCE
does nothing as it requires some kind of optimization enabled. It
instead produces a bunch of useless warnings. So explicitly disable
it when enable-debug so that those warnings are not produced.
Backport of Core PR17033
Test Plan:
mkdir build-autotools ../autogen.sh ../configure --enable-deprecated-build-system --enable-debug
see that -U_FORTIFY_SOURCE and -D_FORTIFY_SOURCE=2 are absent from CXX flags, while
../configure --enable-deprecated-build-system
has them set
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Differential Revision: https://reviews.bitcoinabc.org/D6244