From: Stefan Weil <sw@weilnetz.de>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: blauwirbel@gmail.com, Peter Maydell <peter.maydell@linaro.org>,
aliguori@us.ibm.com, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v2] build: replace weak symbols with a static library
Date: Sun, 18 Nov 2012 19:31:35 +0100 [thread overview]
Message-ID: <50A92987.2000606@weilnetz.de> (raw)
In-Reply-To: <50A90889.1090603@redhat.com>
Am 18.11.2012 17:10, schrieb Paolo Bonzini:
> Il 16/11/2012 19:18, Peter Maydell ha scritto:
>
>> On 16 November 2012 17:35, Paolo Bonzini<pbonzini@redhat.com> wrote:
>>
>>> Weak symbols were a nice idea, but they turned out not to be a good one.
>>> Toolchain support is just too sparse, in particular llvm-gcc is totally
>>> broken.
>>>
>>> This patch uses a surprisingly low-tech approach: a static library.
>>> Symbols in a static library are always overridden by symbols in an
>>> object file. Furthermore, if you place each function in a separate
>>> source file, object files for unused functions will not be taken in.
>>> This means that each function can use all the dependencies that it needs
>>> (especially QAPI stuff such as error_setg).
>>>
>>> Thus, all stubs are placed in separate object files and put together in
>>> a static library. The library then is linked to all programs.
>>>
>>> Signed-off-by: Paolo Bonzini<pbonzini@redhat.com>
>>>
>> This builds and runs OK on Linux and MacOS X.
>> (nb: only system and usermode executables tested, not the standalone
>> utility executables like qemu-ga).
>>
>> Tested-by: Peter Maydell<peter.maydell@linaro.org>
>> Reviewed-by: Peter Maydell<peter.maydell@linaro.org>
>>
> I did some Windows testing, too. Blue, can you apply?
>
> Paolo
>
It also works for me (tested on Debian Linux and w32).
Tested-by: Stefan Weil <sw@weilnetz.de>
next prev parent reply other threads:[~2012-11-18 18:31 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-16 17:35 [Qemu-devel] [PATCH v2] build: replace weak symbols with a static library Paolo Bonzini
2012-11-16 18:18 ` Peter Maydell
2012-11-18 16:10 ` Paolo Bonzini
2012-11-18 18:31 ` Stefan Weil [this message]
2012-11-18 21:09 ` Blue Swirl
2012-11-18 22:12 ` Stefan Weil
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=50A92987.2000606@weilnetz.de \
--to=sw@weilnetz.de \
--cc=aliguori@us.ibm.com \
--cc=blauwirbel@gmail.com \
--cc=pbonzini@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 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.