diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2018-05-11 14:09:40 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2018-05-16 14:23:12 +1000 |
commit | 8178339b5baa717cccc1ddb506f70eaf9a0c8832 (patch) | |
tree | 8778516b5c26a7c059a4aa4b076f2602c092b878 /meson.build | |
parent | 2d111826899d788eac3b76ecca902598a9e730b3 (diff) |
meson: add a 'coverity' option to fix the build
Coverity screwed up something so we can't submit builds right now, the
compilation units all fail. math.h pulls in a _Float128 type that coverity
cannot handle. So as a workaround, add an option to the build to avoid this
and remove it when the next version of coverity hopefully fixes this.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/meson.build b/meson.build index 8d36357e..9d2cb444 100644 --- a/meson.build +++ b/meson.build @@ -39,6 +39,21 @@ if cc.get_define('static_assert', prefix : prefix) == '' config_h.set('static_assert(...)', '/* */') endif +# Coverity breaks because it doesn't define _Float128 correctly, you'll end +# up with a bunch of messages in the form: +# "/usr/include/stdlib.h", line 133: error #20: identifier "_Float128" is +# undefined +# extern _Float128 strtof128 (const char *__restrict __nptr, +# ^ +# We don't use float128 ourselves, it gets pulled in from math.h or +# something, so let's just define it as uint128 and move on. +# Unfortunately we can't detect the coverity build at meson configure +# time, we only know it fails at runtime. So make this an option instead, to +# be removed when coverity fixes this again. +if get_option('coverity') + config_h.set('_Float128', '__uint128_t') +endif + # Dependencies pkgconfig = import('pkgconfig') dep_udev = dependency('libudev') |