build: Fix test for G_ATOMIC_LOCK_FREE in meson.build
commit1a6fc60fe98c0652c10c4ddeac3e10619c67b862
authorPhilip Withnall <withnall@endlessm.com>
Wed, 16 May 2018 11:16:17 +0000 (16 12:16 +0100)
committerPhilip Withnall <withnall@endlessm.com>
Thu, 17 May 2018 14:10:41 +0000 (17 15:10 +0100)
treefecea820dbb9921633845b19ff5dbf1fc6ce736f
parentd388a00028dba4ad1c0540e86febba0acb0af163
build: Fix test for G_ATOMIC_LOCK_FREE in meson.build

Commit 3e96523e6b did not entirely fix the test, as the compiled test
code did not have a main() function, so failed to link with:

 /usr/lib/gcc/x86_64-redhat-linux/7/../../../../lib64/crt1.o: In function `_start':
(.text+0x20): undefined reference to `main'
collect2: error: ld returned 1 exit status

This caused an invalid mixtures of builtin and non-builtin atomics/locks
to be used, which caused deadlocks in a number of tests.

Fix the atomic ops test in meson.build, and the unit tests all start
working again.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
https://bugzilla.gnome.org/show_bug.cgi?id=796164
meson.build