libdazzle: fix some consumers' build on powerpc
libdazzle uses 64-bit __sync_* primitives that are not supported on powerpc, use the fallback code on this arch instead (merged upstream).
This commit is contained in:
parent
c3c35833a8
commit
1bafc5c262
@ -1,9 +1,10 @@
|
||||
# $OpenBSD: Makefile,v 1.17 2020/05/14 14:59:03 ajacoutot Exp $
|
||||
# $OpenBSD: Makefile,v 1.18 2020/06/22 09:00:00 cwen Exp $
|
||||
|
||||
COMMENT= companion library to GObject and Gtk+
|
||||
|
||||
GNOME_PROJECT= libdazzle
|
||||
GNOME_VERSION= 3.36.0
|
||||
REVISION= 0
|
||||
|
||||
SHARED_LIBS += dazzle-1.0 1.2 # 0
|
||||
|
||||
|
20
x11/gnome/libdazzle/patches/patch-src_util_dzl-counter_c
Normal file
20
x11/gnome/libdazzle/patches/patch-src_util_dzl-counter_c
Normal file
@ -0,0 +1,20 @@
|
||||
$OpenBSD: patch-src_util_dzl-counter_c,v 1.1 2020/06/22 09:00:00 cwen Exp $
|
||||
|
||||
Don't use unsupported 64-bit __sync primitives on powerpc, from:
|
||||
https://gitlab.gnome.org/GNOME/libdazzle/-/merge_requests/44
|
||||
|
||||
Index: src/util/dzl-counter.c
|
||||
--- src/util/dzl-counter.c.orig
|
||||
+++ src/util/dzl-counter.c
|
||||
@@ -52,7 +52,11 @@ G_DEFINE_BOXED_TYPE (DzlCounterArena, dzl_counter_aren
|
||||
#define CELLS_PER_GROUP(ncpu) \
|
||||
(((sizeof (CounterInfo) * COUNTERS_PER_GROUP) + \
|
||||
(sizeof(DzlCounterValue) * (ncpu))) / DATA_CELL_SIZE)
|
||||
+#ifdef DZL_COUNTER_REQUIRES_ATOMIC
|
||||
#define DZL_MEMORY_BARRIER __sync_synchronize()
|
||||
+#else
|
||||
+#define DZL_MEMORY_BARRIER 0
|
||||
+#endif
|
||||
|
||||
typedef struct
|
||||
{
|
18
x11/gnome/libdazzle/patches/patch-src_util_dzl-counter_h
Normal file
18
x11/gnome/libdazzle/patches/patch-src_util_dzl-counter_h
Normal file
@ -0,0 +1,18 @@
|
||||
$OpenBSD: patch-src_util_dzl-counter_h,v 1.1 2020/06/22 09:00:00 cwen Exp $
|
||||
|
||||
Don't use unsupported 64-bit __sync primitives on powerpc, from:
|
||||
https://gitlab.gnome.org/GNOME/libdazzle/-/merge_requests/44
|
||||
|
||||
Index: src/util/dzl-counter.h
|
||||
--- src/util/dzl-counter.h.orig
|
||||
+++ src/util/dzl-counter.h
|
||||
@@ -163,6 +163,9 @@ G_BEGIN_DECLS
|
||||
# define dzl_get_current_cpu() dzl_get_current_cpu_rdtscp()
|
||||
#elif defined(__linux__)
|
||||
# define dzl_get_current_cpu() dzl_get_current_cpu_call()
|
||||
+#elif defined(__powerpc__) && !defined(__powerpc64__)
|
||||
+# define dzl_get_current_cpu() 0
|
||||
+# undef DZL_COUNTER_REQUIRES_ATOMIC
|
||||
#else
|
||||
# define dzl_get_current_cpu() 0
|
||||
# define DZL_COUNTER_REQUIRES_ATOMIC 1
|
Loading…
x
Reference in New Issue
Block a user