bufhelp: use 'may_alias' attribute unaligned pointer types
* configure.ac (gcry_cv_gcc_attribute_may_alias) (HAVE_GCC_ATTRIBUTE_MAY_ALIAS): New check for 'may_alias' attribute. * cipher/bufhelp.h (BUFHELP_FAST_UNALIGNED_ACCESS): Enable only if HAVE_GCC_ATTRIBUTE_MAY_ALIAS is defined. [BUFHELP_FAST_UNALIGNED_ACCESS] (bufhelp_int_t, bufhelp_u32_t) (bufhelp_u64_t): Add 'may_alias' attribute. * src/g10lib.h (fast_wipememory_t): Add HAVE_GCC_ATTRIBUTE_MAY_ALIAS defined check; Add 'may_alias' attribute.
Attribute 'may_alias' was missing from bufhelp unaligned memory access
pointer types, and was causing problems with newer GCC versions (with
more aggressive optimization). This patch fixes broken Camellia-CFB
with '-O3 -flto' flags with GCC-6 on x86-64 and generic GCM with
default '-O2' on x32.
- Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>