diff --git a/configure.ac b/configure.ac index d2036ec9920fb8de5aadd74b622050fe64ba55f1..fc64be16e5c89550866f6c6f4d94762a77261ecf 100644 --- a/configure.ac +++ b/configure.ac @@ -72,6 +72,7 @@ AC_CHECK_HEADERS(unistd.h sys/mman.h) # Compiler flags AC_CANONICAL_HOST +AC_CHECK_ALIGNOF([struct{char}]) if test "x$GCC" = "xyes"; then # Make symbols link locally @@ -94,8 +95,10 @@ if test "x$GCC" = "xyes"; then case "$host" in arm-*-*) - # Request byte alignment on arm - CXXFLAGS="$CXXFLAGS -mstructure-size-boundary=8" + if test "x$ac_cv_alignof_struct_char_" != x1; then + # Request byte alignment + CXXFLAGS="$CXXFLAGS -mstructure-size-boundary=8" + fi ;; esac fi