HomePhabricator

[CMAKE] Add PIC/PIE flags on non Windows platforms

Description

[CMAKE] Add PIC/PIE flags on non Windows platforms

Summary:
This diffs adds the -fPIC and -fPIE compiler flags, as well as the
-pie compiler flag.

Test Plan:

mkdir buildcmake && cd buildcmake
cmake -GNinja ..
ninja
../contrib/devtools/security-check.py src/bitcoind

Before the patch, the output would contain PIE, no longer after the
patch.

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Subscribers: teamcity, schancel

Differential Revision: https://reviews.bitcoinabc.org/D2640