From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56261) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XK3RH-0002YP-4R for qemu-devel@nongnu.org; Wed, 20 Aug 2014 06:48:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XK3R4-0001vc-LU for qemu-devel@nongnu.org; Wed, 20 Aug 2014 06:48:23 -0400 Received: from mx1.redhat.com ([209.132.183.28]:59308) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XK3R4-0001v2-DW for qemu-devel@nongnu.org; Wed, 20 Aug 2014 06:48:10 -0400 From: Fam Zheng Date: Wed, 20 Aug 2014 18:01:21 +0800 Message-Id: <1408528887-22200-1-git-send-email-famz@redhat.com> Subject: [Qemu-devel] [PATCH 0/6] build-sys: Fix iscsi module loading failure List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, pbonzini@redhat.com, mjt@tls.msk.ru, stefanha@redhat.com The iscsi driver doesn't work if built with --enable-modules: $ ~/build/last/qemu-img Failed to open module: /home/fam/build/master/block-iscsi.so: undefined symbol: qmp_query_uuid qemu-img: Not enough arguments Try 'qemu-img --help' for more information This fixes it by completely linking libqemuutil.a (now qemuutil.o) rather than on demand. A few stub functions are added into libqemustub to make linker happy. Lastly, iqn generation code is moved from iscsi.c to util, so that qmp_query_uuid or its stub is not missed. Fam Fam Zheng (6): build-sys: Move fifio8 to hw/ stubs: Add iohandler.c stubs: Add openpty.c stubs: Add timer.c build-sys: Change libqemuutil.a to qemuutil.o and link whole object iscsi: Move iqn generation code to util Makefile | 17 ++++--- Makefile.objs | 2 +- Makefile.target | 2 +- block/iscsi.c | 15 +----- hw/Makefile.objs | 1 + hw/fifo8.c | 125 ++++++++++++++++++++++++++++++++++++++++++++++++++ include/qemu-common.h | 3 ++ stubs/Makefile.objs | 3 ++ stubs/iohandler.c | 20 ++++++++ stubs/openpty.c | 21 +++++++++ stubs/timer.c | 44 ++++++++++++++++++ tests/Makefile | 60 ++++++++++++------------ util/Makefile.objs | 2 +- util/fifo8.c | 125 -------------------------------------------------- util/iqn.c | 38 +++++++++++++++ 15 files changed, 299 insertions(+), 179 deletions(-) create mode 100644 hw/fifo8.c create mode 100644 stubs/iohandler.c create mode 100644 stubs/openpty.c create mode 100644 stubs/timer.c delete mode 100644 util/fifo8.c create mode 100644 util/iqn.c -- 2.0.3