diff options
author | Thomas Haller <thaller@redhat.com> | 2021-01-28 08:39:19 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2021-01-28 09:31:13 +0100 |
commit | b98ec9bc58eb5738e5856e1d16aead218a672fcc (patch) | |
tree | 51e90ec8c0cbb6bbc1a5ad61334778e9982d44ac /src/devices/wwan | |
parent | 98ae351134703b0a085db07982e3e03734fb1d39 (diff) | |
download | NetworkManager-b98ec9bc58eb5738e5856e1d16aead218a672fcc.tar.gz |
build/meson: fix linking of core plugins to not include static helper libraries
We have many static helper libraries, like libnm-glib-aux or libnm-core.
These can be statically linked in any end-binary as internal API. However, they
must only be linked once.
Also, we have various plugins (device, settings, ppp, wwan) which are
dlopened by NetworkManager. They should use the symbols from
NetworkManager core. It is important that they do not link with the
static libraries already, because also NetworkManager core links with
it, so these symbols will be duplicate.
As the symbols are internal, you might think that it is not a real
problem to duplicate them. However, there are also global variables,
like the hash tables for NMRefStr or the seed for NMHash. These global
variables must be only be used once, and hence also these symbols must
no be duplicated.
Fix that by adding a new dependency that is for the core plugins. This
dependency only has "include_directories" but not "link_with".
Diffstat (limited to 'src/devices/wwan')
-rw-r--r-- | src/devices/wwan/meson.build | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/devices/wwan/meson.build b/src/devices/wwan/meson.build index d9ac36de16..87af042949 100644 --- a/src/devices/wwan/meson.build +++ b/src/devices/wwan/meson.build @@ -13,7 +13,7 @@ libnm_wwan = shared_module( 'nm-modem-manager.c', ) + (enable_ofono ? files('nm-modem-ofono.c') : files()), dependencies: [ - core_default_dep, + core_plugin_dep, libsystemd_dep, mm_glib_dep, ], @@ -47,7 +47,7 @@ libnm_device_plugin_wwan = shared_module( 'nm-wwan-factory.c', ), dependencies: [ - core_default_dep, + core_plugin_dep, libsystemd_dep, mm_glib_dep, ], |