[Mesa-dev] Mesa symbol visibility
Brian Paul
brianp at vmware.com
Thu Aug 12 07:00:19 PDT 2010
On 08/12/2010 07:52 AM, Dan Nicholson wrote:
> On Thu, Aug 12, 2010 at 2:07 AM, Kevin H. Hobbs<hobbsk at ohiou.edu> wrote:
>> On 08/11/2010 05:18 PM, tom fogal wrote:
>>> Right. This is exactly why Mesa's name mangling exists.
>>> You mean you haven't been mangling this whole time? I guess I haven't
>>> been reading these mails closely enough.
>>>
>>> -tom
>>>
>>
>> It just seems perverse to have to use name mangling to deal with the
>> effects of adding -fvisibility=hidden.
>
> Well, to be fair you were mostly getting lucky with a special case.
> Like Ian says, trying to link with 2 different OpenGL libraries is a
> little dicey. People building a DRI-enabled GL weren't offered this
> possibility. Still, I feel bad that we didn't think of this issue at
> the time.
>
> A possible compromise here would be to put glX* stubs in OSMesa, but
> _that_ seems perverse, too.
>
>> Maybe if name mangling really is required now the whole
>> "--with-driver=xlib produces libGL.so and libOSMesa.so in one pas"
>> should be disabled.
>
> I'd kind of like to have OSMesa just be --{enable,disable}-osmesa
> since it's completely standalone now. It would make some of the build
> code less scary, too.
Just FYI: the original intention was that libGL.so contained all the
gl and glX entrypoints. The libOSMesa.so library just contained the
OSMesa interface functions and driver code. If you wanted to use
OSMesa you had to link with libGL too (since that's where most of the
code was) and you could freely mix GLX and OSMesa rendering in one
application.
Going a step further, when the fbdev driver was working you could use
FBDev + GLX + OSMesa all in one app if you wanted to.
I don't recall anymore why this was changed. Maybe it could be
restored to how it used to be?
-Brian
More information about the mesa-dev
mailing list