[vlc-devel] [vlc-commits] src: fixed build when compiling for Apple platforms with dynamic plugins
Rafaël Carré
funman at videolan.org
Sat Mar 24 23:27:01 CET 2012
Le 2012-03-24 14:49, Felix Kühne a écrit :
> On Fri, Mar 23, 2012 at 7:38 AM, Rafaël Carré <funman at videolan.org> wrote:
>> Le 2012-03-22 21:39, Felix Paul Kühne a écrit :
>>> vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Fri Mar 23 02:30:47 2012 +0100| [c01855ebfb251f4a52560c9f8cb0639d47d7147d] | committer: Felix Paul Kühne
>>>
>>> src: fixed build when compiling for Apple platforms with dynamic plugins
>>>
>>>> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c01855ebfb251f4a52560c9f8cb0639d47d7147d
>>> ---
>>>
>>> src/modules/bank.c | 2 +-
>>> 1 files changed, 1 insertions(+), 1 deletions(-)
>>>
>>> diff --git a/src/modules/bank.c b/src/modules/bank.c
>>> index 43e6e67..0328ea9 100644
>>> --- a/src/modules/bank.c
>>> +++ b/src/modules/bank.c
>>> @@ -69,7 +69,7 @@ static void module_StoreBank (module_t *module)
>>> modules.head = module;
>>> }
>>>
>>> -#if defined(__ELF__) || defined(__APPLE__)
>>> +#if defined(__ELF__) || (defined(__APPLE__) && !HAVE_DYNAMIC_PLUGINS)
>>> # ifdef __GNUC__
>>> __attribute__((weak))
>>> # else
>>
>> What does this fix exactly ?
>
> Sorry for the late response. It fixes this linking problem, when
> compiling VLC for Darwin with dynamic plugins (read OS X):
> CCLD libvlccore.la
> Undefined symbols for architecture x86_64:
> "_vlc_static_modules", referenced from:
> _module_InitBank in bank.o
> ld: symbol(s) not found for architecture x86_64
It means the weak symbol doesn't work as intended.
I am happy with courmisch's change, if someone want both dynamic &
static plugins he can fix it.
More information about the vlc-devel
mailing list