mirror of
https://github.com/systemd/systemd.git
synced 2025-03-10 16:58:28 +03:00
meson: include the library symbol version list in link_depends
This is pretty ugly, because I don't know how to use a single definition for two purposes: - --version-script needs a path relative to the build root - link_depends needs a path relative to source root Also, link_depends does not accept files() output [https://github.com/mesonbuild/meson/issues/1172], and I don't see a way to go from files() output to a string path that can be used to craft the -Wl arg. Ideally, a single files() result could be used in both places. I'm leaving this as a separate commit for now.
This commit is contained in:
parent
572baca1d4
commit
6b30f2801b
14
meson.build
14
meson.build
@ -962,17 +962,19 @@ libjournal_core = static_library(
|
||||
libsystemd_journal_internal],
|
||||
install : false)
|
||||
|
||||
version_script_arg = '@0@/@1@'.format(meson.current_source_dir(), libsystemd_sym)
|
||||
libsystemd = shared_library(
|
||||
'systemd',
|
||||
libsystemd_internal_sources,
|
||||
version : '0.18.0',
|
||||
include_directories : includes,
|
||||
link_args : ['-shared',
|
||||
'-Wl,--version-script=' + libsystemd_sym],
|
||||
'-Wl,--version-script=' + version_script_arg],
|
||||
link_with : [libbasic,
|
||||
libsystemd_internal,
|
||||
libsystemd_journal_internal],
|
||||
dependencies : [threads],
|
||||
link_depends : libsystemd_sym,
|
||||
install : true,
|
||||
install_dir : rootlibdir)
|
||||
|
||||
@ -988,7 +990,8 @@ foreach tuple : [['myhostname', 'HAVE_MYHOSTNAME', []],
|
||||
module = tuple[0]
|
||||
extra_deps = tuple[2]
|
||||
|
||||
sym = meson.current_source_dir() + '/src/nss-@0@/nss-@0@.sym'.format(module)
|
||||
sym = 'src/nss-@0@/nss-@0@.sym'.format(module)
|
||||
version_script_arg = join_paths(meson.current_source_dir(), sym)
|
||||
|
||||
shared_library(
|
||||
'nss_' + module,
|
||||
@ -996,12 +999,13 @@ foreach tuple : [['myhostname', 'HAVE_MYHOSTNAME', []],
|
||||
version : '2',
|
||||
include_directories : includes,
|
||||
link_args : ['-shared',
|
||||
'-Wl,--version-script=' + sym,
|
||||
'-Wl,--version-script=' + version_script_arg,
|
||||
'-Wl,--undefined'],
|
||||
link_with : [libsystemd_internal,
|
||||
libbasic],
|
||||
dependencies : [threads,
|
||||
librt] + extra_deps,
|
||||
link_depends : sym,
|
||||
install : true,
|
||||
install_dir : rootlibdir)
|
||||
endif
|
||||
@ -1207,16 +1211,18 @@ if conf.get('ENABLE_LOGIND', 0) == 1
|
||||
install_dir : rootbindir)
|
||||
|
||||
if conf.get('HAVE_PAM', 0) == 1
|
||||
version_script_arg = join_paths(meson.current_source_dir(), pam_systemd_sym)
|
||||
shared_library(
|
||||
'pam_systemd',
|
||||
pam_systemd_c,
|
||||
name_prefix : '',
|
||||
include_directories : includes,
|
||||
link_args : ['-shared',
|
||||
'-Wl,--version-script=' + pam_systemd_sym],
|
||||
'-Wl,--version-script=' + version_script_arg],
|
||||
link_with : [libshared],
|
||||
dependencies : [libpam,
|
||||
libpam_misc],
|
||||
link_depends : pam_systemd_sym,
|
||||
install : true,
|
||||
install_dir : pamlibdir)
|
||||
endif
|
||||
|
@ -88,7 +88,7 @@ libsystemd_internal = static_library(
|
||||
dependencies : [threads,
|
||||
librt])
|
||||
|
||||
libsystemd_sym = meson.current_source_dir() + '/libsystemd.sym'
|
||||
libsystemd_sym = 'src/libsystemd/libsystemd.sym'
|
||||
|
||||
libsystemd_pc = configure_file(
|
||||
input : 'libsystemd.pc.in',
|
||||
|
@ -16,17 +16,19 @@ libudev_sources = '''
|
||||
|
||||
############################################################
|
||||
|
||||
libudev_sym = meson.current_source_dir() + '/libudev.sym'
|
||||
libudev_sym = 'libudev.sym'
|
||||
|
||||
version_script_arg = '@0@/@1@'.format(meson.current_source_dir(), libudev_sym)
|
||||
libudev = shared_library(
|
||||
'udev',
|
||||
libudev_sources,
|
||||
version : '1.6.6',
|
||||
include_directories : includes,
|
||||
link_args : ['-shared',
|
||||
'-Wl,--version-script=' + libudev_sym],
|
||||
'-Wl,--version-script=' + version_script_arg],
|
||||
link_with : [libbasic,
|
||||
libsystemd],
|
||||
link_depends : libudev_sym,
|
||||
install : true,
|
||||
install_dir : rootlibdir)
|
||||
|
||||
|
@ -65,7 +65,7 @@ if conf.get('ENABLE_LOGIND', 0) == 1
|
||||
install_data(logind_conf,
|
||||
install_dir : pkgsysconfdir)
|
||||
|
||||
pam_systemd_sym = meson.current_source_dir() + '/pam_systemd.sym'
|
||||
pam_systemd_sym = 'src/login/pam_systemd.sym'
|
||||
pam_systemd_c = files('pam_systemd.c')
|
||||
|
||||
install_data('org.freedesktop.login1.conf',
|
||||
|
Loading…
x
Reference in New Issue
Block a user