[PATCH libdrm v2 00/13] hide library symbols by default

Lucas De Marchi lucas.demarchi at intel.com
Fri Sep 21 21:14:45 UTC 2018


On Thu, Sep 20, 2018 at 01:16:09PM +0100, Emil Velikov wrote:
> On 14 September 2018 at 00:57, Lucas De Marchi <lucas.demarchi at intel.com> wrote:
> > Rely on -fvisibility=hidden to hide the symbols. Previous version of
> > this series applying only to drm_intel.so is
> >
> >         Reviewed-by: Eric Engestrom <eric.engestrom at intel.com>
> >
> > but it's not included here since I changed the approach for the build
> > system change.
> >
> > drm_private can also be removed from other symbols but it proved to be
> > a lot of manual work to re-align all the fields, so I decided to leave
> > it to be done on top as a cleanup.
> >
> Did you read through the reasoning behind
> 0f8da82500ec542e269092c0718479e25eaff5f6?

In v1 (https://lists.freedesktop.org/archives/dri-devel/2018-September/189639.html)
I had this:
    From git log archeology and mention in another thread we used to pass
    -fvisibility=hidden, but reverted to the contrary due to bug in obscure
    toolchain some years ago (see 0f8da82500ec542e269092c0718479e25eaff5f6).
    I think it's time to revisit that decision: we have plenty of other
    projects doing that nowadays without problem.

It looks like for some reason this was not part of the coverletter in v2,
sorry.

> 
> Alternatively you do not care too much about compat in said cases,
> which is fine.
> My only request is - keep it only for the Intel bits.

this is not only for Intel bits, it's improving all the libdrm as a whole.

A decision/commit made 3 year can be revisited, we don't have to carry it
forever. Do we have a problem with it *today*?  If we do, then we may have
another decision like working it around for the sad said compiler rather
than for everybody.  Default visibility hidden is a sane default adopted by
multiple open source libraries as it avoids unwanted results that can't
be taken back (like exporting a symbol that shouldn't have been) and
reduces maintenance (just look at the custom scripts we have to keep
checking the exported symbols).

Lucas De Marchi

> 
> Thanks
> Emil


More information about the dri-devel mailing list