[mythtv-commits] Ticket #9426: MacOS X symbols missing
MythTV
noreply at mythtv.org
Sat Jan 22 20:11:51 UTC 2011
#9426: MacOS X symbols missing
-------------------------+----------------------------
Reporter: nigel | Owner: stuarta
Type: Bug Report | Status: closed
Priority: minor | Milestone: 0.25
Component: Ports - OSX | Version: Trunk Head
Severity: medium | Resolution: Fixed
Keywords: | Ticket locked: 0
-------------------------+----------------------------
Comment (by Dave Morrison <dave@…>):
Replying to [comment:12 stuarta]:
> I'm not seeing this on Snow Leopard with the current XCode toolset.
> What is it you are running on?
10.5.8 with gcc 4.0.1. I see the following in the development notes for
gcc 4.2:
C++ visibility handling has been overhauled.
Restricted visiblity is propagated from classes to members, from functions
to local statics, and from templates and template arguments to
instantiations, unless the latter has explicitly declared visibility.
So if I whip up a little test case, "visible.cpp":
{{{
#define MPUBLIC __attribute__((visibility("default")))
struct MPUBLIC outer
{
outer() {}
struct inner
{
inner() {}
} in;
};
float g()
{
outer o;
}
}}}
and do this:
{{{
$ /usr/bin/g++-4.0 -dynamiclib -o visible.so -fvisibility=hidden
visible.cpp && nm visible.so | c++filt | grep inner
00000f80 t outer::inner::inner()
}}}
you see that the nested class isn't globally visible. If I do this:
{{{
$ /usr/bin/g++-4.2 -dynamiclib -o visible.so -fvisibility=hidden
visible.cpp && nm visible.so | c++filt | grep inner
00000f80 T outer::inner::inner()
}}}
you can see that the nested class *is* globally visible.
So, FWIW, I think it's due to differences in visibility handling between
gcc 4.0 and 4.2.
Unless I'm completely wrong, that is.
--
Ticket URL: <http://code.mythtv.org/trac/ticket/9426#comment:13>
MythTV <http://code.mythtv.org/trac>
MythTV Media Center
More information about the mythtv-commits
mailing list