]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - meson.build
Merge pull request #27846 from keszybz/link-mode-generation
[thirdparty/systemd.git] / meson.build
index 3919a4a9b0518a51c481f6a91f1b14aa32b61b4a..867148a110e4188af4741c3eb57155acf9bfe1a8 100644 (file)
@@ -376,6 +376,7 @@ possible_common_cc_flags = [
         '-Werror=return-type',
         '-Werror=shift-count-overflow',
         '-Werror=shift-overflow=2',
+        '-Werror=strict-flex-arrays',
         '-Werror=undef',
         '-Wfloat-equal',
         # gperf prevents us from enabling this because it does not emit fallthrough
@@ -1134,10 +1135,10 @@ else
                         clang_supports_bpf = run_command(clang, '-target', 'bpf', '--print-supported-cpus', check : false).returncode() == 0
                 endif
         elif bpf_compiler == 'gcc'
-                warning('GCC BPF Compiler support is experimental and not recommended.')
                 bpf_gcc = find_program('bpf-gcc',
+                                       'bpf-none-gcc',
                                        required : true,
-                                       version : '>= 12.1.0')
+                                       version : '>= 13.1.0')
                 bpf_gcc_found = bpf_gcc.found()
         endif
 
@@ -1526,7 +1527,7 @@ conf.set10('HAVE_LIBFIDO2', have)
 
 want_tpm2 = get_option('tpm2')
 if want_tpm2 != 'false' and not skip_deps
-        tpm2 = dependency('tss2-esys tss2-rc tss2-mu',
+        tpm2 = dependency('tss2-esys tss2-rc tss2-mu tss2-tcti-device',
                           required : want_tpm2 == 'true')
         have = tpm2.found()
         have_esys3 = tpm2.version().version_compare('>= 3.0.0')
@@ -2215,8 +2216,6 @@ subdir('src/udev')
 subdir('src/libudev')
 subdir('src/cryptsetup/cryptsetup-tokens')
 
-alias_target('devel', libsystemd_pc, libudev_pc)
-
 libsystemd = shared_library(
         'systemd',
         version : libsystemd_version,
@@ -2411,6 +2410,8 @@ subdir('rules.d')
 subdir('test')
 subdir('src/ukify/test')  # needs to be last for test_env variable
 
+alias_target('devel', libsystemd_pc, libudev_pc, systemd_pc, udev_pc)
+
 ############################################################
 
 # only static linking apart from libdl, to make sure that the
@@ -3853,7 +3854,9 @@ public_programs += executable(
 # there.
 meson.add_install_script('sh', '-c', mkdir_p.format(credstoredir))
 if install_sysconfdir
+        # Keep in sync with tmpfiles.d/credstore.conf
         meson.add_install_script('sh', '-c', mkdir_p_mode.format(sysconfdir / 'credstore', '0700'))
+        meson.add_install_script('sh', '-c', mkdir_p_mode.format(sysconfdir / 'credstore.encrypted', '0700'))
 endif
 
 executable(
@@ -4375,17 +4378,17 @@ executable(
         install : true,
         install_dir : rootlibexecdir)
 
-kernel_install = custom_target(
+kernel_install = executable(
         'kernel-install',
-        input : kernel_install_in,
-        output : 'kernel-install',
-        command : [jinja2_cmdline, '@INPUT@', '@OUTPUT@'],
+        'src/kernel-install/kernel-install.c',
+        include_directories : includes,
+        link_with : [libshared],
+        dependencies : [userspace,
+                        versiondep],
+        install_rpath : rootpkglibdir,
         install : want_kernel_install,
-        install_mode : 'rwxr-xr-x',
         install_dir : bindir)
-if want_kernel_install
-        public_programs += exe
-endif
+public_programs += kernel_install
 
 ukify = custom_target(
         'ukify',
@@ -4396,19 +4399,22 @@ ukify = custom_target(
         install_mode : 'rwxr-xr-x',
         install_dir : rootlibexecdir)
 if want_ukify
-   public_programs += ukify
+        public_programs += ukify
 endif
 
 if want_tests != 'false' and want_kernel_install
-        args = [kernel_install.full_path(), loaderentry_install, uki_copy_install]
+        args = [kernel_install.full_path(), loaderentry_install.full_path(), uki_copy_install]
+        deps = [kernel_install, loaderentry_install]
         if want_ukify and boot_stubs.length() > 0
-                args += [ukify.full_path(), ukify_install, boot_stubs[0]]
+                args += [ukify.full_path(), ukify_install.full_path(), boot_stubs[0]]
+                deps += [ukify, ukify_install, boot_stubs[0]]
         endif
 
         test('test-kernel-install',
              test_kernel_install_sh,
              env : test_env,
-             args : args)
+             args : args,
+             depends: deps)
 endif
 
 ############################################################