[Bug 667289] build: Adds and uses SunPro visibilty attribute for proper function exports.

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Wed Mar 21 04:54:51 PDT 2012

  GStreamer | gstreamer (core) | git

--- Comment #2 from Idar Tollefsen <itollefs at cisco.com> 2012-03-21 11:54:44 UTC ---
The commit messages should indeed have been better.

There are two things leading up to this.

Firstly, both for SunPro and GCC, the default visibility of functions exported
from a library can be set either with command line options or through
attributes like the one in the patch. The default for both is global
visibility. If this is lowered on the command line (say to "protected"), then
this sort of macro is needed to make sure the function gets exported.

That said, the use of "extern" should be enough to inform the compiler that
even if the visibility has been lowered, this function should still be visible.

Which brings me to the second and specific reason why this patch was needed;
When compiling with SunPro (on Solaris) with high levels of optimization and
link-time optimization turned on ("-xipo" is enough), it decides that this
symbol isn't used outside of the library as it finds it internally and
therefore doesn't export it. The visibility attribute fixes this and forces it
to export it anyway.

The SunPro version check there is sort of arbitrary. I'm not sure exactly which
version of SunPro attribute handling was introduced, but I know it exists in
the version it checks for here.

Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.

More information about the gstreamer-bugs mailing list