[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 4/7] compiler: add macro for GCC weak symbols
From: |
Blue Swirl |
Subject: |
Re: [Qemu-devel] [PATCH 4/7] compiler: add macro for GCC weak symbols |
Date: |
Fri, 27 Jul 2012 19:34:00 +0000 |
On Fri, Jul 27, 2012 at 3:31 PM, Anthony Liguori <address@hidden> wrote:
> Peter Maydell <address@hidden> writes:
>
>> On 27 July 2012 15:27, Anthony Liguori <address@hidden> wrote:
>>> Peter Maydell <address@hidden> 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.
>
> 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.
>
> 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
>
>
- [Qemu-devel] [PATCH 0/7] qapi: add commands to remove the need to parse -help output, Anthony Liguori, 2012/07/27
- [Qemu-devel] [PATCH 4/7] compiler: add macro for GCC weak symbols, Anthony Liguori, 2012/07/27
- Re: [Qemu-devel] [PATCH 4/7] compiler: add macro for GCC weak symbols, Peter Maydell, 2012/07/27
- Re: [Qemu-devel] [PATCH 4/7] compiler: add macro for GCC weak symbols, Anthony Liguori, 2012/07/27
- Re: [Qemu-devel] [PATCH 4/7] compiler: add macro for GCC weak symbols, Peter Maydell, 2012/07/27
- Re: [Qemu-devel] [PATCH 4/7] compiler: add macro for GCC weak symbols, Anthony Liguori, 2012/07/27
- Re: [Qemu-devel] [PATCH 4/7] compiler: add macro for GCC weak symbols,
Blue Swirl <=
- Re: [Qemu-devel] [PATCH 4/7] compiler: add macro for GCC weak symbols, Anthony Liguori, 2012/07/27
- Re: [Qemu-devel] [PATCH 4/7] compiler: add macro for GCC weak symbols, Blue Swirl, 2012/07/27
- Re: [Qemu-devel] [PATCH 4/7] compiler: add macro for GCC weak symbols, Anthony Liguori, 2012/07/27
- Re: [Qemu-devel] [PATCH 4/7] compiler: add macro for GCC weak symbols, Markus Armbruster, 2012/07/28
- Re: [Qemu-devel] [PATCH 4/7] compiler: add macro for GCC weak symbols, Blue Swirl, 2012/07/28
- Re: [Qemu-devel] [PATCH 4/7] compiler: add macro for GCC weak symbols, Blue Swirl, 2012/07/28
- Re: [Qemu-devel] [PATCH 4/7] compiler: add macro for GCC weak symbols, Peter Maydell, 2012/07/28
- Re: [Qemu-devel] [PATCH 4/7] compiler: add macro for GCC weak symbols, Blue Swirl, 2012/07/28
- Re: [Qemu-devel] [PATCH 4/7] compiler: add macro for GCC weak symbols, Anthony Liguori, 2012/07/27
[Qemu-devel] [PATCH 3/7] qapi: add query-machines command, Anthony Liguori, 2012/07/27