diff options
author | Khem Raj <raj.khem@gmail.com> | 2019-10-12 17:51:17 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-10-15 14:16:12 +0100 |
commit | e2a0c001db2f9ec62ac1a784edf4c14fb98ef10c (patch) | |
tree | 5c19d7d4ae8f21362c8a73c0f80970e2b2eca383 | |
parent | 1144b124f30df41f15cd7ea9a55dd3f162ade191 (diff) | |
download | poky-e2a0c001db2f9ec62ac1a784edf4c14fb98ef10c.tar.gz |
glib-2.0: Fix build with clang compiler
(From OE-Core rev: 0ad21fe63f6873805762880cca4c37dbe71ee473)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/recipes-core/glib-2.0/glib-2.0/0001-meson-Run-atomics-test-on-clang-as-well.patch | 31 | ||||
-rw-r--r-- | meta/recipes-core/glib-2.0/glib-2.0_2.62.1.bb | 1 |
2 files changed, 32 insertions, 0 deletions
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0001-meson-Run-atomics-test-on-clang-as-well.patch b/meta/recipes-core/glib-2.0/glib-2.0/0001-meson-Run-atomics-test-on-clang-as-well.patch new file mode 100644 index 0000000000..833ad2540e --- /dev/null +++ b/meta/recipes-core/glib-2.0/glib-2.0/0001-meson-Run-atomics-test-on-clang-as-well.patch | |||
@@ -0,0 +1,31 @@ | |||
1 | From cce617bec254e327ed7bcad60f58208024c6dc42 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Sat, 12 Oct 2019 17:46:26 -0700 | ||
4 | Subject: [PATCH] meson: Run atomics test on clang as well | ||
5 | |||
6 | Fixes | ||
7 | ./glib-2.62.1/glib/gatomic.c:675:2: error: G_ATOMIC_LOCK_FREE defined, but incapable of lock-free atomics. | ||
8 | ^ | ||
9 | |||
10 | Upstream-Status: Pending | ||
11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
12 | --- | ||
13 | meson.build | 2 +- | ||
14 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
15 | |||
16 | diff --git a/meson.build b/meson.build | ||
17 | index 9731de4..c678931 100644 | ||
18 | --- a/meson.build | ||
19 | +++ b/meson.build | ||
20 | @@ -1634,7 +1634,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 | ||
29 | -- | ||
30 | 2.23.0 | ||
31 | |||
diff --git a/meta/recipes-core/glib-2.0/glib-2.0_2.62.1.bb b/meta/recipes-core/glib-2.0/glib-2.0_2.62.1.bb index 6d841ec9d9..7897170a7d 100644 --- a/meta/recipes-core/glib-2.0/glib-2.0_2.62.1.bb +++ b/meta/recipes-core/glib-2.0/glib-2.0_2.62.1.bb | |||
@@ -14,6 +14,7 @@ SRC_URI = "${GNOME_MIRROR}/glib/${SHRT_VER}/glib-${PV}.tar.xz \ | |||
14 | file://0010-Do-not-hardcode-python-path-into-various-tools.patch \ | 14 | file://0010-Do-not-hardcode-python-path-into-various-tools.patch \ |
15 | file://0001-Set-host_machine-correctly-when-building-with-mingw3.patch \ | 15 | file://0001-Set-host_machine-correctly-when-building-with-mingw3.patch \ |
16 | file://0001-Do-not-write-bindir-into-pkg-config-files.patch \ | 16 | file://0001-Do-not-write-bindir-into-pkg-config-files.patch \ |
17 | file://0001-meson-Run-atomics-test-on-clang-as-well.patch \ | ||
17 | " | 18 | " |
18 | 19 | ||
19 | SRC_URI_append_class-native = " file://relocate-modules.patch" | 20 | SRC_URI_append_class-native = " file://relocate-modules.patch" |