diff options
author | Blue Swirl <blauwirbel@gmail.com> | 2010-09-19 08:36:34 +0000 |
---|---|---|
committer | Blue Swirl <blauwirbel@gmail.com> | 2010-09-19 08:36:34 +0000 |
commit | 952afb719f3c965bae12b5bd5f0f0f7ed0251cb8 (patch) | |
tree | 7ea3616dc6539f17caaad69da7273de9fb606057 /configure | |
parent | ebab1720f6998dbd4a0c485eacf0cb542492be87 (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>
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -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= |