소스 검색

Enable dynamicbase and nxcompat in Windows binaries

Nils Maier 11 년 전
부모
커밋
cb868b2baa
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  1. 3 0
      configure.ac

+ 3 - 0
configure.ac

@@ -32,6 +32,9 @@ case "$host" in
     # C++ headers defines __USE_MINGW_ANSI_STDIO to 1 unconditionally.
     # We have to use it as well nonetheless.
     CPPFLAGS="-D__USE_MINGW_ANSI_STDIO=1 $CPPFLAGS"
+    # Build with ASLR (dynamicbase) and NX compatiblity (nxcompat)
+    # Enable pie once upstream/binutils gets fixed to produce correct binaries with it.
+    LDFLAGS="$LDFLAGS -Wl,--dynamicbase -Wl,--nxcompat"
     ;;
 esac