From 7423582705d6c9d71e1caf8a1f892e8995bcd63e Mon Sep 17 00:00:00 2001 From: kinichiro Date: Wed, 15 Jul 2020 01:25:34 +0900 Subject: Get __STRICT_ALIGNMENT from machine/endian.h --- include/compat/machine/endian.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'include') diff --git a/include/compat/machine/endian.h b/include/compat/machine/endian.h index 43dac8f..54267a8 100644 --- a/include/compat/machine/endian.h +++ b/include/compat/machine/endian.h @@ -37,4 +37,14 @@ #endif +#ifndef __STRICT_ALIGNMENT +#define __STRICT_ALIGNMENT +#if defined(__i386) || defined(__i386__) || \ + defined(__x86_64) || defined(__x86_64__) || \ + defined(__aarch64__) || \ + ((defined(__arm__) || defined(__arm)) && __ARM_ARCH >= 6) +#undef __STRICT_ALIGNMENT +#endif +#endif + #endif -- cgit v1.2.3-55-g6feb From 7bf5edc4f2f225cf5d7030ff824fd3944735bbf9 Mon Sep 17 00:00:00 2001 From: kinichiro Date: Wed, 22 Jul 2020 21:32:34 +0900 Subject: Add architecture define for s390/s390x and remove redundant sparc check --- configure.ac | 1 - include/compat/machine/endian.h | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/configure.ac b/configure.ac index acfe307..75b88fe 100644 --- a/configure.ac +++ b/configure.ac @@ -76,7 +76,6 @@ AC_ARG_ENABLE([tests], AM_CONDITIONAL([ENABLE_TESTS], [test "x$enable_tests" = xyes]) AS_CASE([$host_cpu], - [*sparc*], [CPPFLAGS="$CPPFLAGS -D__STRICT_ALIGNMENT"], [*arm*], [host_cpu=arm], [*amd64*], [host_cpu=x86_64 HOSTARCH=intel], [i?86], [HOSTARCH=intel], diff --git a/include/compat/machine/endian.h b/include/compat/machine/endian.h index 54267a8..4dcb60d 100644 --- a/include/compat/machine/endian.h +++ b/include/compat/machine/endian.h @@ -41,6 +41,7 @@ #define __STRICT_ALIGNMENT #if defined(__i386) || defined(__i386__) || \ defined(__x86_64) || defined(__x86_64__) || \ + defined(__s390__) || defined(__s390x__) || \ defined(__aarch64__) || \ ((defined(__arm__) || defined(__arm)) && __ARM_ARCH >= 6) #undef __STRICT_ALIGNMENT -- cgit v1.2.3-55-g6feb