Re: [RFC libdrm 1/6] configure: Support symbol visibility when available

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Feb 19, 2014 at 5:04 PM, Thierry Reding
<thierry.reding@xxxxxxxxx> wrote:
> From: Thierry Reding <treding@xxxxxxxxxx>
>
> Checks whether or not the compiler supports the -fvisibility option. If
> so it sets the VISIBILITY_CFLAGS variable which can be added to the per
> directory AM_CFLAGS where appropriate.
>
> Libraries can use the HAVE_VISIBILITY preprocessor definition to check
> for availability and use something like this:
>
>         #if defined(HAVE_VISIBILITY)
>         #  define drm_private __attribute__((visibility("hidden")))
>         #  define drm_public __attribute__((visibility("default")))
>         #else
>         #  define drm_private
>         #  define drm_public
>         #endif
>
> By default all symbols will be hidden via the VISIBILITY_CFLAGS. Only
> symbols explicitly marked drm_public 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 ;)
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux