]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
meson: also disable -Wmaybe-uninitialized when -Ofast is specified 37638/head
authorYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 27 May 2025 20:43:48 +0000 (05:43 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 27 May 2025 20:44:11 +0000 (05:44 +0900)
At least with GCC-14, -Ofast produces many false-positive warnings.
```
$ gcc --version
gcc (GCC) 14.2.1 20250110 (Red Hat 14.2.1-7)
```

meson.build

index 210e4814f3caa54401be0261f32ed56d41efb300..63eac45bbba7ad10b28801c2bb405e9b6e5207f3 100644 (file)
@@ -463,7 +463,8 @@ if cc.get_id() == 'gcc' and (not '02'.contains(get_option('optimization')) or
                              '-Os' in c_args or
                              '-O1' in c_args or
                              '-O3' in c_args or
-                             '-Og' in c_args)
+                             '-Og' in c_args or
+                             '-Ofast' in c_args)
         possible_common_cc_flags += '-Wno-maybe-uninitialized'
 endif