From 3325403c0dd2949bf52efa1b9a5b5cf3191110f9 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Tue, 5 Aug 2014 19:32:51 +0200 Subject: Use 16 byte alignment for hppa-unknown-linux-gnu. * configure.ac (HAVE_GCC_ATTRIBUTE_ALIGNED): New. * src/gen-posix-lock-obj.c (USE_16BYTE_ALIGNMENT): Set for HPPA-Linux. (main): Enforce alignment if needed. * src/syscfg/lock-obj-pub.hppa-unknown-linux-gnu.h: Use 16 byte alignment. -- Debian-bug-id: 757060 --- configure.ac | 23 ++++++++++++++++++++++- src/gen-posix-lock-obj.c | 19 +++++++++++++++++++ src/syscfg/lock-obj-pub.hppa-unknown-linux-gnu.h | 1 + 3 files changed, 42 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 653d7ed..e1f167f 100644 --- a/configure.ac +++ b/configure.ac @@ -167,6 +167,20 @@ AC_CHECK_FUNCS([flockfile]) # Checks for typedefs, structures, and compiler characteristics. AC_C_CONST +# +# Check whether the compiler supports the GCC style aligned attribute +# +AC_CACHE_CHECK([whether the GCC style aligned attribute is supported], + [gcry_cv_gcc_attribute_aligned], + [gcry_cv_gcc_attribute_aligned=no + AC_COMPILE_IFELSE([AC_LANG_SOURCE( + [[struct { int a; } foo __attribute__ ((aligned (16)));]])], + [gcry_cv_gcc_attribute_aligned=yes])]) +if test "$gcry_cv_gcc_attribute_aligned" = "yes" ; then + AC_DEFINE(HAVE_GCC_ATTRIBUTE_ALIGNED,1, + [Defined if a GCC style "__attribute__ ((aligned (n))" is supported]) +fi + # Check for thread library. # @@ -278,5 +292,12 @@ echo " Revision: mym4_revision (mym4_revision_dec) Platform: $host - " +if test "$gcry_cv_gcc_attribute_aligned" != "yes" ; then +cat <