summaryrefslogtreecommitdiffhomepage
path: root/cmake/mingw-w64.cmake
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2016-07-04 12:18:17 +0200
committerStanislaw Halik <sthalik@misaki.pl>2016-07-04 12:18:17 +0200
commitcbc992f099fbc40e4252a6c7d5c2b6e017407a96 (patch)
treedef478de2820ed1a14a430ad4e6bbe563cb5d136 /cmake/mingw-w64.cmake
parenta822de144cd679af6c27262d86884483b1fc634e (diff)
cmake/mingw-w64: enable nx bit (data execution prevention)
We don't process untrusted user data but this should be the default anyway.
Diffstat (limited to 'cmake/mingw-w64.cmake')
-rw-r--r--cmake/mingw-w64.cmake4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmake/mingw-w64.cmake b/cmake/mingw-w64.cmake
index b97408b0..61bfa524 100644
--- a/cmake/mingw-w64.cmake
+++ b/cmake/mingw-w64.cmake
@@ -41,14 +41,14 @@ set(fpu "-ffast-math -mfpmath=both -mstackrealign -ftree-vectorize")
set(cpu "-O3 -march=pentium4 -mtune=corei7-avx -msse -msse2 -mno-sse3 -mno-avx -frename-registers -fno-PIC")
set(lto "-flto -fuse-linker-plugin -flto-compression-level=3 -flto-partition=balanced -fno-ipa-pta")
-set(_CFLAGS " -fvisibility=hidden ")
+set(_CFLAGS " -fvisibility=hidden")
set(_CXXFLAGS "${_CFLAGS}")
set(_CFLAGS_RELEASE "-s ${cpu} ${fpu} ${lto}")
set(_CFLAGS_DEBUG "-g -ggdb")
set(_CXXFLAGS_RELEASE "${_CFLAGS_RELEASE}")
set(_CXXFLAGS_DEBUG "${_CFLAGS_DEBUG}")
-set(_LDFLAGS "-Wl,--as-needed")
+set(_LDFLAGS "-Wl,--as-needed -Wl,--nxcompat,--no-seh")
set(_LDFLAGS_RELEASE "")
set(_LDFLAGS_DEBUG "")