diff options
author | Luis Cáceres <[email protected]> | 2020-08-05 14:16:56 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2020-08-05 07:16:56 -0700 |
commit | 064710cdf7aadec0d2c10e39480fb7ff7d0afea6 (patch) | |
tree | 07d230acffef73bdb595add8ee7dda3b2c45c05f | |
parent | 7ddd49e16a3ac854eaa88f2e3367575bf6d5b7ec (diff) |
Force stack alignment on 32-bit gcc for proper SSE use (#462)
Fixes crashes due to misaligned stack variables in SSE instructions (#460).
-rw-r--r-- | CMakeLists.txt | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 38bfb6db..b59bdf71 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -364,6 +364,7 @@ if(CMAKE_SIZEOF_VOID_P MATCHES "4" AND (SSE2_SWITCH OR MSVC)) set(C_FLAGS ${C_FLAGS} ${SSE_FLAGS}) set(FPMATH_SET 2) endif() + set(EXPORT_DECL "${EXPORT_DECL} __attribute__((force_align_arg_pointer))") elseif(MSVC) check_c_compiler_flag("/arch:SSE2" HAVE_ARCH_SSE2) if(HAVE_ARCH_SSE2) |