'b_lto=true',
'b_lto_mode=thin',
'b_colorout=always',
- 'b_asneeded=true',
+ 'b_asneeded=false',
'b_pie=true',
'b_staticpic=true',
'c_std=gnu11',
want_seccomp = get_option('seccomp')
want_thread_safety = get_option('thread-safety')
want_memfd_rexec = get_option('memfd-rexec')
-want_sd_bus = get_option('sd-bus')
+want_dbus = get_option('dbus')
srcconf.set_quoted('DEFAULT_CGROUP_PATTERN', cgrouppattern)
if coverity
]
possible_link_flags = [
+ '-Wl,--no-as-needed',
'-Wl,--gc-sections',
'-Wl,-z,relro',
'-Wl,-z,now',
- '-Wl,-fuse-ld=gold',
'-fstack-protector',
'-fstack-protector-strong',
]
+# The gold linker fails with a bus error on sparc64
+if build_machine.cpu_family() != 'sparc64'
+ possible_link_flags += '-Wl,-fuse-ld=gold'
+endif
+
if sanitize == 'none'
possible_link_flags += '-Wl,--warn-common'
endif
srcconf.set10('HAVE_LIBURING', false)
endif
-if not want_sd_bus.disabled()
- has_sd_bus = true
- sd_bus_optional = want_sd_bus.auto()
-
- libsystemd = dependency('libsystemd', required: not sd_bus_optional)
- if not libsystemd.found()
- if not sd_bus_optional
- error('missing required libsystemd dependency')
- endif
-
- has_sd_bus = false
- endif
-
- if not cc.has_header('systemd/sd-bus.h')
- if not sd_bus_optional
- error('libsystemd misses required systemd/sd-bus.h header')
- endif
-
- has_sd_bus = false
- endif
-
- if not cc.has_header('systemd/sd-event.h')
- if not sd_bus_optional
- error('libsystemd misses required systemd/sd-event.h header')
- endif
-
- has_sd_bus = false
- endif
-
- if not cc.has_function('sd_bus_call_method_async', prefix: '#include <systemd/sd-bus.h>', dependencies: libsystemd)
- if not sd_bus_optional
- error('libsystemd misses required sd_bus_call_method_async function')
- endif
-
- has_sd_bus = false
- endif
-
- if has_sd_bus
- liblxc_dependencies += libsystemd
- if want_oss_fuzz
- oss_fuzz_dependencies += libsystemd
- endif
- endif
-
- srcconf.set10('HAVE_LIBSYSTEMD', has_sd_bus)
+if want_dbus
+ libdbus = dependency('dbus-1', required: true)
+ pkgconfig_libs += libdbus
+ liblxc_dependencies += libdbus
+ srcconf.set10('HAVE_DBUS', libdbus.found())
else
- has_sd_bus = false
- srcconf.set10('HAVE_LIBSYSTEMD', false)
+ srcconf.set10('HAVE_DBUS', false)
endif
## Time EPOCH.
found_headers = []
missing_headers = []
foreach tuple: [
- ['systemd/sd-bus.h'],
- ['systemd/sd-event.h'],
['sys/resource.h'],
['sys/memfd.h'],
['sys/personality.h'],
['pam'],
['openssl'],
['liburing'],
- ['libsystemd'],
]
if tuple.length() >= 2