Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/cairo: fix build without NPTL
@ 2024-07-26  8:53 Fabrice Fontaine
  2024-07-27 16:36 ` Thomas Petazzoni via buildroot
  2024-08-02 17:28 ` Thomas Petazzoni via buildroot
  0 siblings, 2 replies; 3+ messages in thread
From: Fabrice Fontaine @ 2024-07-26  8:53 UTC (permalink / raw)
  To: buildroot; +Cc: Fabrice Fontaine

Fix the following build failure without NPTL raised since switch to
meson-package in commit 1fa58814c09a71444f961b61a9a2c399b9163fc2 which
wrongly removed -DCAIRO_NO_MUTEX=1:

In file included from ../src/cairo-mutex-type-private.h:45,
                 from ../src/cairo-scaled-font-private.h:45,
                 from ../src/cairoint.h:415,
                 from ../src/cairo-arc.c:37:
../src/cairo-mutex-impl-private.h:231:3: error: #error "XXX: No mutex implementation found.  Cairo will not work with multiple threads.  Define CAIRO_NO_MUTEX to 1 to acknowledge and accept this limitation and compile cairo without thread-safety support."
  231 | # error "XXX: No mutex implementation found.  Cairo will not work with multiple threads.  Define CAIRO_NO_MUTEX to 1 to acknowledge and accept this limitation and compile cairo without thread-safety support."
      |   ^~~~~

Fixes: 1fa58814c09a71444f961b61a9a2c399b9163fc2
 - http://autobuild.buildroot.org/results/a123355b6d315d2fcda646d3f1c7b588cba78258

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 package/cairo/cairo.mk | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/package/cairo/cairo.mk b/package/cairo/cairo.mk
index 4ace04ebbe..3cfc182d09 100644
--- a/package/cairo/cairo.mk
+++ b/package/cairo/cairo.mk
@@ -20,6 +20,10 @@ ifeq ($(BR2_m68k_cf),y)
 CAIRO_CFLAGS += -mxgot
 endif
 
+ifeq ($(BR2_TOOLCHAIN_HAS_THREADS_NPTL),)
+CAIRO_CFLAGS += -DCAIRO_NO_MUTEX=1
+endif
+
 # cairo can use C++11 atomics when available, so we need to link with
 # libatomic for the architectures who need libatomic.
 ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
-- 
2.43.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-08-02 17:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-26  8:53 [Buildroot] [PATCH 1/1] package/cairo: fix build without NPTL Fabrice Fontaine
2024-07-27 16:36 ` Thomas Petazzoni via buildroot
2024-08-02 17:28 ` Thomas Petazzoni via buildroot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox