aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrent Cook <bcook@openbsd.org>2015-03-08 19:56:03 -0500
committerBrent Cook <bcook@openbsd.org>2015-03-08 22:02:54 -0500
commit73329d4311006f7dfd9bf6e55f4bc58ef497b53b (patch)
tree95b833b8b0556fead7bfe99b580a7950dacf722d
parentf7e4e4a2666aa5ea39536d425206e680d76769d9 (diff)
downloadportable-73329d4311006f7dfd9bf6e55f4bc58ef497b53b.tar.gz
portable-73329d4311006f7dfd9bf6e55f4bc58ef497b53b.tar.bz2
portable-73329d4311006f7dfd9bf6e55f4bc58ef497b53b.zip
update __STRICT_ALIGNMENT check
-rw-r--r--configure.ac10
1 files changed, 7 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index 5f70a7c..30c7dd6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -285,10 +285,14 @@ AC_ARG_ENABLE([asm],
285AM_CONDITIONAL([OPENSSL_NO_ASM], [test "x$enable_asm" = "xno"]) 285AM_CONDITIONAL([OPENSSL_NO_ASM], [test "x$enable_asm" = "xno"])
286 286
287old_cflags=$CFLAGS 287old_cflags=$CFLAGS
288CFLAGS="$old_cflags -I$srcdir/include" 288CFLAGS="$USER_CFLAGS -I$srcdir/include"
289AC_MSG_CHECKING([if BSWAP4 builds without __STRICT_ALIGNMENT])
289AC_TRY_COMPILE([#include "$srcdir/crypto/modes/modes_lcl.h"], 290AC_TRY_COMPILE([#include "$srcdir/crypto/modes/modes_lcl.h"],
290 [int a = 0; BSWAP4(a);], 291 [int a = 0; BSWAP4(a);],
291 BSWAP4=yes, BSWAP4=no) 292 AC_MSG_RESULT([yes])
293 BSWAP4=yes,
294 AC_MSG_RESULT([no])
295 BSWAP4=no)
292CFLAGS="$old_cflags" 296CFLAGS="$old_cflags"
293 297
294case $host_cpu in 298case $host_cpu in
@@ -297,7 +301,7 @@ case $host_cpu in
297 ;; 301 ;;
298 *arm*) 302 *arm*)
299 AS_IF([test "x$BSWAP4" = "xyes"],, 303 AS_IF([test "x$BSWAP4" = "xyes"],,
300 CFLAGS="$old_cflags -D__STRICT_ALIGNMENT") 304 CFLAGS="$CFLAGS -D__STRICT_ALIGNMENT")
301 ;; 305 ;;
302esac 306esac
303 307