buildroot/package/cairo
Fabrice Fontaine 9880dba15c package/cairo: fix build without threads
Fix the following build failure without threads raised since switch to
meson-package in commit 1fa58814c0 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."
      |   ^~~~~

Note that prior to 1fa58814c0, the
condition was:

 ifeq ($(BR2_TOOLCHAIN_HAS_THREADS_NPTL),)
 CAIRO_CONF_ENV += CPPFLAGS="$(TARGET_CPPFLAGS) -DCAIRO_NO_MUTEX=1"
 endif

but that was in fact wrong, because it meant that toolchain with
linuxthreads (not NPTL) would have thread support, but a thread-unsafe
cairo library. The condition was changed from
BR2_TOOLCHAIN_HAS_THREADS to BR2_TOOLCHAIN_HAS_THREADS_NPTL in an
older commit, 92f14307ba, but now
cairo's mutex support builds fine with linuxthreads, so we can use
CAIRO_NO_MUTEX=1 only when thread support is not available at all.

Fixes: 1fa58814c0

 - http://autobuild.buildroot.org/results/a123355b6d315d2fcda646d3f1c7b588cba78258

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2024-08-02 19:24:35 +02:00
..
0001-cairo-ft-private.h-fix-missing-FT_Color-error.patch
0002-meson-always-skip-IPC_RMID_DEFERRED_RELEASE-check-wh.patch
0003-meson-only-require-cpp-for-windows.patch package/cairo: fix build on toolchains without c++ support 2024-07-18 21:49:30 +02:00
Config.in
cairo.hash
cairo.mk package/cairo: fix build without threads 2024-08-02 19:24:35 +02:00