[PATCH libdrm v2 00/13] hide library symbols by default
Eric Engestrom
eric.engestrom at intel.com
Fri Sep 14 09:28:46 UTC 2018
On Thursday, 2018-09-13 16:57:11 -0700, Lucas De Marchi 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.
Patches 1 (intel), 5 (libdrm) and 12 (meson) are:
Reviewed-by: Eric Engestrom <eric.engestrom at intel.com>
The rest of the series is:
Acked-by: Eric Engestrom <eric.engestrom at intel.com>
You can also add the same change to Android:
----8<----
diff --git a/Android.common.mk b/Android.common.mk
index e3de1069dfad4277347c..d0e5d559da1a73cf9fa1 100644
--- a/Android.common.mk
+++ b/Android.common.mk
@@ -2,6 +2,7 @@
LOCAL_CFLAGS += \
-DMAJOR_IN_SYSMACROS=1 \
-DHAVE_VISIBILITY=1 \
+ -fvisibility=hidden \
-DHAVE_LIBDRM_ATOMIC_PRIMITIVES=1
LOCAL_CFLAGS += \
---->8----
After that, the `drm_private` macro is ready to be removed :)
>
> 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.
>
> There were lots of changes to param alignement that had to be done
> manually, I may have missed some.
>
> Changes from v1:
> - Include changes for all other sub-libraries
> - Include changes to autotools
> - Make main Makefil.am and meson.build define the required
> flag
>
> This is build-tested locally and on gitlab:
> https://gitlab.freedesktop.org/demarchi/drm/pipelines/4339
>
> Lucas De Marchi (13):
> intel: annotate public functions
> libkms: annotate public functions
> nouveau: annotate public functions
> libkms: annotate public functions
> libdrm: annotate public functions
> etnaviv: annotate public functions
> freedreno: annotate public functions
> omap: annotate public functions
> radeon: annotate public functions
> tegra: annotate public functions
> exynos: annotate public functions
> meson: make symbols hidden by default
> autotools: make symbols hidden by default
>
> Makefile.am | 1 +
> amdgpu/Makefile.am | 1 +
> amdgpu/amdgpu_bo.c | 104 ++++++------
> amdgpu/amdgpu_cs.c | 137 +++++++--------
> amdgpu/amdgpu_device.c | 19 ++-
> amdgpu/amdgpu_gpu_info.c | 51 +++---
> amdgpu/amdgpu_vamgr.c | 24 +--
> amdgpu/amdgpu_vm.c | 5 +-
> amdgpu/meson.build | 2 +-
> etnaviv/Makefile.am | 1 +
> etnaviv/etnaviv_bo.c | 25 +--
> etnaviv/etnaviv_cmd_stream.c | 21 ++-
> etnaviv/etnaviv_device.c | 10 +-
> etnaviv/etnaviv_gpu.c | 6 +-
> etnaviv/etnaviv_perfmon.c | 8 +-
> etnaviv/etnaviv_pipe.c | 8 +-
> etnaviv/meson.build | 2 +-
> exynos/Makefile.am | 1 +
> exynos/exynos_drm.c | 30 ++--
> exynos/exynos_fimg2d.c | 20 +--
> exynos/meson.build | 2 +-
> freedreno/Makefile.am | 1 +
> freedreno/freedreno_bo.c | 32 ++--
> freedreno/freedreno_device.c | 12 +-
> freedreno/freedreno_pipe.c | 14 +-
> freedreno/freedreno_ringbuffer.c | 40 ++---
> freedreno/meson.build | 2 +-
> intel/Makefile.am | 1 +
> intel/intel_bufmgr.c | 64 +++----
> intel/intel_bufmgr_fake.c | 10 +-
> intel/intel_bufmgr_gem.c | 73 ++++----
> intel/intel_decode.c | 14 +-
> intel/meson.build | 4 +-
> libdrm_macros.h | 2 +
> libkms/Makefile.am | 1 +
> libkms/api.c | 16 +-
> libkms/meson.build | 2 +-
> meson.build | 5 +-
> nouveau/Makefile.am | 1 +
> nouveau/bufctx.c | 10 +-
> nouveau/meson.build | 2 +-
> nouveau/nouveau.c | 50 +++---
> nouveau/pushbuf.c | 18 +-
> omap/Makefile.am | 1 +
> omap/meson.build | 2 +-
> omap/omap_drm.c | 36 ++--
> radeon/Makefile.am | 1 +
> radeon/meson.build | 2 +-
> radeon/radeon_bo.c | 24 +--
> radeon/radeon_bo_gem.c | 16 +-
> radeon/radeon_cs.c | 24 +--
> radeon/radeon_cs_gem.c | 4 +-
> radeon/radeon_cs_space.c | 6 +-
> radeon/radeon_surface.c | 8 +-
> tegra/Makefile.am | 3 +-
> tegra/meson.build | 2 +-
> tegra/tegra.c | 26 +--
> tests/Makefile.am | 1 +
> tests/amdgpu/Makefile.am | 1 +
> tests/etnaviv/Makefile.am | 1 +
> tests/exynos/Makefile.am | 1 +
> tests/exynos/meson.build | 6 +-
> tests/kms/Makefile.am | 3 +-
> tests/kms/meson.build | 2 +-
> tests/kmstest/Makefile.am | 1 +
> tests/kmstest/meson.build | 2 +-
> tests/meson.build | 8 +-
> tests/modeprint/Makefile.am | 1 +
> tests/modeprint/meson.build | 2 +-
> tests/modetest/Makefile.am | 1 +
> tests/modetest/meson.build | 2 +-
> tests/nouveau/Makefile.am | 1 +
> tests/nouveau/meson.build | 2 +-
> tests/proptest/Makefile.am | 1 +
> tests/proptest/meson.build | 2 +-
> tests/radeon/Makefile.am | 1 +
> tests/radeon/meson.build | 2 +-
> tests/tegra/Makefile.am | 4 +-
> tests/tegra/meson.build | 2 +-
> tests/vbltest/Makefile.am | 1 +
> tests/vbltest/meson.build | 2 +-
> vc4/Makefile.am | 1 +
> xf86drm.c | 276 ++++++++++++++++---------------
> xf86drmHash.c | 15 +-
> xf86drmMode.c | 158 ++++++++++--------
> xf86drmRandom.c | 9 +-
> xf86drmSL.c | 23 +--
> 87 files changed, 803 insertions(+), 736 deletions(-)
>
> --
> 2.17.1
>
More information about the dri-devel
mailing list