about summary refs log tree commit diff
path: root/src/meson.build
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2018-10-20 01:31:18 +0200
committerMichael Biebl <biebl@debian.org>2018-10-20 01:31:18 +0200
commitb4885f208ba690090952c0ae0452dd5bc2ba0601 (patch)
tree5c8af02da4543f7132b9bad45711a3a65e620d0d /src/meson.build
parent142485af41b7cf7b0060cc682a56d3ff38cabbb6 (diff)
parent6518e361171f64bcaaa4bf868139362ed95cc2e0 (diff)
Update upstream source from tag 'upstream/1.14.2'
Update to upstream version '1.14.2'
with Debian dir c118292f450ace1133a5dba2777cbeb54977dbe8
Diffstat (limited to 'src/meson.build')
-rw-r--r--src/meson.build28
1 files changed, 27 insertions, 1 deletions
diff --git a/src/meson.build b/src/meson.build
index f46366a9..87c57671 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -245,6 +245,7 @@ if enable_ppp
 endif
 
 subdir('devices')
+subdir('initrd')
 subdir('settings/plugins')
 
 # NetworkManager binary
@@ -252,11 +253,27 @@ subdir('settings/plugins')
 create_exports_networkmanager = join_paths(meson.source_root(), 'tools', 'create-exports-NetworkManager.sh')
 symbol_map_name = 'NetworkManager.ver'
 
+# libNetworkManager.a, as built by meson doesn't contain all symbols
+# from libNetworkManagerBase.a and other static libraries, unless we
+# add dependencies with link_whole, only supported in meson >= 0.46.
+# Create an executable with full symbols that we use in place of the
+# library to enumerate the symbols.
+network_manager_sym = executable(
+  'nm-full-symbols',
+  'main.c',
+  c_args: nm_cflags,
+  link_args: '-Wl,--no-gc-sections',
+  dependencies: nm_deps,
+  link_whole: [libnetwork_manager, libnetwork_manager_base, libnm_core],
+  install: false,
+)
+
+# this uses symbols from nm-full-symbols instead of libNetworkManager.a
 ver_script = custom_target(
   symbol_map_name,
   input: meson.source_root(),
   output: symbol_map_name,
-  depends: [ libnetwork_manager, core_plugins ],
+  depends: [ network_manager_sym, core_plugins ],
   command: [create_exports_networkmanager, '--called-from-build', '@INPUT@']
 )
 
@@ -273,3 +290,12 @@ network_manager = executable(
   install: true,
   install_dir: nm_sbindir
 )
+
+if enable_tests
+  foreach plugin : core_plugins
+    test ('sym/' + plugin.full_path().split('/')[-1],
+          network_manager,
+          args: '--version',
+          env: ['LD_BIND_NOW=1', 'LD_PRELOAD=' + plugin.full_path()])
+  endforeach
+endif