qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 2/5] machine: introduce get_fw_dev_path() callba


From: Alexey Kardashevskiy
Subject: Re: [Qemu-devel] [PATCH 2/5] machine: introduce get_fw_dev_path() callback
Date: Tue, 03 Dec 2013 20:32:15 +1100
User-agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.1

On 12/03/2013 08:11 PM, Markus Armbruster wrote:
> Alexey Kardashevskiy <address@hidden> writes:
> 
>> On 11/26/2013 03:55 PM, Alexey Kardashevskiy wrote:
>>> Hi!
>>>
>>> btw there is a problem with this patch - it does not compile for
>>> "linux-user" as there is no current-machine global variable defined in vl.c
>>> which is not compiled for linux-user.
>>>
>>> How to solve this problem correctly?
> [...]
>> Anyone, please?
>>
>> The only easy fix for this I can think of would be this:
>>
>> extern QEMUMachine *current_machine __attribute__((weak));
>>
>>
>> But I suspect this is disgusting? :)
> 
> Absolutely not.  It's merely not portable to machines with object file
> formats and linkers stuck in the 80s.  However, we routinely twist
> ourselves into knots for portability (observation, not endorsement), and
> at least one previous attempt[*] to introduce weak symbols got nowhere.
> 
> [*] https://lists.nongnu.org/archive/html/qemu-devel/2012-07/msg03853.html


Since that GCC_WEAK patch did not make it to upstream, there must be
another way of fixing my issue :)


-- 
Alexey



reply via email to

[Prev in Thread] Current Thread [Next in Thread]