[dpdk-dev,RFCv2,18/40] build: add symbol version map file support to libs

Message ID 20170814095208.166496-19-bruce.richardson@intel.com (mailing list archive)
State RFC, archived
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Bruce Richardson Aug. 14, 2017, 9:51 a.m. UTC
  Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 drivers/net/meson.build | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
  

Patch

diff --git a/drivers/net/meson.build b/drivers/net/meson.build
index f64ab07f7..2358194e0 100644
--- a/drivers/net/meson.build
+++ b/drivers/net/meson.build
@@ -74,12 +74,17 @@  foreach drv:net_drivers
 	endforeach
 
 	# now build the driver itself, and add to the drivers list
-	lib = library('rte_pmd_@0@'.format(drv),
+	drv_name = 'rte_pmd_@0@'.format(drv)
+	version_map = '@0@/@1@/rte_pmd_@1@_version.map'.format(
+			meson.current_source_dir(), drv)
+	lib = library(drv_name,
 		sources,
 		include_directories: includes,
 		dependencies: deps,
 		link_with: libs,
 		c_args: cflags,
+		link_args: '-Wl,--version-script=' + version_map,
+		link_depends: version_map,
 		install: true,
 		install_dir: driver_install_path)