From: Paolo Bonzini <pbonzini@redhat.com>
To: Gerd Hoffmann <kraxel@redhat.com>, qemu-devel@nongnu.org
Cc: "Marc-André Lureau" <marcandre.lureau@gmail.com>
Subject: Re: [PATCH] meson: fix qxl module build
Date: Fri, 4 Sep 2020 11:02:57 +0200 [thread overview]
Message-ID: <2706f51d-381f-929e-7c8c-7df83f8491ff@redhat.com> (raw)
In-Reply-To: <20200904081240.afvjaek5o2owlyeh@sirius.home.kraxel.org>
On 04/09/20 10:12, Gerd Hoffmann wrote:
> Hi,
>
>> if config_all_devices.has_key('CONFIG_QXL')
>> qxl_ss = ss.source_set()
>> - qxl_ss.add(when: 'CONFIG_QXL', if_true: files('qxl.c', 'qxl-logger.c', 'qxl-render.c'))
>> + qxl_ss.add(files('qxl.c', 'qxl-logger.c', 'qxl-render.c'))
>> hw_display_modules += {'qxl': qxl_ss}
>> endif
>>
>> -softmmu_ss.add(when: 'CONFIG_QXL', if_true: files('qxl.c', 'qxl-logger.c', 'qxl-render.c'))
>
> Damn. Turned out to not be that easy. Modular builds work fine, but
> with non-modular builds I have the problem that qxl_ss is merged into
> softmmu_ss *unconditionally*. So when building two targets, one with
> qxl enabled (i386 for example) and one without pci support (avr for
> example) I get missing symbols for pci+vga due to the attempt to link
> qxl into avr-softmmu.
You have found why it's got that "when:". :)
> Any hints how to solve that one?
I think this should be enough---fixing it in the common code, not with a
qxl-specific change:
diff --git a/meson.build b/meson.build
index 6ed3c37f46..88f2254f3b 100644
--- a/meson.build
+++ b/meson.build
@@ -923,7 +923,7 @@ softmmu_mods = []
foreach d, list : modules
foreach m, module_ss : list
if enable_modules and targetos != 'windows'
- module_ss = module_ss.apply(config_host, strict: false)
+ module_ss = module_ss.apply(config_all, strict: false)
sl = static_library(d + '-' + m, [genh, module_ss.sources()],
dependencies: [modulecommon, module_ss.dependencies()], pic: true)
if d == 'block'
:-O
If you want to get rid of the "if config_all_devices.has_key(...)", you perhaps
could try doing something like
module_srcs = module_ss.sources()
if module_srcs.length() == 0
continue
endif
sl = static_library(d + '-' + m, [genh, module_srcs],
dependencies: [modulecommon, module_ss.dependencies()], pic: true)
etc. This would work also for the CONFIG_VIRTIO_GPU changes.
Paolo
next prev parent reply other threads:[~2020-09-04 9:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-27 6:46 [PATCH] meson: fix qxl module build Gerd Hoffmann
2020-08-27 10:45 ` Marc-André Lureau
2020-09-04 8:12 ` Gerd Hoffmann
2020-09-04 9:02 ` Paolo Bonzini [this message]
2020-09-04 12:14 ` Gerd Hoffmann
2020-09-04 12:24 ` 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=2706f51d-381f-929e-7c8c-7df83f8491ff@redhat.com \
--to=pbonzini@redhat.com \
--cc=kraxel@redhat.com \
--cc=marcandre.lureau@gmail.com \
--cc=qemu-devel@nongnu.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).