aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBlue Swirl <blauwirbel@gmail.com>2010-09-19 08:36:34 +0000
committerBlue Swirl <blauwirbel@gmail.com>2010-09-19 08:36:34 +0000
commit952afb719f3c965bae12b5bd5f0f0f7ed0251cb8 (patch)
tree7ea3616dc6539f17caaad69da7273de9fb606057
parentebab1720f6998dbd4a0c485eacf0cb542492be87 (diff)
mingw: use ASLR, no-SEH and DEP if available
If the linker supports the flags --dynamicbase, --no-seh, or --nxcompat, use them. Tested on Windows Vista: Process Explorer reports that ASLR and DEP are in use. No effect seen on Wine or Windows XP. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
-rwxr-xr-xconfigure9
1 files changed, 9 insertions, 0 deletions
diff --git a/configure b/configure
index 232ba743ef..3bfc5e929b 100755
--- a/configure
+++ b/configure
@@ -2141,6 +2141,15 @@ if test "$solaris" = "no" ; then
fi
fi
+# Use ASLR, no-SEH and DEP if available
+if test "$mingw32" = "yes" ; then
+ for flag in --dynamicbase --no-seh --nxcompat; do
+ if $ld --help 2>/dev/null | grep ".$flag" >/dev/null 2>/dev/null ; then
+ LDFLAGS="-Wl,$flag $LDFLAGS"
+ fi
+ done
+fi
+
confdir=$sysconfdir$confsuffix
tools=