From 79efbf73dff145d4cdb773996bd7fee10bcee228 Mon Sep 17 00:00:00 2001 From: Richard W.M. Jones Date: Jul 05 2012 12:56:56 +0000 Subject: Cherry pick patch from upstream which fixes build system, and remove hack. --- diff --git a/0001-build-move-user-objects-to-nested-Makefile.objs.patch b/0001-build-move-user-objects-to-nested-Makefile.objs.patch new file mode 100644 index 0000000..7f0683e --- /dev/null +++ b/0001-build-move-user-objects-to-nested-Makefile.objs.patch @@ -0,0 +1,137 @@ +From 7fc5152c6dca17d6061cc399c46716d9e586ad85 Mon Sep 17 00:00:00 2001 +From: Paolo Bonzini +Date: Tue, 29 May 2012 09:33:59 +0200 +Subject: [PATCH] build: move *-user/ objects to nested Makefile.objs + +Signed-off-by: Paolo Bonzini +--- + Makefile.target | 32 ++++++++++---------------------- + bsd-user/Makefile.objs | 2 ++ + configure | 8 +++++++- + linux-user/Makefile.objs | 7 +++++++ + linux-user/arm/nwfpe/Makefile.objs | 2 ++ + 5 files changed, 28 insertions(+), 23 deletions(-) + create mode 100644 bsd-user/Makefile.objs + create mode 100644 linux-user/Makefile.objs + create mode 100644 linux-user/arm/nwfpe/Makefile.objs + +diff --git a/Makefile.target b/Makefile.target +index 40b774a..5cc577b 100644 +--- a/Makefile.target ++++ b/Makefile.target +@@ -113,32 +113,20 @@ user-exec.o: QEMU_CFLAGS += $(HELPER_CFLAGS) + + # Note: this is a workaround. The real fix is to avoid compiling + # cpu_signal_handler() in user-exec.c. +-signal.o: QEMU_CFLAGS += $(HELPER_CFLAGS) ++%/signal.o: QEMU_CFLAGS += $(HELPER_CFLAGS) + + ######################################################### + # Linux user emulator target + + ifdef CONFIG_LINUX_USER + +-$(call set-vpath, $(SRC_PATH)/linux-user:$(SRC_PATH)/linux-user/$(TARGET_ABI_DIR)) +- + QEMU_CFLAGS+=-I$(SRC_PATH)/linux-user/$(TARGET_ABI_DIR) -I$(SRC_PATH)/linux-user +-obj-y = main.o syscall.o strace.o mmap.o signal.o thunk.o \ +- elfload.o linuxload.o uaccess.o gdbstub.o cpu-uname.o \ +- user-exec.o $(oslib-obj-y) +- +-obj-$(TARGET_HAS_BFLT) += flatload.o +- +-obj-$(TARGET_I386) += vm86.o + ++obj-y += linux-user/ ++obj-y += gdbstub.o thunk.o user-exec.o $(oslib-obj-y) + obj-i386-y += ioport-user.o +- +-nwfpe-obj-y = fpa11.o fpa11_cpdo.o fpa11_cpdt.o fpa11_cprt.o fpopcode.o +-nwfpe-obj-y += single_cpdo.o double_cpdo.o extended_cpdo.o +-obj-arm-y += $(addprefix nwfpe/, $(nwfpe-obj-y)) +-obj-arm-y += arm-semi.o +- +-obj-m68k-y += m68k-sim.o m68k-semi.o ++obj-$(TARGET_ARM) += arm-semi.o ++obj-$(TARGET_M68K) += m68k-semi.o + + obj-y += $(addprefix ../, $(universal-obj-y)) + obj-y += $(addprefix ../libuser/, $(user-obj-y)) +@@ -152,13 +140,10 @@ endif #CONFIG_LINUX_USER + + ifdef CONFIG_BSD_USER + +-$(call set-vpath, $(SRC_PATH)/bsd-user) +- + QEMU_CFLAGS+=-I$(SRC_PATH)/bsd-user -I$(SRC_PATH)/bsd-user/$(TARGET_ARCH) + +-obj-y = main.o bsdload.o elfload.o mmap.o signal.o strace.o syscall.o \ +- gdbstub.o uaccess.o user-exec.o +- ++obj-y += bsd-user/ ++obj-y += gdbstub.o user-exec.o + obj-i386-y += ioport-user.o + + obj-y += $(addprefix ../, $(universal-obj-y)) +@@ -408,6 +393,9 @@ endif # CONFIG_LINUX_USER + + obj-$(CONFIG_GDBSTUB_XML) += gdbstub-xml.o + ++nested-vars = obj-y ++dummy := $(call unnest-vars) ++ + ifdef QEMU_PROGW + # The linker builds a windows executable. Make also a console executable. + $(QEMU_PROGW): $(obj-y) $(obj-$(TARGET_BASE_ARCH)-y) +diff --git a/bsd-user/Makefile.objs b/bsd-user/Makefile.objs +new file mode 100644 +index 0000000..5e77f57 +--- /dev/null ++++ b/bsd-user/Makefile.objs +@@ -0,0 +1,2 @@ ++obj-y = main.o bsdload.o elfload.o mmap.o signal.o strace.o syscall.o \ ++ uaccess.o +diff --git a/configure b/configure +index 76dd57f..2c44488 100755 +--- a/configure ++++ b/configure +@@ -3520,8 +3520,14 @@ mkdir -p $target_dir/ide + mkdir -p $target_dir/usb + mkdir -p $target_dir/9pfs + mkdir -p $target_dir/kvm ++if test "$target_linux_user" = yes; then ++ mkdir -p $target_dir/linux-user ++fi ++if test "$target_bsd_user" = yes; then ++ mkdir -p $target_dir/bsd-user ++fi + if test "$target" = "arm-linux-user" -o "$target" = "armeb-linux-user" -o "$target" = "arm-bsd-user" -o "$target" = "armeb-bsd-user" ; then +- mkdir -p $target_dir/nwfpe ++ mkdir -p $target_dir/linux-user/arm/nwfpe + fi + symlink "$source_path/Makefile.target" "$target_dir/Makefile" + +diff --git a/linux-user/Makefile.objs b/linux-user/Makefile.objs +new file mode 100644 +index 0000000..5899d72 +--- /dev/null ++++ b/linux-user/Makefile.objs +@@ -0,0 +1,7 @@ ++obj-y = main.o syscall.o strace.o mmap.o signal.o \ ++ elfload.o linuxload.o uaccess.o cpu-uname.o ++ ++obj-$(TARGET_HAS_BFLT) += flatload.o ++obj-$(TARGET_I386) += vm86.o ++obj-$(TARGET_ARM) += arm/nwfpe/ ++obj-$(TARGET_M68K) += m68k-sim.o +diff --git a/linux-user/arm/nwfpe/Makefile.objs b/linux-user/arm/nwfpe/Makefile.objs +new file mode 100644 +index 0000000..51b0c32 +--- /dev/null ++++ b/linux-user/arm/nwfpe/Makefile.objs +@@ -0,0 +1,2 @@ ++obj-y = fpa11.o fpa11_cpdo.o fpa11_cpdt.o fpa11_cprt.o fpopcode.o ++obj-y += single_cpdo.o double_cpdo.o extended_cpdo.o +-- +1.7.10.4 + diff --git a/qemu-kvm-1.1.0-siginfo_t.patch b/qemu-kvm-1.1.0-siginfo_t.patch deleted file mode 100644 index 9c27946..0000000 --- a/qemu-kvm-1.1.0-siginfo_t.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- qemu-kvm-1.1.0/linux-user/signal.c 2012-06-30 03:14:15.000000000 +0100 -+++ qemu-kvm-1.1.0.glibc/linux-user/signal.c 2012-07-05 11:08:36.839294266 +0100 -@@ -3476,7 +3476,7 @@ - struct rt_signal_frame { - struct siginfo *pinfo; - void *puc; -- struct siginfo info; -+ siginfo_t info; - struct ucontext uc; - uint8_t retcode[8]; /* Trampoline code. */ - }; diff --git a/qemu.spec b/qemu.spec index c77a9a8..e8265ee 100644 --- a/qemu.spec +++ b/qemu.spec @@ -38,7 +38,7 @@ Summary: QEMU is a FAST! processor emulator Name: qemu Version: 1.1.0 -Release: 2%{?dist} +Release: 3%{?dist} # Epoch because we pushed a qemu-1.0 package Epoch: 2 License: GPLv2+ and LGPLv2+ and BSD @@ -82,9 +82,9 @@ Patch2: 0002-qemu-kvm-virtio-Do-not-register-mask-notifiers-witho.patch # Speculative patch to fix msi and virtio-pci modules in build (not upstream). Patch3: 0001-buildsys-Move-msi-x-and-virtio-pci-from-Makefile.obj.patch -# Hack to use siginfo_t instead of siginfo with glibc from Rawhide. -# XXX This patch is highly UNlikely to be correct. (RWMJ) -Patch4: qemu-kvm-1.1.0-siginfo_t.patch +# Fix for build system (upstream, but not in stable-1.1). +%global _default_patch_fuzz 2 +Patch4: 0001-build-move-user-objects-to-nested-Makefile.objs.patch # The infamous chardev flow control patches Patch101: 0101-char-Split-out-tcp-socket-close-code-in-a-separate-f.patch @@ -803,14 +803,14 @@ fi %{_mandir}/man1/qemu-img.1* %changelog -* Thu Jul 5 2012 Richard W.M. Jones - 2:1.1.0-2 -- Add a hack for glibc from Rawhide, only affects linux-user. +* Thu Jul 5 2012 Richard W.M. Jones - 2:1.1.0-3 - Disable tests since they hang intermittently. - Add kvmvapic.bin (replaces vapic.bin). - Add cpus-x86_64.conf. qemu now creates /etc/qemu/target-x86_64.conf as an empty file. - Add qemu-icon.bmp. - Add qemu-bridge-helper. +- Cherry pick patch from upstream which fixes build system. * Wed Jul 4 2012 Hans de Goede - 2:1.1.0-1 - New upstream release 1.1.0