From c36310fed160c7a99ab099e5f7c1dca6c1f09c0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Thu, 13 Oct 2022 19:44:40 +0200 Subject: [PATCH] tod: Force libfprint-tod to be a shared library and link whole with private Also unset the private library if set and make libfprint to only link with the tod one. This fixes the issue we had with wrong symbols shared by multiple libraries --- libfprint/tod/meson.build | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/libfprint/tod/meson.build b/libfprint/tod/meson.build index f3ca0cf7..ff59d1f8 100644 --- a/libfprint/tod/meson.build +++ b/libfprint/tod/meson.build @@ -35,7 +35,7 @@ foreach source: libfprint_private_sources tod_sources += '..' / source endforeach -libfprint_tod = library(versioned_libname.split('lib')[1] + '-tod', +libfprint_tod = shared_library(versioned_libname.split('lib')[1] + '-tod', c_args: [ '-DTOD_LIBRARY=1', '-include', '@0@'.format(files('tod-symbols.h')[0]), @@ -50,7 +50,7 @@ libfprint_tod = library(versioned_libname.split('lib')[1] + '-tod', '-Wl,--unresolved-symbols=ignore-in-object-files' ], link_depends: mapfile, - link_with: [libfprint_private], + link_whole: [libfprint_tod_private], dependencies: deps, install: true) @@ -104,3 +104,7 @@ install_headers(tod_headers, install_headers(tod_local_headers, subdir: tod_subpath / 'tod', ) + +# Replace the libfprint private instance with the TOD one in this case as we +# contain already all the symbols. +libfprint_private = libfprint_tod