qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 10/12] configure: disable unaligned access warning o


From: Philippe Mathieu-Daudé
Subject: [Qemu-devel] [PATCH 10/12] configure: disable unaligned access warning on x86 arch
Date: Mon, 8 Jan 2018 14:29:02 -0300

Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
---
 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]