mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 03:16:17 +01:00
meson: Fix atomic ops test to match configure.ac
We must try linking, not just compiling. That will give a false positive.
This commit is contained in:
parent
91c9cb5a52
commit
3e96523e6b
@ -1465,10 +1465,10 @@ atomictest = '''void func() {
|
||||
__sync_bool_compare_and_swap (&atomic, 2, 3);
|
||||
}
|
||||
'''
|
||||
if cc.compiles(atomictest)
|
||||
if cc.links(atomictest, name : 'atomic ops')
|
||||
glibconfig_conf.set('G_ATOMIC_LOCK_FREE', true)
|
||||
else
|
||||
if host_machine.cpu_family() == 'x86' and cc.compiles(atomictest, args : '-march=i486')
|
||||
if host_machine.cpu_family() == 'x86' and cc.links(atomictest, args : '-march=i486')
|
||||
error('GLib must be built with -march=i486 or later.')
|
||||
endif
|
||||
glibconfig_conf.set('G_ATOMIC_LOCK_FREE', false)
|
||||
|
Loading…
Reference in New Issue
Block a user