Skip to content

util/process_test: make the error variable static

David Heidelberg requested to merge dh/mesa:rename_error_to_failed into main

Make the error variable static to prevent a clash with the glibc error() function when LTO is used.

Otherwise, it'll fail in the linking phase with a conflict:

[411/2321] Linking target src/util/process_test
FAILED: src/util/process_test
c++  -o src/util/process_test src/util/process_test.p/tests_process_test.c.o -flto -Wl,--as-needed -Wl,--no-undefined -Wl,--fatal-warnings -Wl,--start-group src/util/libmesa_util.a src/util/format/libmesa_format.a src/util/libmesa_util_sse41.a src/c11/impl/libmesa_util_c11.a subprojects/perfetto/libperfetto.a /usr/lib/x86_64-linux-gnu/libz.so -pthread -lm -ldl /usr/lib/x86_64-linux-gnu/libunwind.so -Wl,--end-group
mold: error: symbol type mismatch: error
>>> defined in /tmp/process_test.SLc9I6.ltrans0.ltrans.o as STT_OBJECT
>>> defined in /lib/x86_64-linux-gnu/libc.so.6 as STT_FUNC

Signed-off-by: David Heidelberg david.heidelberg@collabora.com

Edited by David Heidelberg

Merge request reports