summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorBruce Richardson <bruce.richardson@intel.com>2017-12-06 10:45:48 +0000
committerBruce Richardson <bruce.richardson@intel.com>2018-01-30 21:58:59 +0100
commited4d43d73e2b9f50c6ad6513b0f817bcc278f869 (patch)
tree25d1a1c99f4e6a171f3ff1330ddd18975f366187 /meson.build
parent93b1f90ae17425c496257bacb21d9699dd072cf3 (diff)
downloaddpdk-ed4d43d73e2b9f50c6ad6513b0f817bcc278f869.zip
dpdk-ed4d43d73e2b9f50c6ad6513b0f817bcc278f869.tar.gz
dpdk-ed4d43d73e2b9f50c6ad6513b0f817bcc278f869.tar.xz
build: symlink drivers to library directory
With the introduction of bus drivers, we now have a situation where driver libraries will start to depend upon each other. Because of this, the driver libs need to be discoverable by the dynamic loader. There are three options to fix this: 1. Force the user to put the $libdir/dpdk/drivers folder into their library path. 2. Move all libraries from drivers sub-directory to $libdir. 3. Symlink all libraries from the subfolder to the main library dir. Option 1 is not great for usability or distro packaging, and option 2 means that we can't have EAL load all drivers from a known path automatically (as it would error out on non-PMD libs), so option 3 was chosen as the best fix. The only downside is that on a "ninja uninstall" the symlinks are not removed, as they are unknown to meson/ninja. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Luca Boccassi <bluca@debian.org>
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build7
1 files changed, 7 insertions, 0 deletions
diff --git a/meson.build b/meson.build
index 71a0c4f..fb62b14 100644
--- a/meson.build
+++ b/meson.build
@@ -77,6 +77,13 @@ configure_file(output: build_cfg,
# them.
dpdk_drivers = ['-Wl,--whole-archive'] + dpdk_drivers + ['-Wl,--no-whole-archive']
+# driver .so files often depend upon the bus drivers for their connect bus,
+# e.g. ixgbe depends on librte_bus_pci. This means that the bus drivers need
+# to be in the library path, so symlink the drivers from the main lib directory.
+meson.add_install_script('buildtools/symlink-drivers-solibs.sh',
+ driver_install_path,
+ get_option('libdir'))
+
pkg = import('pkgconfig')
pkg.generate(name: meson.project_name(),
filebase: 'lib' + meson.project_name().to_lower(),