Use FORCE_64BIT_ALIGN on 32-bit platforms to make sure that aes_cbc_ctx_t allocated by aes_cbc_alloc is 64-bit aligned.
BUG=414919
R=sergeyu@chromium.org
Review URL: https://codereview.chromium.org/592173002
git-svn-id: http://src.chromium.org/svn/trunk/deps/third_party/libsrtp@292077 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
diff --git a/libsrtp.gyp b/libsrtp.gyp
index fd6f204..a3956eb 100644
--- a/libsrtp.gyp
+++ b/libsrtp.gyp
@@ -61,6 +61,16 @@
'CPU_RISC',
],
}],
+ ['target_arch=="mipsel" or target_arch=="arm" or target_arch=="armv7" or target_arch=="ia32"', {
+ 'defines': [
+ # Define FORCE_64BIT_ALIGN to avoid alignment-related-crashes like
+ # crbug/414919. Without this, aes_cbc_alloc will allocate an
+ # aes_cbc_ctx_t not 64-bit aligned and the v128_t members of
+ # aes_cbc_ctx_t will not be 64-bit aligned, which breaks the
+ # compiler optimizations that assume 64-bit alignment of v128_t.
+ 'FORCE_64BIT_ALIGN',
+ ],
+ }],
],
'direct_dependent_settings': {
'include_dirs': [