cryptospore / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone

Blame SOURCES/kvm-build-reenable-local-builds-to-pass-enable-debug-RHE.patch

05bba0
From 984faac66812652082fc9aa46eceb21669c1131b Mon Sep 17 00:00:00 2001
05bba0
From: Laszlo Ersek <lersek@redhat.com>
05bba0
Date: Tue, 10 Feb 2015 19:41:34 +0100
05bba0
Subject: [PATCH 11/16] build: reenable local builds to pass --enable-debug
05bba0
 (RHEL only)
05bba0
05bba0
Message-id: <1423597294-16022-2-git-send-email-lersek@redhat.com>
05bba0
Patchwork-id: 63788
05bba0
O-Subject: [RHEL-7.2 qemu-kvm PATCH 1/1] build: reenable local builds to pass --enable-debug (RHEL only)
05bba0
Bugzilla:
05bba0
RH-Acked-by: Markus Armbruster <armbru@redhat.com>
05bba0
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
05bba0
RH-Acked-by: Max Reitz <mreitz@redhat.com>
05bba0
05bba0
RHEL-7 commit f6852e27 dropped the "isa-ide" device, and observed:
05bba0
05bba0
  Unresolved extern symbols pose no real danger, because they fail safely
05bba0
  at link time.  Note for the curious: the optimizer gets rid of the
05bba0
  reference to isa_ide_init() in hw/i386/pc_piix.c.
05bba0
05bba0
For local builds it is sometimes useful to pass --enable-debug to the
05bba0
configure script. However that flag disables the optimizer, and the
05bba0
isa_ide_init() call is not eliminated during compilation; it reaches the
05bba0
linker. The linker then barfs
05bba0
05bba0
    LINK  x86_64-softmmu/qemu-system-x86_64
05bba0
  hw/i386/pc_piix.o: In function `pc_init1':
05bba0
  .../hw/i386/pc_piix.c:221: undefined reference to `isa_ide_init'
05bba0
  collect2: error: ld returned 1 exit status
05bba0
05bba0
Provide a stub implementation for isa_ide_init(), reenabling local debug
05bba0
builds.
05bba0
05bba0
No copyright notice is added to the top of the new file, following the
05bba0
pattern set by other stub files.
05bba0
05bba0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
05bba0
---
05bba0
 stubs/Makefile.objs |  1 +
05bba0
 stubs/ide-isa.c     | 12 ++++++++++++
05bba0
 2 files changed, 13 insertions(+)
05bba0
 create mode 100644 stubs/ide-isa.c
05bba0
05bba0
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
05bba0
---
05bba0
 stubs/Makefile.objs |  1 +
05bba0
 stubs/ide-isa.c     | 12 ++++++++++++
05bba0
 2 files changed, 13 insertions(+)
05bba0
 create mode 100644 stubs/ide-isa.c
05bba0
05bba0
diff --git a/stubs/Makefile.objs b/stubs/Makefile.objs
05bba0
index 4b2cb7d..590008e 100644
05bba0
--- a/stubs/Makefile.objs
05bba0
+++ b/stubs/Makefile.objs
05bba0
@@ -26,3 +26,4 @@ stub-obj-y += vm-stop.o
05bba0
 stub-obj-y += vmstate.o
05bba0
 stub-obj-$(CONFIG_WIN32) += fd-register.o
05bba0
 stub-obj-y += cpus.o
05bba0
+stub-obj-y += ide-isa.o
05bba0
diff --git a/stubs/ide-isa.c b/stubs/ide-isa.c
05bba0
new file mode 100644
05bba0
index 0000000..4074aff
05bba0
--- /dev/null
05bba0
+++ b/stubs/ide-isa.c
05bba0
@@ -0,0 +1,12 @@
05bba0
+#include <hw/ide.h>
05bba0
+#include <stdlib.h>
05bba0
+
05bba0
+ISADevice *isa_ide_init(ISABus *bus, int iobase, int iobase2, int isairq,
05bba0
+                        DriveInfo *hd0, DriveInfo *hd1)
05bba0
+{
05bba0
+    /*
05bba0
+     * In theory the real isa_ide_init() function can return NULL, but no
05bba0
+     * caller actually checks for that. Make sure we go out with a clear bang.
05bba0
+     */
05bba0
+    abort();
05bba0
+}
05bba0
-- 
05bba0
1.8.3.1
05bba0