[RFC libdrm 1/6] configure: Support symbol visibility when available (original) (raw)
Thierry Reding thierry.reding at gmail.com
Wed Feb 19 13:50:03 PST 2014
- Previous message: [RFC libdrm 1/6] configure: Support symbol visibility when available
- Next message: [RFC libdrm 2/6] libdrm: Add NVIDIA Tegra support
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Wed, Feb 19, 2014 at 10:05:19PM +0100, Erik Faye-Lund wrote:
On Wed, Feb 19, 2014 at 5:04 PM, Thierry Reding <thierry.reding at gmail.com> wrote: > From: Thierry Reding <treding at nvidia.com> > > Checks whether or not the compiler supports the -fvisibility option. If > so it sets the VISIBILITYCFLAGS variable which can be added to the per > directory AMCFLAGS where appropriate. > > Libraries can use the HAVEVISIBILITY preprocessor definition to check > for availability and use something like this: > > #if defined(HAVEVISIBILITY) > # define drmprivate attribute((visibility("hidden"))) > # define drmpublic attribute((visibility("default"))) > #else > # define drmprivate > # define drmpublic > #endif > > By default all symbols will be hidden via the VISIBILITYCFLAGS. Only > symbols explicitly marked drmpublic will be exported.
As I said in the other patch, I think it makes more sense to define these globally. The other drivers still need to opt-in on the feature, but it's less work, less duplication of logic and less points-of-failure ;)
Well, if you put it that way, having it in somewhere in the core might be a better option after all. I'll sleep on it.
Thierry -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: not available URL: <http://lists.freedesktop.org/archives/dri-devel/attachments/20140219/fdf75166/attachment.pgp>
- Previous message: [RFC libdrm 1/6] configure: Support symbol visibility when available
- Next message: [RFC libdrm 2/6] libdrm: Add NVIDIA Tegra support
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]