From: Anthony Liguori <aliguori@us.ibm.com>
To: Blue Swirl <blauwirbel@gmail.com>
Cc: Peter Maydell <peter.maydell@linaro.org>,
qemu-devel@nongnu.org, libvir-list@redhat.com,
Alexander Graf <agraf@suse.de>,
Markus Armbruster <armbru@redhat.com>,
Eric Blake <eblake@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 4/7] compiler: add macro for GCC weak symbols
Date: Fri, 27 Jul 2012 15:51:34 -0500 [thread overview]
Message-ID: <877gtpexm1.fsf@codemonkey.ws> (raw)
In-Reply-To: <CAAu8pHsyYzssGjTYUtS8558pzsO5GzuAdmYQ7p0s467fOPy5mA@mail.gmail.com>
Blue Swirl <blauwirbel@gmail.com> writes:
> On Fri, Jul 27, 2012 at 3:31 PM, Anthony Liguori <aliguori@us.ibm.com> wrote:
>> Peter Maydell <peter.maydell@linaro.org> writes:
>>
>>> On 27 July 2012 15:27, Anthony Liguori <aliguori@us.ibm.com> wrote:
>>>> Peter Maydell <peter.maydell@linaro.org> writes:
>>>>> The GCC manual says "Weak symbols are supported for ELF targets,
>>>>> and also for a.out targets when using the GNU assembler and linker".
>>>>> Have you tested this on Windows and MacOSX ?
>>>>
>>>> Weak symbols are supposed to be supported by mingw32.
>>>>
>>>> I have no idea about MacOS X.
>>>>
>>>> I have no way to develop or test for MacOS X using free software so I
>>>> honestly don't care about it.
>>>
>>> My approach to this is to avoid non-standard things
>>
>> http://en.wikipedia.org/wiki/C99#Implementations
>>
>> So unless you plan on compiling QEMU with xlc, pgi, or icc, I don't
>> think relying on "standard things" really helps.
>
> LLVM/Clang should definitely be in the plan.
weak symbols are supported by clang.
>> QEMU doesn't support C99, it supports GCC. There's no point in
>> debating about whether we should rely on extensions or not. We already
>> do--extensively.
>
> Not so extensively. There are a few extensions for which there is no
> simple alternative (like QEMU_PACKED) but other compilers likely need
> similar extensions. Then there are other extensions (like :? without
> middle expression) which can be easily avoided. We should avoid to use
> the non-standard extensions whenever possible.
I disagree. I don't see a point to it. QEMU has never been routinely
built on anything other than GCC. Why go to a lot of trouble to support
a user base that doesn't exist?
If someone comes along and actively maintains support for another
compiler, we can revisit. But otherwise, there's no practical reason to
avoid extensions.
Regards,
Anthony Liguori
>
>>
>> Regards,
>>
>> Anthony Liguori
>>
>>
>>> -- if I
>>> write a patch which is pretty much standard C then it's the
>>> platform's problem if it mishandles it. If I write a patch
>>> that uses a compiler-specific or OS-specific thing then I
>>> have to also provide the relevant alternatives...so I try
>>> to avoid doing that :-)
>>>
>>> -- PMM
>>
>>
next prev parent reply other threads:[~2012-07-27 20:51 UTC|newest]
Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-27 13:37 [Qemu-devel] [PATCH 0/7] qapi: add commands to remove the need to parse -help output Anthony Liguori
2012-07-27 13:37 ` [Qemu-devel] [PATCH 1/7] qmp: introduce device-list-properties command Anthony Liguori
2012-07-27 16:05 ` Luiz Capitulino
2012-08-10 14:40 ` Anthony Liguori
2012-07-27 13:37 ` [Qemu-devel] [PATCH 2/7] qapi: mark QOM commands stable Anthony Liguori
2012-07-27 16:06 ` Luiz Capitulino
2012-08-10 14:40 ` Anthony Liguori
2012-07-27 13:37 ` [Qemu-devel] [PATCH 3/7] qapi: add query-machines command Anthony Liguori
2012-07-27 16:12 ` Luiz Capitulino
2012-08-10 14:41 ` Anthony Liguori
2012-08-10 14:50 ` Luiz Capitulino
2012-08-10 16:06 ` Anthony Liguori
2012-08-10 16:15 ` Luiz Capitulino
2012-07-27 17:25 ` Eric Blake
2012-07-27 18:12 ` Anthony Liguori
2012-07-27 18:28 ` Eric Blake
2012-07-27 13:37 ` [Qemu-devel] [PATCH 4/7] compiler: add macro for GCC weak symbols Anthony Liguori
2012-07-27 13:50 ` Peter Maydell
2012-07-27 14:27 ` Anthony Liguori
2012-07-27 14:45 ` Peter Maydell
2012-07-27 15:31 ` Anthony Liguori
2012-07-27 19:34 ` Blue Swirl
2012-07-27 20:51 ` Anthony Liguori [this message]
2012-07-27 21:04 ` Blue Swirl
2012-07-27 22:40 ` Anthony Liguori
2012-07-28 6:25 ` Markus Armbruster
2012-07-28 8:52 ` Blue Swirl
2012-07-28 8:45 ` Blue Swirl
2012-07-28 6:50 ` Peter Maydell
2012-07-28 8:58 ` Blue Swirl
2012-07-27 15:32 ` Anthony Liguori
2012-07-27 13:37 ` [Qemu-devel] [PATCH 5/7] qapi: add query-cpudefs command Anthony Liguori
2012-07-27 14:00 ` Peter Maydell
2012-07-27 15:01 ` Anthony Liguori
2012-07-27 16:19 ` Luiz Capitulino
2012-07-27 18:37 ` Eric Blake
2012-07-27 13:37 ` [Qemu-devel] [PATCH 6/7] target-i386: add implementation of query-cpudefs Anthony Liguori
2012-07-31 15:57 ` Eduardo Habkost
2012-08-10 14:43 ` Anthony Liguori
2012-08-10 15:59 ` Eduardo Habkost
2012-08-10 16:37 ` Anthony Liguori
2012-08-10 16:51 ` Eduardo Habkost
2012-08-10 17:09 ` Anthony Liguori
2012-08-10 17:31 ` Eduardo Habkost
2012-07-27 13:37 ` [Qemu-devel] [PATCH 7/7] target-ppc: " Anthony Liguori
2012-07-27 16:21 ` [Qemu-devel] [PATCH 0/7] qapi: add commands to remove the need to parse -help output Luiz Capitulino
2012-07-27 16:37 ` Daniel P. Berrange
-- strict thread matches above, loose matches on Subject: below --
2012-08-10 16:04 [Qemu-devel] [PATCH 0/7] qapi: add commands to remove the need (v2) Anthony Liguori
2012-08-10 16:04 ` [Qemu-devel] [PATCH 4/7] compiler: add macro for GCC weak symbols Anthony Liguori
2012-08-12 21:30 ` Peter Maydell
2012-08-13 13:44 ` Anthony Liguori
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=877gtpexm1.fsf@codemonkey.ws \
--to=aliguori@us.ibm.com \
--cc=agraf@suse.de \
--cc=armbru@redhat.com \
--cc=blauwirbel@gmail.com \
--cc=eblake@redhat.com \
--cc=libvir-list@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).