From: Yu Watanabe Date: Sun, 17 Jul 2022 20:02:48 +0000 (+0900) Subject: meson: refuse -ffinite-math-only X-Git-Tag: v252-rc1~609^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=60f97fee2d2f948c8e8963ea8ff767008cb93cae;p=thirdparty%2Fsystemd.git meson: refuse -ffinite-math-only Closes #23610. --- diff --git a/meson.build b/meson.build index 5d7c8699fe0..61073d4eadb 100644 --- a/meson.build +++ b/meson.build @@ -390,6 +390,11 @@ possible_common_cc_flags = [ c_args = get_option('c_args') +# Our json library does not support -ffinite-math-only, which is enabled by -Ofast or -ffast-math. +if (('-Ofast' in c_args or '-ffast-math' in c_args or '-ffinite-math-only' in c_args) and not '-fno-finite-math-only' in c_args) + error('-Ofast, -ffast-math, or -ffinite-math-only is specified in c_args.') +endif + # Disable -Wmaybe-uninitialized when compiling with -Os/-O1/-O3/etc. There are # too many false positives with gcc >= 8. Effectively, we only test with -O0 # and -O2; this should be enough to catch most important cases without too much