summaryrefslogtreecommitdiff
path: root/src/test/meson.build
diff options
context:
space:
mode:
authorEvgeny Vereshchagin <evvers@ya.ru>2022-05-26 16:16:22 +0000
committerFrantisek Sumsal <frantisek@sumsal.cz>2022-05-29 19:05:58 +0000
commitf232c83c7257e08ccbeafc994c90e38515d04c6e (patch)
tree3026ad91ff7c1f98f7b2df8b5ef469d62fc747a4 /src/test/meson.build
parent2581dbcb0f0d328015088d3dcf13119a717bcc3c (diff)
downloadsystemd-f232c83c7257e08ccbeafc994c90e38515d04c6e.tar.gz
tests: link tests using fabs against libm explicitly
Some compiler wrappers like honggfuzz pass -fno-builtin explicitly and because of that the tests where fabs is used fail to compile with something like ``` FAILED: test-bus-marshal ... /usr/bin/ld: test-bus-marshal.p/src_libsystemd_sd-bus_test-bus-marshal.c.o: undefined reference to symbol 'fabs@@GLIBC_2.2.5' /usr/bin/ld: /usr/lib64/libm.so.6: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status ``` Fun fact: it took honggfuzz less than a minute to discover https://github.com/advisories/GHSA-gmc7-pqv9-966m used by systemd to compress/descompress some stuff.
Diffstat (limited to 'src/test/meson.build')
-rw-r--r--src/test/meson.build8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/test/meson.build b/src/test/meson.build
index 74da544a46..d9304d538b 100644
--- a/src/test/meson.build
+++ b/src/test/meson.build
@@ -211,7 +211,9 @@ tests += [
[files('test-mkdir.c')],
- [files('test-json.c')],
+ [files('test-json.c'),
+ [],
+ [libm]],
[files('test-modhex.c')],
@@ -275,7 +277,9 @@ tests += [
[files('test-parse-helpers.c')],
- [files('test-parse-util.c')],
+ [files('test-parse-util.c'),
+ [],
+ [libm]],
[files('test-sysctl-util.c')],