Signed-off-by: Philippe Mathieu-Daudé <f4...@amsat.org> --- configure | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)
diff --git a/configure b/configure index 56f9716609..28cd073941 100755 --- a/configure +++ b/configure @@ -276,6 +276,7 @@ cc_i386=i386-pc-linux-gnu-gcc libs_qga="" debug_info="yes" stack_protector="" +host_supports_unaligned_access="no" if test -e "$source_path/.git" then @@ -692,6 +693,13 @@ if test -z "$ARCH"; then ARCH="$cpu" fi +# ARCH specific +case "$ARCH" in + i386|x86_64) + host_supports_unaligned_access="yes" + ;; +esac + # OS specific # host *BSD for user mode @@ -4993,6 +5001,15 @@ if test "$fortify_source" != "no"; then fi fi +################################################# +# check if host supports unaligned access + +if test "$host_supports_unaligned_access" != "no"; then + if compile_prog "-Werror -Wno-address-of-packed-member" "" ; then + QEMU_CFLAGS="-Wno-address-of-packed-member $QEMU_CFLAGS" + fi +fi + ########################################## # check if struct fsxattr is available via linux/fs.h -- 2.15.1