From: Rosen Penev Date: Sun, 2 Nov 2025 20:25:26 +0000 (-0800) Subject: meson: fix non threaded toolchains X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=278249ac779d585ba3decd09d89d5489631ffbe8;p=thirdparty%2Futil-linux.git meson: fix non threaded toolchains threads needs to be set as not required. Cleaned up meson build slightly to use one dependency call. Signed-off-by: Rosen Penev --- diff --git a/libuuid/meson.build b/libuuid/meson.build index 5115944ad..17b759a0c 100644 --- a/libuuid/meson.build +++ b/libuuid/meson.build @@ -31,8 +31,6 @@ if cc.has_link_argument('-Wl,--version-script=@0@'.format(libuuid_sym_path)) libuuid_link_args += ['-Wl,--version-script=@0@'.format(libuuid_sym_path)] endif -thread_dep = dependency('threads') - lib_uuid = library( 'uuid', list_h, @@ -47,7 +45,7 @@ lib_uuid = library( link_depends : libuuid_link_depends, version : libuuid_version, link_args : libuuid_link_args, - dependencies : [socket_libs, thread_dep, + dependencies : [socket_libs, thread_libs, build_libuuid ? [] : disabler()], install : build_libuuid) uuid_dep = declare_dependency(link_with: lib_uuid, include_directories: dir_libuuid) diff --git a/meson.build b/meson.build index 66fcbef54..7a995d612 100644 --- a/meson.build +++ b/meson.build @@ -804,7 +804,7 @@ if not have endif conf.set('HAVE_CLOCK_GETTIME', have ? 1 : false) -thread_libs = dependency('threads') +thread_libs = dependency('threads', required: false) conf.set('HAVE_LIBPTHREAD', thread_libs.found() ? 1 : false) have = cc.has_function('timer_create') @@ -880,7 +880,7 @@ have = cc.has_header_symbol('linux/vm_sockets.h', 'VMADDR_CID_LOCAL', prefix : '#include ') conf.set('HAVE_DECL_VMADDR_CID_LOCAL', have ? 1 : false) -build_plymouth_support = (not build_plymouth_support.disabled() and +build_plymouth_support = (not build_plymouth_support.disabled() and have_tiocglcktrmios and have_sock_cloexec and have_sock_nonblock and