From 8fb03151651cc61f68f8032374c9c08dc129b9d9 Mon Sep 17 00:00:00 2001 From: Peter Maydell Date: Wed, 4 Apr 2012 17:03:15 +0100 Subject: [PATCH 1/6] configure: Remove useless uses of ARCH_CFLAGS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove some useless uses of ARCH_CFLAGS -- this variable was never set so will always be empty. The uses were accidental: in commit 0c439cbf8 Juan Quintela removed ARCH_CFLAGS in favour of CFLAGS (which in turn became QEMU_CFLAGS). However in commit be17dc90 a use of it was reintroduced (apparently accidentally) by Michael S. Tsirkin, and then I subsequently cut-n-pasted that into a number of other configure feature tests. Signed-off-by: Peter Maydell Reviewed-by: Andreas Färber Reviewed-by: Juan Quintela Signed-off-by: Stefan Hajnoczi --- configure | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/configure b/configure index e05f34b9c0..5aaafa1912 100755 --- a/configure +++ b/configure @@ -2369,7 +2369,7 @@ int main(void) return 0; } EOF -if compile_prog "$ARCH_CFLAGS" "" ; then +if compile_prog "" "" ; then fallocate=yes fi @@ -2384,7 +2384,7 @@ int main(void) return 0; } EOF -if compile_prog "$ARCH_CFLAGS" "" ; then +if compile_prog "" "" ; then sync_file_range=yes fi @@ -2401,7 +2401,7 @@ int main(void) return 0; } EOF -if compile_prog "$ARCH_CFLAGS" "" ; then +if compile_prog "" "" ; then fiemap=yes fi @@ -2431,7 +2431,7 @@ int main(void) return 0; } EOF -if compile_prog "$ARCH_CFLAGS" "" ; then +if compile_prog "" "" ; then epoll=yes fi @@ -2454,7 +2454,7 @@ int main(void) return epoll_create1 == epoll_create1; } EOF -if compile_prog "$ARCH_CFLAGS" "" ; then +if compile_prog "" "" ; then epoll_create1=yes fi @@ -2468,7 +2468,7 @@ int main(void) return 0; } EOF -if compile_prog "$ARCH_CFLAGS" "" ; then +if compile_prog "" "" ; then epoll_pwait=yes fi From e172fe1177ffa14f6d13cc539dd80d2a2705aa73 Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Fri, 6 Apr 2012 21:33:20 +0200 Subject: [PATCH 2/6] configure: Fix wrong preprocessor statement #abort is not a preprocessor statement. It aborts, but the preprocessor statement #error is more common to abort a compilation. Signed-off-by: Stefan Weil Signed-off-by: Stefan Hajnoczi --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index 5aaafa1912..b392c6f390 100755 --- a/configure +++ b/configure @@ -2624,7 +2624,7 @@ int main(void) { #if defined(_POSIX_SYNCHRONIZED_IO) && _POSIX_SYNCHRONIZED_IO > 0 return fdatasync(0); #else -#abort Not supported +#error Not supported #endif } EOF From 952ef67cc06a636fe11344e3a11137d146222bc4 Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Tue, 27 Mar 2012 19:15:27 +0200 Subject: [PATCH 3/6] make: Always set LC_ALL=C for makeinfo Otherwise the generated file qemu-doc.html will contain "Anhang" instead of "Appendix" with a German locale (de_DE.UTF-8). Signed-off-by: Stefan Weil Signed-off-by: Stefan Hajnoczi --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index a78f53d4c9..e0fe680c39 100644 --- a/Makefile +++ b/Makefile @@ -328,7 +328,7 @@ TEXIFLAG=$(if $(V),,--quiet) $(call quiet-command,texi2dvi $(TEXIFLAG) -I . $<," GEN $@") %.html: %.texi - $(call quiet-command,$(MAKEINFO) $(MAKEINFOFLAGS) --html $< -o $@, \ + $(call quiet-command,LC_ALL=C $(MAKEINFO) $(MAKEINFOFLAGS) --html $< -o $@, \ " GEN $@") %.info: %.texi From fd65f595fe14dafeee1cd34df0dbe288ed6a5f06 Mon Sep 17 00:00:00 2001 From: Wanpeng Li Date: Wed, 11 Apr 2012 09:02:21 +0800 Subject: [PATCH 4/6] ps2: avoid repeated header file includes Signed-off-by: Wanpeng Li Signed-off-by: Stefan Hajnoczi --- hw/ps2.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/hw/ps2.h b/hw/ps2.h index 32a4231e32..7c45ce7ced 100644 --- a/hw/ps2.h +++ b/hw/ps2.h @@ -1,3 +1,30 @@ +/* + * QEMU PS/2 keyboard/mouse emulation + * + * Copyright (C) 2003 Fabrice Bellard + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#ifndef HW_PS2_H +#define HW_PS2_H + /* ps2.c */ void *ps2_kbd_init(void (*update_irq)(void *, int), void *update_arg); void *ps2_mouse_init(void (*update_irq)(void *, int), void *update_arg); @@ -7,3 +34,5 @@ uint32_t ps2_read_data(void *); void ps2_queue(void *, int b); void ps2_keyboard_set_translation(void *opaque, int mode); void ps2_mouse_fake_event(void *opaque); + +#endif /* !HW_PS2_H */ From d6ef40bf1881ddc82c8d64e72d412090efe1190e Mon Sep 17 00:00:00 2001 From: Peter Maydell Date: Thu, 12 Apr 2012 12:43:41 +0100 Subject: [PATCH 5/6] bsd-user: fix compile failure bsd-user doesn't actually support reserving a memory area for the guest address space, but we need to at least define the reserved_va global so that cpu-all.h's RESERVED_VA macro will work correctly. This fixes a compilation error introduced in commit 39879bb which added a use of RESERVED_VA to h2g_valid(). Reported-by: Brad Smith Signed-off-by: Peter Maydell Reviewed-by: Stefan Weil Signed-off-by: Stefan Hajnoczi --- bsd-user/main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/bsd-user/main.c b/bsd-user/main.c index 48cb715d2d..0689e38fb8 100644 --- a/bsd-user/main.c +++ b/bsd-user/main.c @@ -41,6 +41,7 @@ int singlestep; unsigned long mmap_min_addr; unsigned long guest_base; int have_guest_base; +unsigned long reserved_va; #endif static const char *interp_prefix = CONFIG_QEMU_INTERP_PREFIX; From 6ccea1e4d9a39d0bcf5be5a7b49270c2132b9dcb Mon Sep 17 00:00:00 2001 From: Peter Maydell Date: Thu, 12 Apr 2012 19:09:52 +0100 Subject: [PATCH 6/6] configure: Insist on a Python 2, not Python 3 Our Python scripts require Python 2 and will fail on Python 3, eg: File "/home/petmay01/linaro/qemu-from-laptop/qemu/scripts/qapi-commands.py", line 378 except getopt.GetoptError, err: ^ SyntaxError: invalid syntax Add a check to configure that Python is not a Python 3, so we can fail with a comprehensible error rather than an obscure one. Reported-by: Boris Matti Signed-off-by: Peter Maydell Signed-off-by: Stefan Hajnoczi --- configure | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/configure b/configure index b392c6f390..1d94acda2c 100755 --- a/configure +++ b/configure @@ -1242,6 +1242,14 @@ if ! has $python; then exit 1 fi +# Note that if the Python conditional here evaluates True we will exit +# with status 1 which is a shell 'false' value. +if ! "$python" -c 'import sys; sys.exit(sys.version_info[0] >= 3)'; then + echo "Python 2 required but '$python' is version 3 or better." + echo "Use --python=/path/to/python to specify a Python 2." + exit 1 +fi + if test -z "$target_list" ; then target_list="$default_target_list" else