Skip to content

Commit c82f296

Browse files
authored
Harden build flags on *nix (#946)
Following Debian best practises. Full RELRO with: -fstack-protector-strong -D_FORTIFY_SOURCE=2
1 parent 2f06eda commit c82f296

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Config.pri

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,8 @@ msvc {
4444

4545
msvc:QMAKE_CXXFLAGS += /guard:cf
4646
msvc:QMAKE_LFLAGS += /guard:cf
47+
48+
unix:!macx {
49+
QMAKE_CXXFLAGS += -fstack-protector-strong -D_FORTIFY_SOURCE=2
50+
QMAKE_LFLAGS += -Wl,-z,relro -Wl,-z,now
51+
}

0 commit comments

Comments
 (0)