qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: Eduardo Habkost <ehabkost@redhat.com>,
	Peter Maydell <peter.maydell@linaro.org>,
	Fam Zheng <famz@redhat.com>,
	QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [RFC PATCH 00/11] Stubs cleanup
Date: Fri, 23 Dec 2016 04:18:19 -0500 (EST)	[thread overview]
Message-ID: <739597410.5141134.1482484699401.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <8737hfm312.fsf@dusky.pond.sub.org>



----- Original Message -----
> From: "Markus Armbruster" <armbru@redhat.com>
> To: "Paolo Bonzini" <pbonzini@redhat.com>
> Cc: "Eduardo Habkost" <ehabkost@redhat.com>, "Peter Maydell" <peter.maydell@linaro.org>, "Fam Zheng"
> <famz@redhat.com>, "QEMU Developers" <qemu-devel@nongnu.org>
> Sent: Friday, December 23, 2016 10:02:33 AM
> Subject: Re: [Qemu-devel] [RFC PATCH 00/11] Stubs cleanup
> 
> Paolo Bonzini <pbonzini@redhat.com> writes:
> 
> > On 22/12/2016 18:42, Eduardo Habkost wrote:
> >> On Thu, Dec 22, 2016 at 06:32:24PM +0100, Paolo Bonzini wrote:
> >>>
> >>>
> >>> On 22/12/2016 18:30, Peter Maydell wrote:
> >>>> On 22 December 2016 at 15:59, Paolo Bonzini <pbonzini@redhat.com> wrote:
> >>>>> This moves out of libqemustub.a those functions which can be handled
> >>>>> simply by $(call lnot), like we already do for pci-stub.c or
> >>>>> kvm-stub.c.
> >>>>> libqemustub.a keep the more complex cases where a small part of the
> >>>>> executables we build needs an implementation of a small subset of an
> >>>>> API.
> >>>>
> >>>> So why is doing it this way round better? (I don't have a strong
> >>>> opinion here, but you don't really give a rationale for this change.)
> >>>
> >>> I don't really have a strong opinion here either, hence the RFC.
> >>> However, one advantage is that it keeps things visible to the right
> >>> maintainer.
> >> 
> >> Can't we just move the files to subdirectories where they are
> >> visible to the maintainers, but keep using stub-obj-y/libqemustub
> >> to build/link them?
> >> 
> >> I find libqemustub/stub-obj-y much easier to use than manually
> >> setting obj-$(call lnot ...).
> >
> > Yes, that would work too.  It's a pity that we cannot just use weak
> > symbols, as that would work fine with obj-y.
> 
> Can you explain again why we can't use weak symbols?

Because Windows and OS X don't have full support for weak symbols.
At least as I understand it, OS X only supports "weak import" of
a symbol from a library, where if a symbol is missing _in the library_
it resolves to NULL in the program.  It doesn't support replacing a
weak definition of a function with a strong definition of the same,
and that's why we use a static library.

Paolo

      reply	other threads:[~2016-12-23  9:18 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-22 15:59 [Qemu-devel] [RFC PATCH 00/11] Stubs cleanup Paolo Bonzini
2016-12-22 15:59 ` [Qemu-devel] [PATCH 01/11] stubs: merge all monitor stubs in one file, remove monitor_cur_is_qmp stub Paolo Bonzini
2016-12-22 15:59 ` [Qemu-devel] [PATCH 02/11] stubs: move smbios stubs to hw/smbios Paolo Bonzini
2016-12-22 15:59 ` [Qemu-devel] [PATCH 03/11] stubs: move acpi stubs to hw/acpi Paolo Bonzini
2016-12-22 15:59 ` [Qemu-devel] [PATCH 04/11] stubs: remove unused stub for serial_hd Paolo Bonzini
2016-12-22 15:59 ` [Qemu-devel] [PATCH 05/11] hw: move reset handlers from vl.c to hw/core Paolo Bonzini
2016-12-22 15:59 ` [Qemu-devel] [PATCH 06/11] stubs: group stubs for user-mode emulation Paolo Bonzini
2016-12-22 15:59 ` [Qemu-devel] [PATCH 07/11] stubs: group all monitor_fdset_* functions in a single file Paolo Bonzini
2016-12-22 15:59 ` [Qemu-devel] [PATCH 08/11] stubs: move vhost stubs to stubs/vhost.o Paolo Bonzini
2016-12-22 15:59 ` [Qemu-devel] [PATCH 09/11] event_notifier: cleanups around event_notifier_set_handler Paolo Bonzini
2016-12-22 15:59 ` [Qemu-devel] [PATCH 10/11] build: remove --enable-colo/--disable-colo Paolo Bonzini
2016-12-22 15:59 ` [Qemu-devel] [PATCH 11/11] stubs: remove stubs/kvm.c Paolo Bonzini
2016-12-22 17:30 ` [Qemu-devel] [RFC PATCH 00/11] Stubs cleanup Peter Maydell
2016-12-22 17:32   ` Paolo Bonzini
2016-12-22 17:42     ` Eduardo Habkost
2016-12-22 17:45       ` Paolo Bonzini
2016-12-23  9:02         ` Markus Armbruster
2016-12-23  9:18           ` Paolo Bonzini [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=739597410.5141134.1482484699401.JavaMail.zimbra@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=armbru@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=famz@redhat.com \
    --cc=peter.maydell@linaro.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 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).