build: add -fstack-clash-protection to hardening flags
Summary:
This option causes the compiler to insert probes whenever stack space
is allocated statically or dynamically to reliably detect stack overflows
and thus mitigate the attack vector that relies on jumping over a stack
guard page as provided by the operating system.
This option is now enabled by default in Ubuntu GCC as of 19.10.
Available in GCC 8 and Clang 11.
This concludes backport of core#18921
https://github.com/bitcoin/bitcoin/pull/18921/commits/b536813cefc13f5c54a28a7c2fce8c69e89d6624
Depends on D14008
Test Plan: gitian builds and guix build
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Subscribers: Fabien
Differential Revision: https://reviews.bitcoinabc.org/D14013