From 1e3fcc495b250516db5ebe66cf33b58c1477508b Mon Sep 17 00:00:00 2001 From: Lucas De Marchi Date: Thu, 13 Sep 2018 16:24:32 -0700 Subject: [PATCH] autotools: make symbols hidden by default Now that symbols that should be exported are annotated accordingly, make all the rest hidden by default. Signed-off-by: Lucas De Marchi Acked-by: Eric Engestrom --- Makefile.am | 1 + amdgpu/Makefile.am | 1 + etnaviv/Makefile.am | 1 + exynos/Makefile.am | 1 + freedreno/Makefile.am | 1 + intel/Makefile.am | 1 + libkms/Makefile.am | 1 + nouveau/Makefile.am | 1 + omap/Makefile.am | 1 + radeon/Makefile.am | 1 + tegra/Makefile.am | 3 ++- tests/Makefile.am | 1 + tests/amdgpu/Makefile.am | 1 + tests/etnaviv/Makefile.am | 1 + tests/exynos/Makefile.am | 1 + tests/kms/Makefile.am | 3 ++- tests/kmstest/Makefile.am | 1 + tests/modeprint/Makefile.am | 1 + tests/modetest/Makefile.am | 1 + tests/nouveau/Makefile.am | 1 + tests/proptest/Makefile.am | 1 + tests/radeon/Makefile.am | 1 + tests/tegra/Makefile.am | 4 +++- tests/vbltest/Makefile.am | 1 + vc4/Makefile.am | 1 + 25 files changed, 29 insertions(+), 3 deletions(-) diff --git a/Makefile.am b/Makefile.am index faf0f750..730de1f2 100644 --- a/Makefile.am +++ b/Makefile.am @@ -121,6 +121,7 @@ libdrm_la_LIBADD = @CLOCK_LIB@ -lm libdrm_la_CPPFLAGS = -I$(top_srcdir)/include/drm AM_CFLAGS = \ $(WARN_CFLAGS) \ + -fvisibility=hidden \ $(VALGRIND_CFLAGS) libdrm_la_SOURCES = $(LIBDRM_FILES) diff --git a/amdgpu/Makefile.am b/amdgpu/Makefile.am index a1b0d05c..707082f0 100644 --- a/amdgpu/Makefile.am +++ b/amdgpu/Makefile.am @@ -26,6 +26,7 @@ include Makefile.sources AM_CFLAGS = \ $(WARN_CFLAGS) \ + -fvisibility=hidden \ -I$(top_srcdir) \ $(PTHREADSTUBS_CFLAGS) \ -I$(top_srcdir)/include/drm diff --git a/etnaviv/Makefile.am b/etnaviv/Makefile.am index be96ba86..9c2a3d7d 100644 --- a/etnaviv/Makefile.am +++ b/etnaviv/Makefile.am @@ -2,6 +2,7 @@ include Makefile.sources AM_CFLAGS = \ $(WARN_CFLAGS) \ + -fvisibility=hidden \ -I$(top_srcdir) \ $(PTHREADSTUBS_CFLAGS) \ -I$(top_srcdir)/include/drm diff --git a/exynos/Makefile.am b/exynos/Makefile.am index f99f8981..918b8d82 100644 --- a/exynos/Makefile.am +++ b/exynos/Makefile.am @@ -1,5 +1,6 @@ AM_CFLAGS = \ $(WARN_CFLAGS) \ + -fvisibility=hidden \ -I$(top_srcdir) \ $(PTHREADSTUBS_CFLAGS) \ -I$(top_srcdir)/include/drm diff --git a/freedreno/Makefile.am b/freedreno/Makefile.am index cbb0d031..4cb542d3 100644 --- a/freedreno/Makefile.am +++ b/freedreno/Makefile.am @@ -3,6 +3,7 @@ include Makefile.sources AM_CFLAGS = \ $(WARN_CFLAGS) \ + -fvisibility=hidden \ -I$(top_srcdir) \ $(PTHREADSTUBS_CFLAGS) \ $(VALGRIND_CFLAGS) \ diff --git a/intel/Makefile.am b/intel/Makefile.am index c52e8c08..5b1f2f56 100644 --- a/intel/Makefile.am +++ b/intel/Makefile.am @@ -26,6 +26,7 @@ include Makefile.sources AM_CFLAGS = \ $(WARN_CFLAGS) \ + -fvisibility=hidden \ -I$(top_srcdir) \ $(PTHREADSTUBS_CFLAGS) \ $(PCIACCESS_CFLAGS) \ diff --git a/libkms/Makefile.am b/libkms/Makefile.am index 461fc35b..5e08a380 100644 --- a/libkms/Makefile.am +++ b/libkms/Makefile.am @@ -2,6 +2,7 @@ include Makefile.sources AM_CFLAGS = \ $(WARN_CFLAGS) \ + -fvisibility=hidden \ -I$(top_srcdir)/include/drm \ -I$(top_srcdir) diff --git a/nouveau/Makefile.am b/nouveau/Makefile.am index 344a8445..3c4d043b 100644 --- a/nouveau/Makefile.am +++ b/nouveau/Makefile.am @@ -2,6 +2,7 @@ include Makefile.sources AM_CFLAGS = \ $(WARN_CFLAGS) \ + -fvisibility=hidden \ -I$(top_srcdir) \ $(PTHREADSTUBS_CFLAGS) \ -I$(top_srcdir)/include/drm \ diff --git a/omap/Makefile.am b/omap/Makefile.am index 599bb9de..26978ae7 100644 --- a/omap/Makefile.am +++ b/omap/Makefile.am @@ -1,5 +1,6 @@ AM_CFLAGS = \ $(WARN_CFLAGS) \ + -fvisibility=hidden \ -I$(top_srcdir) \ $(PTHREADSTUBS_CFLAGS) \ -I$(top_srcdir)/include/drm diff --git a/radeon/Makefile.am b/radeon/Makefile.am index e2415314..c07b4922 100644 --- a/radeon/Makefile.am +++ b/radeon/Makefile.am @@ -26,6 +26,7 @@ include Makefile.sources AM_CFLAGS = \ $(WARN_CFLAGS) \ + -fvisibility=hidden \ -I$(top_srcdir) \ $(PTHREADSTUBS_CFLAGS) \ -I$(top_srcdir)/include/drm diff --git a/tegra/Makefile.am b/tegra/Makefile.am index fb40be55..08b5e7c4 100644 --- a/tegra/Makefile.am +++ b/tegra/Makefile.am @@ -4,7 +4,8 @@ AM_CPPFLAGS = \ AM_CFLAGS = \ @PTHREADSTUBS_CFLAGS@ \ - $(WARN_CFLAGS) + $(WARN_CFLAGS) \ + -fvisibility=hidden libdrm_tegra_ladir = $(libdir) libdrm_tegra_la_LTLIBRARIES = libdrm_tegra.la diff --git a/tests/Makefile.am b/tests/Makefile.am index b72c24f9..d274a3e9 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -32,6 +32,7 @@ endif AM_CFLAGS = \ $(WARN_CFLAGS)\ + -fvisibility=hidden \ -I $(top_srcdir)/include/drm \ -I $(top_srcdir) diff --git a/tests/amdgpu/Makefile.am b/tests/amdgpu/Makefile.am index e79c1bd3..447ff217 100644 --- a/tests/amdgpu/Makefile.am +++ b/tests/amdgpu/Makefile.am @@ -1,4 +1,5 @@ AM_CFLAGS = \ + -fvisibility=hidden \ -I $(top_srcdir)/include/drm \ -I $(top_srcdir)/amdgpu \ -I $(top_srcdir) \ diff --git a/tests/etnaviv/Makefile.am b/tests/etnaviv/Makefile.am index 226baee2..3e0c6120 100644 --- a/tests/etnaviv/Makefile.am +++ b/tests/etnaviv/Makefile.am @@ -1,4 +1,5 @@ AM_CFLAGS = \ + -fvisibility=hidden \ -I $(top_srcdir)/include/drm \ -I $(top_srcdir)/etnaviv \ -I $(top_srcdir) diff --git a/tests/exynos/Makefile.am b/tests/exynos/Makefile.am index b6361727..9658fb42 100644 --- a/tests/exynos/Makefile.am +++ b/tests/exynos/Makefile.am @@ -1,6 +1,7 @@ AM_CFLAGS = \ -pthread \ $(WARN_CFLAGS)\ + -fvisibility=hidden \ -I $(top_srcdir)/include/drm \ -I $(top_srcdir)/libkms/ \ -I $(top_srcdir)/exynos \ diff --git a/tests/kms/Makefile.am b/tests/kms/Makefile.am index 6645af7a..42242006 100644 --- a/tests/kms/Makefile.am +++ b/tests/kms/Makefile.am @@ -4,7 +4,8 @@ AM_CPPFLAGS = \ -I$(top_srcdir) AM_CFLAGS = \ - $(WARN_CFLAGS) + $(WARN_CFLAGS) \ + -fvisibility=hidden noinst_LTLIBRARIES = libkms-test.la diff --git a/tests/kmstest/Makefile.am b/tests/kmstest/Makefile.am index ced541b7..4c993b04 100644 --- a/tests/kmstest/Makefile.am +++ b/tests/kmstest/Makefile.am @@ -1,5 +1,6 @@ AM_CFLAGS = \ $(WARN_CFLAGS)\ + -fvisibility=hidden \ -I$(top_srcdir)/include/drm \ -I$(top_srcdir)/libkms/ \ -I$(top_srcdir)/tests/ \ diff --git a/tests/modeprint/Makefile.am b/tests/modeprint/Makefile.am index 601dbc96..84d5990a 100644 --- a/tests/modeprint/Makefile.am +++ b/tests/modeprint/Makefile.am @@ -1,5 +1,6 @@ AM_CFLAGS = \ $(WARN_CFLAGS)\ + -fvisibility=hidden \ -I$(top_srcdir)/include/drm \ -I$(top_srcdir)/tests \ -I$(top_srcdir) diff --git a/tests/modetest/Makefile.am b/tests/modetest/Makefile.am index 4b296c83..5eebd960 100644 --- a/tests/modetest/Makefile.am +++ b/tests/modetest/Makefile.am @@ -3,6 +3,7 @@ include Makefile.sources AM_CFLAGS = $(filter-out -Wpointer-arith, $(WARN_CFLAGS)) AM_CFLAGS += \ + -fvisibility=hidden \ -pthread \ -I$(top_srcdir)/include/drm \ -I$(top_srcdir)/tests \ diff --git a/tests/nouveau/Makefile.am b/tests/nouveau/Makefile.am index 3c799a81..554f43ec 100644 --- a/tests/nouveau/Makefile.am +++ b/tests/nouveau/Makefile.am @@ -1,6 +1,7 @@ AM_CFLAGS = \ -pthread \ $(WARN_CFLAGS) \ + -fvisibility=hidden \ -I$(top_srcdir)/include/drm \ -I$(top_srcdir)/nouveau \ -I$(top_srcdir) diff --git a/tests/proptest/Makefile.am b/tests/proptest/Makefile.am index 3fde46be..33b8705b 100644 --- a/tests/proptest/Makefile.am +++ b/tests/proptest/Makefile.am @@ -2,6 +2,7 @@ include Makefile.sources AM_CFLAGS = \ $(WARN_CFLAGS)\ + -fvisibility=hidden \ -I$(top_srcdir)/include/drm \ -I$(top_srcdir)/tests \ -I$(top_srcdir) diff --git a/tests/radeon/Makefile.am b/tests/radeon/Makefile.am index 9da76259..3d173e31 100644 --- a/tests/radeon/Makefile.am +++ b/tests/radeon/Makefile.am @@ -1,5 +1,6 @@ AM_CFLAGS = \ $(WARN_CFLAGS)\ + -fvisibility=hidden \ -I $(top_srcdir)/include/drm \ -I $(top_srcdir) diff --git a/tests/tegra/Makefile.am b/tests/tegra/Makefile.am index 8e625c8f..b462a30c 100644 --- a/tests/tegra/Makefile.am +++ b/tests/tegra/Makefile.am @@ -3,7 +3,9 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/tegra \ -I$(top_srcdir) -AM_CFLAGS = $(WARN_CFLAGS) +AM_CFLAGS = \ + $(WARN_CFLAGS) \ + -fvisibility=hidden LDADD = \ ../../tegra/libdrm_tegra.la \ diff --git a/tests/vbltest/Makefile.am b/tests/vbltest/Makefile.am index 276afad5..b6cd7a4d 100644 --- a/tests/vbltest/Makefile.am +++ b/tests/vbltest/Makefile.am @@ -1,5 +1,6 @@ AM_CFLAGS = \ $(WARN_CFLAGS)\ + -fvisibility=hidden \ -I$(top_srcdir)/include/drm \ -I$(top_srcdir)/tests \ -I$(top_srcdir) diff --git a/vc4/Makefile.am b/vc4/Makefile.am index 7e486b4d..5f82d04e 100644 --- a/vc4/Makefile.am +++ b/vc4/Makefile.am @@ -23,6 +23,7 @@ include Makefile.sources AM_CFLAGS = \ $(WARN_CFLAGS) \ + -fvisibility=hidden \ -I$(top_srcdir) \ $(PTHREADSTUBS_CFLAGS) \ $(VALGRIND_CFLAGS) \