Commit 81b1ff83 authored by Philip Withnall's avatar Philip Withnall

Merge branch 'atomic' into 'master'

fix atomic detection on older gcc versions

See merge request !991
parents 77cc96ae a76cb943
Pipeline #96296 failed with stages
in 13 minutes and 26 seconds
......@@ -1597,8 +1597,8 @@ atomicdefine = '''
# We know that we can always use real ("lock free") atomic operations with MSVC
if cc.get_id() == 'msvc' or cc.links(atomictest, name : 'atomic ops')
have_atomic_lock_free = true
if (host_system == 'android' or host_system == 'linux') and not cc.compiles(atomicdefine, name : 'atomic ops define')
# When building for armv5 on Linux, gcc provides
if cc.get_id() == 'gcc' and not cc.compiles(atomicdefine, name : 'atomic ops define')
# Old gcc release may provide
# __sync_bool_compare_and_swap but doesn't define
glib_conf.set('__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4', true)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment