From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56723) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZZFtn-0004nJ-Qu for qemu-devel@nongnu.org; Tue, 08 Sep 2015 06:13:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZZFti-0003NR-Pt for qemu-devel@nongnu.org; Tue, 08 Sep 2015 06:13:11 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49865) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZZFti-0003NK-Lg for qemu-devel@nongnu.org; Tue, 08 Sep 2015 06:13:06 -0400 Date: Tue, 8 Sep 2015 18:13:04 +0800 From: Fam Zheng Message-ID: <20150908101304.GA8863@ad.nay.redhat.com> References: <1441696197-22265-1-git-send-email-den@openvz.org> <1441696197-22265-3-git-send-email-den@openvz.org> <55EEB066.5040304@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <55EEB066.5040304@redhat.com> Subject: Re: [Qemu-devel] [PATCH 2/4] monitor: remove target-specific code from monitor.c List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: "Denis V. Lunev" , Pavel Butsykin , Luiz Capitulino , qemu-devel@nongnu.org, Peter Maydell On Tue, 09/08 11:54, Paolo Bonzini wrote: > > > On 08/09/2015 09:09, Denis V. Lunev wrote: > > qemu-monitor-info.texi | 151 +++++++ > > This should be added in patch 4, not now. > > > +const MonitorDef *target_monitor_defs(void) __attribute__((weak)); > > + > > +const MonitorDef *target_monitor_defs(void) > > +{ > > + return NULL; > > +} > > Weak symbols do not work on all platforms. Luckily, making libqemustub > a static library gets exactly the same result without the need for weak > symbols: the definition from the QEMU object files will hide the stub. > > You just need to remove __attribute__((weak)), and it should just work. > > Otherwise, the patches look good to me. Luiz, do you have time to post > a pull request for v4, or do you want to pass HMP maintainership as well > to someone else? Didn't look at the patch, but Patchew is catching this for cross build: running command: /tmp/qemu-build/configure --prefix=/var/tmp/qemu-build-install --cross-prefix=x86_64-w64-mingw32- --target-list=x86_64-softmmu,aarch64-softmmu ... running command: make -j2 ... Failed: [snip] CC aarch64-softmmu/target-arm/kvm-stub.o CC aarch64-softmmu/target-arm/translate.o CC aarch64-softmmu/target-arm/op_helper.o CC aarch64-softmmu/target-arm/helper.o CC aarch64-softmmu/target-arm/cpu.o CC aarch64-softmmu/target-arm/neon_helper.o CC aarch64-softmmu/target-arm/iwmmxt_helper.o CC aarch64-softmmu/target-arm/gdbstub.o CC aarch64-softmmu/target-arm/psci.o CC aarch64-softmmu/target-arm/cpu64.o CC aarch64-softmmu/target-arm/translate-a64.o CC aarch64-softmmu/target-arm/helper-a64.o CC aarch64-softmmu/target-arm/gdbstub64.o CC aarch64-softmmu/target-arm/crypto_helper.o GEN trace/generated-helpers.c CC aarch64-softmmu/gdbstub-xml.o CC aarch64-softmmu/trace/generated-helpers.o LINK aarch64-softmmu/qemu-system-aarch64w.exe monitor.o: In function `get_monitor_def': /tmp/qemu-build/monitor.c:2091: undefined reference to `target_monitor_defs' collect2: error: ld returned 1 exit status Makefile:184: recipe for target 'qemu-system-aarch64w.exe' failed make[1]: *** [qemu-system-aarch64w.exe] Error 1 Makefile:179: recipe for target 'subdir-aarch64-softmmu' failed make: *** [subdir-aarch64-softmmu] Error 2