From: Henrik Gramner Date: Sun, 20 Jan 2013 18:35:06 +0000 (+0100) Subject: Windows: Enable DEP and ASLR X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5e0fca86444840752eaedbdc5ebfe4ac0b3a0053;p=libx264 Windows: Enable DEP and ASLR --- diff --git a/configure b/configure index cb8f6694..4d663aaf 100755 --- 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"