From 27e58f826f95056d6abc5820266bcdb9fdc7632c Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Sat, 21 Jan 2017 14:55:53 +0000 Subject: [PATCH] Reinstate the ASLR and DEP linker flags on Windows. Originally added in commit 0014ffb70, and promptly reverted in 6bea4b250 when we realised that VS2003 didn't actually understand them. But now we're building with VS2015, which does understand them, it's actually useful to put them back in again. Looking more closely, it turns out that VS2003 didn't actually _fail to build_ if you passed these flags on the linker command line - it just printed a warning and ignored them. (So there was no actual need to revert the original change, except that it would have caused confusion.) But that means I can add them unconditionally now, without breaking even the legacy VS2003 build. --- mkfiles.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mkfiles.pl b/mkfiles.pl index 55ab7b30..3e42c734 100755 --- a/mkfiles.pl +++ b/mkfiles.pl @@ -646,7 +646,7 @@ if (defined $makefiles{'vc'}) { "CFLAGS = /nologo /W3 /O1 " . (join " ", map {"-I$dirpfx$_"} @srcdirs) . " /D_WINDOWS /D_WIN32_WINDOWS=0x500 /DWINVER=0x500 /D_CRT_SECURE_NO_WARNINGS\n". - "LFLAGS = /incremental:no /fixed\n". + "LFLAGS = /incremental:no /dynamicbase /nxcompat\n". "RCFLAGS = ".(join " ", map {"-I$dirpfx$_"} @srcdirs). " -DWIN32 -D_WIN32 -DWINVER=0x0400\n". "\n". -- 2.45.2