mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2026-03-24 22:21:27 +00:00
build: fallback to __sync_synchronize()
If we're running on a GCC older than 4.9, then we won't have the stdatomic.h available. We can just use a full barrier instead using __sync_synchronize() to get the same effect, albeit slower.
This commit is contained in:
@ -181,7 +181,7 @@ foreach link_arg: test_link_args
|
||||
endforeach
|
||||
add_project_link_arguments(global_link_args, language: 'c')
|
||||
|
||||
if not cc.links('''
|
||||
if cc.links('''
|
||||
#include <stdatomic.h>
|
||||
int main(void) {
|
||||
atomic_thread_fence(memory_order_acquire);
|
||||
@ -189,7 +189,7 @@ int main(void) {
|
||||
return 0;
|
||||
}
|
||||
''')
|
||||
error('Sysprof requires a C compiler with stdatomic support such as GCC 4.9 or newer')
|
||||
config_h.set10('HAVE_STDATOMIC_H', 1)
|
||||
endif
|
||||
|
||||
subdir('src')
|
||||
|
||||
Reference in New Issue
Block a user