* [PATCH] glib-2.0: Fix build with clang compiler
@ 2019-10-13 0:51 Khem Raj
2019-10-13 1:02 ` ✗ patchtest: failure for " Patchwork
0 siblings, 1 reply; 2+ messages in thread
From: Khem Raj @ 2019-10-13 0:51 UTC (permalink / raw)
To: openembedded-core
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
...on-Run-atomics-test-on-clang-as-well.patch | 31 +++++++++++++++++++
meta/recipes-core/glib-2.0/glib-2.0_2.62.1.bb | 1 +
2 files changed, 32 insertions(+)
create mode 100644 meta/recipes-core/glib-2.0/glib-2.0/0001-meson-Run-atomics-test-on-clang-as-well.patch
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 @@
+From cce617bec254e327ed7bcad60f58208024c6dc42 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 12 Oct 2019 17:46:26 -0700
+Subject: [PATCH] meson: Run atomics test on clang as well
+
+Fixes
+./glib-2.62.1/glib/gatomic.c:675:2: error: G_ATOMIC_LOCK_FREE defined, but incapable of lock-free atomics.
+^
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ meson.build | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/meson.build b/meson.build
+index 9731de4..c678931 100644
+--- a/meson.build
++++ b/meson.build
+@@ -1634,7 +1634,7 @@ atomicdefine = '''
+ # We know that we can always use real ("lock free") atomic operations with MSVC
+ if cc.get_id() == 'msvc' or cc.get_id() == 'clang-cl' or cc.links(atomictest, name : 'atomic ops')
+ have_atomic_lock_free = true
+- if cc.get_id() == 'gcc' and not cc.compiles(atomicdefine, name : 'atomic ops define')
++ if (cc.get_id() == 'gcc' or cc.get_id() == 'clang') and not cc.compiles(atomicdefine, name : 'atomic ops define')
+ # Old gcc release may provide
+ # __sync_bool_compare_and_swap but doesn't define
+ # __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4
+--
+2.23.0
+
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 \
file://0010-Do-not-hardcode-python-path-into-various-tools.patch \
file://0001-Set-host_machine-correctly-when-building-with-mingw3.patch \
file://0001-Do-not-write-bindir-into-pkg-config-files.patch \
+ file://0001-meson-Run-atomics-test-on-clang-as-well.patch \
"
SRC_URI_append_class-native = " file://relocate-modules.patch"
--
2.23.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-10-13 1:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-13 0:51 [PATCH] glib-2.0: Fix build with clang compiler Khem Raj
2019-10-13 1:02 ` ✗ patchtest: failure for " Patchwork
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox