aboutsummaryrefslogtreecommitdiff
path: root/bitcoin-qt.pro
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2012-10-25 01:07:19 -0700
committerWladimir J. van der Laan <laanwj@gmail.com>2012-10-25 01:07:19 -0700
commit2d53ba2c69f975a163d3332ff3879a40b1367b39 (patch)
tree1c5244be9c70c2b2621de9b0c4d8dfe83813d058 /bitcoin-qt.pro
parent55913c997112c78d6058edfa210b6275cde853a6 (diff)
parent493940038f44412ece135e1a625499ea89a93e56 (diff)
Merge pull request #1925 from Diapolo/gcc-hardening
GCC hardening for Bitcoin-Qt
Diffstat (limited to 'bitcoin-qt.pro')
-rw-r--r--bitcoin-qt.pro6
1 files changed, 4 insertions, 2 deletions
diff --git a/bitcoin-qt.pro b/bitcoin-qt.pro
index c38f265054..cd9755e8fa 100644
--- a/bitcoin-qt.pro
+++ b/bitcoin-qt.pro
@@ -33,11 +33,13 @@ contains(RELEASE, 1) {
!win32 {
# for extra security against potential buffer overflows: enable GCCs Stack Smashing Protection
-QMAKE_CXXFLAGS *= -fstack-protector-all --param ssp-buffer-size=1
-QMAKE_LFLAGS *= -fstack-protector-all --param ssp-buffer-size=1
+QMAKE_CXXFLAGS *= -fstack-protector-all
+QMAKE_LFLAGS *= -fstack-protector-all
# We need to exclude this for Windows cross compile with MinGW 4.2.x, as it will result in a non-working executable!
# This can be enabled for Windows, when we switch to MinGW >= 4.4.x.
}
+# for extra security (see: https://wiki.debian.org/Hardening)
+QMAKE_CXXFLAGS *= -D_FORTIFY_SOURCE=2 -Wl,-z,relro -Wl,-z,now
# for extra security on Windows: enable ASLR and DEP via GCC linker flags
win32:QMAKE_LFLAGS *= -Wl,--dynamicbase -Wl,--nxcompat