diff options
author | James Hilliard <james.hilliard1@gmail.com> | 2022-07-27 15:28:09 -0600 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2022-07-29 09:22:54 +0900 |
commit | 0a0d48996842ad478ee74c5224669c3650b2e2fe (patch) | |
tree | 5171b75c9c9e1cb98056cbc510c4214a24f0a31b /meson.build | |
parent | 219fa78b5fa2ec9c13dd87419366116e3197693f (diff) | |
download | systemd-0a0d48996842ad478ee74c5224669c3650b2e2fe.tar.gz |
journalctl: allow statically linked build
The journalctl tool may be needed on cross compilation hosts in order
to run --update-catalog against a target rootfs.
To avoid reliability issues caused by shared linking allow journalctl
to be linked statically.
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 47 |
1 files changed, 28 insertions, 19 deletions
diff --git a/meson.build b/meson.build index 692ee1ed4d..87e67c9c32 100644 --- a/meson.build +++ b/meson.build @@ -2263,11 +2263,19 @@ public_programs += executable( install_rpath : rootpkglibdir, install : true) +if get_option('link-journalctl-shared') + journalctl_link_with = [libshared] +else + journalctl_link_with = [libsystemd_static, + libshared_static, + libbasic_gcrypt] +endif + public_programs += executable( 'journalctl', journalctl_sources, include_directories : includes, - link_with : [libshared], + link_with : [journalctl_link_with], dependencies : [threads, libdl, libxz, @@ -4288,7 +4296,7 @@ foreach tuple : [ # components ['backlight'], ['binfmt'], - ['bpf-framework', conf.get('BPF_FRAMEWORK') == 1], + ['bpf-framework', conf.get('BPF_FRAMEWORK') == 1], ['coredump'], ['environment.d'], ['efi'], @@ -4318,7 +4326,7 @@ foreach tuple : [ ['resolve'], ['rfkill'], ['sysext'], - ['systemd-analyze', conf.get('ENABLE_ANALYZE') == 1], + ['systemd-analyze', conf.get('ENABLE_ANALYZE') == 1], ['sysupdate'], ['sysusers'], ['timedated'], @@ -4332,36 +4340,37 @@ foreach tuple : [ ['idn'], ['polkit'], ['nscd'], - ['legacy-pkla', install_polkit_pkla], + ['legacy-pkla', install_polkit_pkla], ['kmod'], ['dbus'], ['glib'], ['tpm'], - ['man pages', want_man], - ['html pages', want_html], - ['man page indices', want_man and have_lxml], + ['man pages', want_man], + ['html pages', want_html], + ['man page indices', want_man and have_lxml], ['SysV compat'], ['compat-mutable-uid-boundaries'], ['utmp'], ['ldconfig'], - ['adm group', get_option('adm-group')], - ['wheel group', get_option('wheel-group')], + ['adm group', get_option('adm-group')], + ['wheel group', get_option('wheel-group')], ['gshadow'], ['debug hashmap'], ['debug mmap cache'], ['debug siphash'], - ['valgrind', conf.get('VALGRIND') == 1], - ['trace logging', conf.get('LOG_TRACE') == 1], - ['install tests', install_tests], - ['link-udev-shared', get_option('link-udev-shared')], - ['link-systemctl-shared', get_option('link-systemctl-shared')], - ['link-networkd-shared', get_option('link-networkd-shared')], - ['link-timesyncd-shared', get_option('link-timesyncd-shared')], - ['link-boot-shared', get_option('link-boot-shared')], + ['valgrind', conf.get('VALGRIND') == 1], + ['trace logging', conf.get('LOG_TRACE') == 1], + ['install tests', install_tests], + ['link-udev-shared', get_option('link-udev-shared')], + ['link-systemctl-shared', get_option('link-systemctl-shared')], + ['link-networkd-shared', get_option('link-networkd-shared')], + ['link-timesyncd-shared', get_option('link-timesyncd-shared')], + ['link-journalctl-shared', get_option('link-journalctl-shared')], + ['link-boot-shared', get_option('link-boot-shared')], ['first-boot-full-preset'], ['fexecve'], - ['standalone-binaries', get_option('standalone-binaries')], - ['coverage', get_option('b_coverage')], + ['standalone-binaries', get_option('standalone-binaries')], + ['coverage', get_option('b_coverage')], ] if tuple.length() >= 2 |