summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/glib-2.0/files/0001-meson-Run-atomics-test-on-clang-as-well.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/glib-2.0/files/0001-meson-Run-atomics-test-on-clang-as-well.patch')
-rw-r--r--meta/recipes-core/glib-2.0/files/0001-meson-Run-atomics-test-on-clang-as-well.patch28
1 files changed, 28 insertions, 0 deletions
diff --git a/meta/recipes-core/glib-2.0/files/0001-meson-Run-atomics-test-on-clang-as-well.patch b/meta/recipes-core/glib-2.0/files/0001-meson-Run-atomics-test-on-clang-as-well.patch
new file mode 100644
index 0000000000..2f80529987
--- /dev/null
+++ b/meta/recipes-core/glib-2.0/files/0001-meson-Run-atomics-test-on-clang-as-well.patch
@@ -0,0 +1,28 @@
1From 3dc2e741e18ccb740e98eb4e808ff83153b70e83 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 12 Oct 2019 17:46:26 -0700
4Subject: [PATCH] meson: Run atomics test on clang as well
5
6Fixes
7./glib-2.62.1/glib/gatomic.c:675:2: error: G_ATOMIC_LOCK_FREE defined, but incapable of lock-free atomics.
8^
9
10Upstream-Status: Pending
11Signed-off-by: Khem Raj <raj.khem@gmail.com>
12---
13 meson.build | 2 +-
14 1 file changed, 1 insertion(+), 1 deletion(-)
15
16diff --git a/meson.build b/meson.build
17index 2560686..5c46d0b 100644
18--- a/meson.build
19+++ b/meson.build
20@@ -2024,7 +2024,7 @@ atomicdefine = '''
21 # We know that we can always use real ("lock free") atomic operations with MSVC
22 if cc.get_id() == 'msvc' or cc.get_id() == 'clang-cl' or cc.links(atomictest, name : 'atomic ops')
23 have_atomic_lock_free = true
24- if cc.get_id() == 'gcc' and not cc.compiles(atomicdefine, name : 'atomic ops define')
25+ if (cc.get_id() == 'gcc' or cc.get_id() == 'clang') and not cc.compiles(atomicdefine, name : 'atomic ops define')
26 # Old gcc release may provide
27 # __sync_bool_compare_and_swap but doesn't define
28 # __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4