From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thierry Reding Subject: Re: [RFC libdrm 1/6] configure: Support symbol visibility when available Date: Wed, 19 Feb 2014 22:50:03 +0100 Message-ID: <20140219215002.GB2638@ulmo.nvidia.com> References: <1392825893-7380-1-git-send-email-thierry.reding@gmail.com> <1392825893-7380-2-git-send-email-thierry.reding@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0056688920==" Return-path: Received: from mail-bk0-f51.google.com (mail-bk0-f51.google.com [209.85.214.51]) by gabe.freedesktop.org (Postfix) with ESMTP id D10FBF9DDA for ; Wed, 19 Feb 2014 13:50:05 -0800 (PST) Received: by mail-bk0-f51.google.com with SMTP id w10so385731bkz.24 for ; Wed, 19 Feb 2014 13:50:05 -0800 (PST) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org To: Erik Faye-Lund Cc: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============0056688920== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="61jdw2sOBCFtR2d/" Content-Disposition: inline --61jdw2sOBCFtR2d/ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 > wrote: > > From: Thierry Reding > > > > 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. >=20 > 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 --61jdw2sOBCFtR2d/ Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAEBAgAGBQJTBScKAAoJEN0jrNd/PrOh61cP/0jfYkv63vbQEPm0/oonKyq8 EcVCGEy2X3CiGV6P4EOniK35zKxpup8GdKYnZyVHqVnlsETiWaKoMvJIsMN3vJpR Yxiaihvc7WTGWEYJVNYropiP04fwZdY512KEz6ajq+Zctk9qnmHr1G0PQOy8g1He 8b0jb4aJTjODDEkkXn0zEtZx9eofWmDQZlMRXPSVIK3BqWVO9PXqyioJWpWL0MKj aAf9NGaoL51yI5MrKmejZdV/nl/SGXPacPQXk5UwBxsg03k/b0/SOExKgKt98b8M Tir/JodRvDj4BITIpu5SDfFYcg3PSuCDkwVhr52p/swfnSNs/PANeq9YgYCl+Ah/ bPEiMS8NRU7pRqooHZQ/yiodyTUms2Tpr3qwPkoEnyIFr5Ngbw7vEwb/X8jwEJbK gP+29s1/dVmMwRTxpg7le7ZinDs1XE+DSGtW6uAtuqDuSz8P25+4AjDXPJEzRJQk Yebztv5MTlptupJVMZuqLKnesXSKISgbGDBeIYH0r8teRvINA42roT7xIuvmVmKA HCYXAwMgDkM0d0WoPD/+GUenSL6z3Shft3c1m7MQX3izq6yBJokTaKYXV6QOlTGe Pct/kMsTee5HaWuivZLZEGeLj2CMSLny8p7bTy3A3AYSQElmGx+x3/aNzoskqmAo TELnl3EjpN1RQ+3rgOBu =0LGO -----END PGP SIGNATURE----- --61jdw2sOBCFtR2d/-- --===============0056688920== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel --===============0056688920==--