[VDPAU] [PATCH 1/4] trace: use intermediate static library in the build

Rémi Denis-Courmont remi at remlab.net
Thu Mar 19 04:57:21 PDT 2015


Le 2015-03-19 14:17, Emil Velikov a écrit :
> On 19 March 2015 at 07:45, Rémi Denis-Courmont <remi at remlab.net> 
> wrote:
>> Le 2015-03-19 02:50, Emil Velikov a écrit :
>>>
>>> Compile the source into a static library, to prevent C++ linkage. 
>>> The
>>> latter of which unnesseserally pulls libm, libgcc_s and libstdc++ 
>>> as
>>> dependencies.
>>
>>
>> I think that's wrong. If a library has C++ code, it depends on 
>> libsdtc++ and
>> that's the end of the story. The rest is an implementation detail of 
>> the
>> compiler.
>>
> Just because something is written in C++ that does not have to mean
> that it depends on the C++ runtime.

Yes - it *does* mean it.

> This is one good example of such a
> case. Afaict the reason behind using C++ (over C) here is to make use
> of the additional type safety (possibly others).

What causes a symbol to be imported from libstdc++ is an implementation 
detail of the C++ compiler. As a programmer, you cannot assume anything 
about it. In fact, the very existence of libstdc++ is an implementation 
detail of GCC.

-- 
Rémi Denis-Courmont


More information about the VDPAU mailing list