[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
- Re: [Qemu-devel] [PATCH 06/12] slirp: remove unused header, (continued)
- [Qemu-devel] [PATCH 07/12] slirp: remove unnecessary, Philippe Mathieu-Daudé, 2018/01/08
- [Qemu-devel] [PATCH 08/12] slirp: removed unused code, Philippe Mathieu-Daudé, 2018/01/08
- [Qemu-devel] [PATCH 09/12] slirp: add in6_dhcp_multicast(), Philippe Mathieu-Daudé, 2018/01/08
- [Qemu-devel] [PATCH 10/12] configure: disable unaligned access warning on x86 arch,
Philippe Mathieu-Daudé <=
- [Qemu-devel] [PATCH 11/12] configure: add HOST_SUPPORTS_UNALIGNED_ACCESS, Philippe Mathieu-Daudé, 2018/01/08
- [Qemu-devel] [RFC PATCH 12/12] slirp: use HOST_SUPPORTS_UNALIGNED_ACCESS, Philippe Mathieu-Daudé, 2018/01/08
- Re: [Qemu-devel] [PATCH 00/12] add HOST_SUPPORTS_UNALIGNED_ACCESS, reduce slirp warnings, no-reply, 2018/01/08