]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
meson: add -pthreads and more libs when -Dlink-udev-shared=false (#6159)
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 21 Jun 2017 10:05:15 +0000 (06:05 -0400)
committerLennart Poettering <lennart@poettering.net>
Wed, 21 Jun 2017 10:05:15 +0000 (12:05 +0200)
Three binaries would fail to link when ld.bfd was used and link-udev-shared was
false. Add -pthreads (again) to the failing binaries and synchronize the
dependency list between libsystemd-shared .a and .so versions.
Apart from allowing the build to succeed, this shouldn't have much effect becuase
systemd-networkd was already using pthreads.

Fixes #5828.

meson.build
src/network/meson.build
src/shared/meson.build

index 0c6293dba42799a8e3b2f4e35d248f1129b96b5f..cab08dc67d4c805572f3266fd0856840b2267657 100644 (file)
@@ -2175,6 +2175,7 @@ if conf.get('ENABLE_NETWORKD', false)
                                 libsystemd_network,
                                 libudev_internal,
                                 libshared],
+                   dependencies : [threads],
                    install_rpath : rootlibexecdir,
                    install : true,
                    install_dir : rootlibexecdir)
index 521b21a18fa62f9a5893dc955e16ed929d2a79b5..35ecd86379b53d967dc8e863e24d7f8f9d8f12eb 100644 (file)
@@ -133,7 +133,7 @@ if conf.get('ENABLE_NETWORKD', false)
       libudev_internal,
       libsystemd_network,
       libshared],
-     []],
+     [threads]],
 
     [['src/network/test-network-tables.c',
       'src/network/test-network-tables.c',
@@ -143,7 +143,7 @@ if conf.get('ENABLE_NETWORKD', false)
       libudev_core,
       libsystemd_network,
       libshared],
-     [],
+     [threads],
      '', '', [],
      [network_include_dir] + libudev_core_includes],
   ]
index a9a5b4a6d469048c416373c097714a609317b19a..2eaef11a2d48f104fb277fe783f8e4c4be479049 100644 (file)
@@ -122,6 +122,20 @@ endif
 
 libshared_name = 'systemd-shared-@0@'.format(meson.project_version())
 
+libshared_deps = [threads,
+                  librt,
+                  libcap,
+                  libacl,
+                  libcryptsetup,
+                  libgcrypt,
+                  libiptc,
+                  libseccomp,
+                  libselinux,
+                  libidn,
+                  libxz,
+                  liblz4,
+                  libblkid]
+
 libshared = shared_library(
         libshared_name,
         shared_sources,
@@ -132,19 +146,7 @@ libshared = shared_library(
         include_directories : includes,
         link_args : ['-shared'],
         c_args : ['-fvisibility=default'],
-        dependencies : [threads,
-                        librt,
-                        libcap,
-                        libacl,
-                        libcryptsetup,
-                        libgcrypt,
-                        libiptc,
-                        libseccomp,
-                        libselinux,
-                        libidn,
-                        libxz,
-                        liblz4,
-                        libblkid],
+        dependencies : libshared_deps,
         install : true,
         install_dir : rootlibexecdir)
 
@@ -153,14 +155,4 @@ libshared_static = static_library(
         shared_sources,
         basic_sources,
         include_directories : includes,
-        dependencies : [threads,
-                        librt,
-                        libcap,
-                        libacl,
-                        libcryptsetup,
-                        libseccomp,
-                        libselinux,
-                        libidn,
-                        libxz,
-                        liblz4,
-                        libblkid])
+        dependencies : libshared_deps)