mirror of
https://github.com/systemd/systemd.git
synced 2025-08-31 09:49:54 +03:00
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.
This commit is contained in:
committed by
Frantisek Sumsal
parent
2581dbcb0f
commit
f232c83c72
@ -222,7 +222,8 @@ tests += [
|
|||||||
libglib,
|
libglib,
|
||||||
libgobject,
|
libgobject,
|
||||||
libgio,
|
libgio,
|
||||||
libdbus]],
|
libdbus,
|
||||||
|
libm]],
|
||||||
|
|
||||||
[files('sd-bus/test-bus-signature.c'),
|
[files('sd-bus/test-bus-signature.c'),
|
||||||
[],
|
[],
|
||||||
|
@ -211,7 +211,9 @@ tests += [
|
|||||||
|
|
||||||
[files('test-mkdir.c')],
|
[files('test-mkdir.c')],
|
||||||
|
|
||||||
[files('test-json.c')],
|
[files('test-json.c'),
|
||||||
|
[],
|
||||||
|
[libm]],
|
||||||
|
|
||||||
[files('test-modhex.c')],
|
[files('test-modhex.c')],
|
||||||
|
|
||||||
@ -275,7 +277,9 @@ tests += [
|
|||||||
|
|
||||||
[files('test-parse-helpers.c')],
|
[files('test-parse-helpers.c')],
|
||||||
|
|
||||||
[files('test-parse-util.c')],
|
[files('test-parse-util.c'),
|
||||||
|
[],
|
||||||
|
[libm]],
|
||||||
|
|
||||||
[files('test-sysctl-util.c')],
|
[files('test-sysctl-util.c')],
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user