diff mbox series

[v1,1/1] build: limit symbol visibility for libodp-linux

Message ID 1517853606-19509-2-git-send-email-odpbot@yandex.ru
State New
Headers show
Series [v1,1/1] build: limit symbol visibility for libodp-linux | expand

Commit Message

Github ODP bot Feb. 5, 2018, 6 p.m. UTC
From: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>


If libodp-linux is linked with static DPDK libraries, it will re-export
all DPDK symbols. Use libtool's -export-symbols-regex to limit symbol
visibility.

Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>

---
/** Email created from pull request 454 (lumag:symbol-visible)
 ** https://github.com/Linaro/odp/pull/454
 ** Patch: https://github.com/Linaro/odp/pull/454.patch
 ** Base sha: 27a7923236030fed0272cc9072f0cde62496e91d
 ** Merge commit sha: 9946727ce9cb49ea5aa50dc26e46b48abc871f7e
 **/
 platform/Makefile.inc | 6 ++++++
 1 file changed, 6 insertions(+)
diff mbox series

Patch

diff --git a/platform/Makefile.inc b/platform/Makefile.inc
index 4714de0ee..813ad97e0 100644
--- a/platform/Makefile.inc
+++ b/platform/Makefile.inc
@@ -8,6 +8,12 @@  lib_LTLIBRARIES = $(LIB)/libodp-linux.la
 
 AM_LDFLAGS = -version-number '$(ODP_LIBSO_VERSION)'
 
+if ODP_ABI_COMPAT
+AM_LDFLAGS += -export-symbols-regex '^(_deprecated)?odp_'
+else
+AM_LDFLAGS += -export-symbols-regex '^(_deprecated)?_?odp_'
+endif
+
 AM_CFLAGS = "-DGIT_HASH=$(VERSION)"
 AM_CFLAGS += $(VISIBILITY_CFLAGS)