diff --git a/plugins/Common/retroshare_plugin.pri b/plugins/Common/retroshare_plugin.pri index 52fc91dea..5030d6ee7 100644 --- a/plugins/Common/retroshare_plugin.pri +++ b/plugins/Common/retroshare_plugin.pri @@ -28,6 +28,14 @@ win32 { QMAKE_CFLAGS += -Wextra QMAKE_CXXFLAGS += -Wextra + CONFIG(debug, debug|release) { + } else { + # Tell linker to use ASLR protection + QMAKE_LFLAGS += -Wl,-dynamicbase + # Tell linker to use DEP protection + QMAKE_LFLAGS += -Wl,-nxcompat + } + # solve linker warnings because of the order of the libraries QMAKE_LFLAGS += -Wl,--start-group diff --git a/retroshare-gui/src/retroshare-gui.pro b/retroshare-gui/src/retroshare-gui.pro index 83a7ddd99..b561a119b 100644 --- a/retroshare-gui/src/retroshare-gui.pro +++ b/retroshare-gui/src/retroshare-gui.pro @@ -157,6 +157,14 @@ win32 { QMAKE_CFLAGS += -Wextra QMAKE_CXXFLAGS += -Wextra + CONFIG(debug, debug|release) { + } else { + # Tell linker to use ASLR protection + QMAKE_LFLAGS += -Wl,-dynamicbase + # Tell linker to use DEP protection + QMAKE_LFLAGS += -Wl,-nxcompat + } + # solve linker warnings because of the order of the libraries QMAKE_LFLAGS += -Wl,--start-group diff --git a/retroshare-nogui/src/retroshare-nogui.pro b/retroshare-nogui/src/retroshare-nogui.pro index d9fe77a1a..b3c2c0bd6 100644 --- a/retroshare-nogui/src/retroshare-nogui.pro +++ b/retroshare-nogui/src/retroshare-nogui.pro @@ -72,6 +72,14 @@ win32 { # solve linker warnings because of the order of the libraries QMAKE_LFLAGS += -Wl,--start-group + CONFIG(debug, debug|release) { + } else { + # Tell linker to use ASLR protection + QMAKE_LFLAGS += -Wl,-dynamicbase + # Tell linker to use DEP protection + QMAKE_LFLAGS += -Wl,-nxcompat + } + for(lib, LIB_DIR):LIBS += -L"$$lib" LIBS += -lssl -lcrypto -lpthread -lminiupnpc -lz LIBS += -lcrypto -lws2_32 -lgdi32