HomePhabricator

[autotools-build] Disable _FORTIFY_SOURCE when enable-debug

Description

[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

Details

Provenance
Andrew Chow <achow101-github@achow101.com>Authored on Oct 2 2019, 23:52
majcostaCommitted on May 25 2020, 15:00
majcostaPushed on May 25 2020, 15:00
Reviewer
Restricted Project
Differential Revision
D6244: [autotools-build] Disable _FORTIFY_SOURCE when enable-debug
Parents
rABCea9e88b8c6fb: random: Remove remaining OpenSSL calls and locking infrastructure
Branches
Unknown
Tags
Unknown