Skip to content

meson: disable -DUSE_GCC_ATOMIC_BUILTINS when libatomic is missing

Jan Beich requested to merge jbeich/mesa:libatomic into main

FreeBSD doesn't ship libatomic for Clang to use, so use __sync* atomics. CC @manu, @zeising
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=230888

Checking if "GCC atomic builtins" compiles: YES
Checking if "GCC atomic builtins required -latomic" links: NO

meson.build:1098:4: ERROR: C library 'atomic' not found

ld.lld: error: undefined symbol: __atomic_load_8
>>> referenced by testfile.c
>>>               /tmp/testfile-055958.o:(main)

ld.lld: error: undefined symbol: __atomic_fetch_add_8
>>> referenced by testfile.c
>>>               /tmp/testfile-055958.o:(main)
cc: error: linker command failed with exit code 1 (use -v to see invocation)
Edited by Jordan Justen

Merge request reports