]> git.sesse.net Git - x264/commitdiff
Windows: Enable DEP and ASLR
authorHenrik Gramner <henrik@gramner.com>
Sun, 20 Jan 2013 18:35:06 +0000 (19:35 +0100)
committerFiona Glaser <fiona@x264.com>
Mon, 25 Feb 2013 20:14:33 +0000 (12:14 -0800)
configure

index cb8f66940491acda0a807383a596957d7f647f10..4d663aaf04ea7d1bcc0efdabb0e22cd3b7578259 100755 (executable)
--- a/configure
+++ b/configure
@@ -564,6 +564,7 @@ case $host_cpu in
         elif [ "$SYS" = WINDOWS -o "$SYS" = CYGWIN ]; then
             ASFLAGS="$ASFLAGS -f win32 -DPREFIX"
             LDFLAGS="$LDFLAGS -Wl,--large-address-aware"
+            [ $compiler = GNU ] && LDFLAGS="$LDFLAGS -Wl,--nxcompat -Wl,--dynamicbase"
             [ $compiler = GNU ] && RCFLAGS="--target=pe-i386 $RCFLAGS"
         else
             ASFLAGS="$ASFLAGS -f elf"
@@ -583,6 +584,7 @@ case $host_cpu in
             ASFLAGS="$ASFLAGS -f win32 -m amd64"
             # only the GNU toolchain is inconsistent in prefixing function names with _
             [ $compiler = GNU ] && cc_check "" "-S" && grep -q "_main:" conftest && ASFLAGS="$ASFLAGS -DPREFIX"
+            [ $compiler = GNU ] && LDFLAGS="$LDFLAGS -Wl,--nxcompat -Wl,--dynamicbase"
             [ $compiler = GNU ] && RCFLAGS="--target=pe-x86-64 $RCFLAGS"
         else
             ASFLAGS="$ASFLAGS -f elf -m amd64"