From: Alexey Kardashevskiy <aik@ozlabs.ru>
To: Laurent Vivier <laurent@vivier.eu>,
qemu-devel@nongnu.org, Paolo Bonzini <pbonzini@redhat.com>
Cc: Riku Voipio <riku.voipio@linaro.org>
Subject: Re: [Qemu-devel] [PATCH] linux-user: remove nmi.c and fw-path-provider.c
Date: Tue, 7 Nov 2017 11:31:51 +1100 [thread overview]
Message-ID: <1c023bba-4a43-369a-cdc1-b173f95560e2@ozlabs.ru> (raw)
In-Reply-To: <425ee57b-641a-b8d3-7700-1ddcbc243ec3@vivier.eu>
On 06/11/17 21:15, Laurent Vivier wrote:
> Le 06/11/2017 à 01:44, Alexey Kardashevskiy a écrit :
>> On 04/11/17 06:38, Laurent Vivier wrote:
>>> linux-user binaries don't need firmware and NMI,
>>> so don't add them in this case, move QDEV
>>> firmware functions to qdev-fw.c
>>
>>
>> When configured with --target-list=ppc64-linux-user , config-host.mak gets
>> TARGET_DIRS=ppc64-linux-user and I would expect CONFIG_SOFTMMU to be
>> disabled in Makefile#27 and qdev.c not to be compiled at all but this is
>> not happening, I wonder why...
>
> this is driven by config-target.mak and config-target.h which are target
> specific.
>
> for ppc64-linux-user, you have ppc64-linux-user/config-target.mak:
> ...
> CONFIG_LINUX_USER=y
> ...
>
> for ppc64-softmmu/config-target.mak:
> ...
> CONFIG_SOFTMMU=y
> ...
Ah, I get it, Makefile.objs includes:
common-obj-y += hw/
and hw/Makefile.objs includes:
devices-dirs-y += core/
and hw/core/Makefile.objs includes:
common-obj-y += qdev.o
and nowhere it checks that CONFIG_SOFTMMU is not set as hw/core/* files
still export symbols needed by qom/cpu.c and TCG so doing as below does not
help. I'd suggest moving shared stuff out of hw/ and stop including hw/ in
linus-user builds (basically, apply the patch below and resolve
compile/link errors) but I suspect it is not that easy (or even correct)
but if it is correct, I could give it a try.
Paolo?
diff --git a/hw/core/Makefile.objs b/hw/core/Makefile.objs
index f8d7a4aaed..be8d89dc0a 100644
--- a/hw/core/Makefile.objs
+++ b/hw/core/Makefile.objs
@@ -1,6 +1,6 @@
# core qdev-related obj files, also used by *-user:
-common-obj-y += qdev.o qdev-properties.o
-common-obj-y += bus.o reset.o
+obj-$(CONFIG_SOFTMMU) += qdev.o qdev-properties.o bus.o
+common-obj-y += reset.o
common-obj-y += fw-path-provider.o
# irq.o needed for qdev GPIO handling:
common-obj-y += irq.o
diff --git a/qom/Makefile.objs b/qom/Makefile.objs
index 516349eec3..479929705a 100644
--- a/qom/Makefile.objs
+++ b/qom/Makefile.objs
@@ -1,4 +1,4 @@
qom-obj-y = object.o container.o qom-qobject.o
qom-obj-y += object_interfaces.o
-common-obj-y = cpu.o
+obj-$(CONFIG_SOFTMMU) = cpu.o
--
Alexey
next prev parent reply other threads:[~2017-11-07 0:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-03 19:38 [Qemu-devel] [PATCH] linux-user: remove nmi.c and fw-path-provider.c Laurent Vivier
2017-11-06 0:44 ` Alexey Kardashevskiy
2017-11-06 10:15 ` Laurent Vivier
2017-11-07 0:31 ` Alexey Kardashevskiy [this message]
2017-11-07 12:48 ` Paolo Bonzini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1c023bba-4a43-369a-cdc1-b173f95560e2@ozlabs.ru \
--to=aik@ozlabs.ru \
--cc=laurent@vivier.eu \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=riku.voipio@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).