From: Markus Armbruster <armbru@redhat.com>
To: Max Reitz <mreitz@redhat.com>
Cc: kwolf@redhat.com, qemu-devel@nongnu.org, qemu-block@nongnu.org,
jeff@codyprime.org
Subject: Re: [Qemu-devel] [PATCH] block: Make more block drivers compile-time configurable
Date: Wed, 07 Nov 2018 07:37:45 +0100 [thread overview]
Message-ID: <877ehpxuiu.fsf@dusky.pond.sub.org> (raw)
In-Reply-To: <3b245d71-abe1-9ae2-1671-7d29a1676d70@redhat.com> (Max Reitz's message of "Tue, 6 Nov 2018 01:54:00 +0100")
Max Reitz <mreitz@redhat.com> writes:
> On 05.11.18 16:25, Markus Armbruster wrote:
>> Max Reitz <mreitz@redhat.com> writes:
>>
>>> On 19.10.18 13:34, Markus Armbruster wrote:
>>>> From: Jeff Cody <jcody@redhat.com>
>>>>
>>>> This adds configure options to control the following block drivers:
>>>>
>>>> * Bochs
>>>> * Cloop
>>>> * Dmg
>>>> * Qcow (V1)
>>>> * Vdi
>>>> * Vvfat
>>>> * qed
>>>> * parallels
>>>> * sheepdog
>>>>
>>>> Each of these defaults to being enabled.
>>>>
>>>> Signed-off-by: Jeff Cody <jcody@redhat.com>
>>>> Signed-off-by: Markus Armbruster <armbru@redhat.com>
>>>> ---
>>>>
>>>> Hmm, we got quite a few --enable-BLOCK-DRIVER now. Perhaps a single
>>>> list-valued option similar --target-list would be better. Could be
>>>> done on top.
>>>>
>>>> block/Makefile.objs | 22 ++++++++---
>>>> configure | 91 +++++++++++++++++++++++++++++++++++++++++++++
>>>> 2 files changed, 107 insertions(+), 6 deletions(-)
>>>>
>>>> diff --git a/block/Makefile.objs b/block/Makefile.objs
>>>> index c8337bf186..1cad9fc4f1 100644
>>>> --- a/block/Makefile.objs
>>>> +++ b/block/Makefile.objs
>> @@ -1,10 +1,18 @@
>> -block-obj-y += raw-format.o qcow.o vdi.o vmdk.o cloop.o bochs.o vpc.o vvfat.o dmg.o
>> +block-obj-y += raw-format.o vmdk.o vpc.o
>> +block-obj-$(CONFIG_QCOW1) += qcow.o
>> +block-obj-$(CONFIG_VDI) += vdi.o
>> +block-obj-$(CONFIG_CLOOP) += cloop.o
>> +block-obj-$(CONFIG_BOCHS) += bochs.o
>> +block-obj-$(CONFIG_VVFAT) += vvfat.o
>> +block-obj-$(CONFIG_DMG) += dmg.o
>> +
>> block-obj-y += qcow2.o qcow2-refcount.o qcow2-cluster.o qcow2-snapshot.o qcow2-cache.o qcow2-bitmap.o
>>>
>>> [...]
>>>
>>>> @@ -45,7 +54,8 @@ gluster.o-libs := $(GLUSTERFS_LIBS)
>>>> vxhs.o-libs := $(VXHS_LIBS)
>>>> ssh.o-cflags := $(LIBSSH2_CFLAGS)
>>>> ssh.o-libs := $(LIBSSH2_LIBS)
>>>> -block-obj-$(if $(CONFIG_BZIP2),m,n) += dmg-bz2.o
>>>> +block-obj-dmg-bz2$(if $(CONFIG_BZIP2),m,n) += dmg-bz2.o
>>>> +block-obj-$(CONFIG_DMG) += $(block-obj-dmg-bz2-y)
>>>
>>> This defines "block-obj-dmg-bz2m" or "block-obj-dmg-bz2n", so
>>> "block-obj-dmg-bz2-y" is never defined (note both the missing hyphen and
>>> the "m" vs. "y").
>>>
>>> How about:
>>>
>>> block-obj-dmg-bz2-$(CONFIG_BZIP2) += dmg-bz2.o
>>
>> As far as I can tell, CONFIG_BZIP2 is either undefined or "y". Thus,
>> block-obj-dmg-bz2-y is either left undefined or set to dmg-bz2.o.
>
> Yes.
>
>> Perhaps the '+=' be ':=', but we seem to use '+=' pretty
>> indiscriminately.
>
> Yep. I don't know. Whatever works, and both do, so...
>
>>> block-obj-$(if $(CONFIG_DMG),m,n) += $(block-obj-dmg-bz2-y)
>>
>> As far as I can tell, CONFIG_DMG is also either undefined or "y". So,
>> this adds dmg-bz2.o to block-obj-m if both CONFIG_BZIP2 and CONFIG_DMG
>> are enabled.
>
> Yes.
>
>> Shouldn't it be added to block-obj-y, like dmg.o, or am I confused?
>
> The behavior before this patch was to add it to block-obj-m.
> 27685a8dd08c051fa6d641fe46106fc0dfa51073 has the explanation: We want
> the bz2 part to be a module so you can launch qemu even without libbz2
> around. Only when you use dmg will it load that module.
>
> (And if you dig deeper, it was 88d88798b7efe that (intentionally) broke
> that intended behavior, until it was restored by the above commit.)
Thanks, v2 sent with your fix.
prev parent reply other threads:[~2018-11-07 6:43 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-19 11:34 [Qemu-devel] [PATCH] block: Make more block drivers compile-time configurable Markus Armbruster
2018-11-04 23:40 ` Max Reitz
2018-11-05 15:25 ` Markus Armbruster
2018-11-06 0:54 ` Max Reitz
2018-11-07 6:37 ` Markus Armbruster [this message]
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=877ehpxuiu.fsf@dusky.pond.sub.org \
--to=armbru@redhat.com \
--cc=jeff@codyprime.org \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=qemu-block@nongnu.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.