From: Thomas Devoogdt <thomas@devoogdt.com>
To: buildroot@buildroot.org
Cc: Julien Olivain <ju.o@free.fr>,
Eric Le Bihan <eric.le.bihan.dev@free.fr>,
Thomas Devoogdt <thomas.devoogdt@barco.com>,
Thomas Devoogdt <thomas@devoogdt.com>
Subject: [Buildroot] [PATCH 2/2] package/fontconfig: fix compilation on targets without pthread support
Date: Mon, 27 Jan 2025 13:56:43 +0100 [thread overview]
Message-ID: <20250127125643.1758840-2-thomas@devoogdt.com> (raw)
In-Reply-To: <20250127125643.1758840-1-thomas@devoogdt.com>
From: Thomas Devoogdt <thomas.devoogdt@barco.com>
The br-arm-full-nothread fails because meson (wrongly) assumes thread
support when cross-compiling. So add an explicit check on pthread support.
Fixes:
- https://autobuild.buildroot.org/results/5b0/5b0ae4c858e9debddf9bd9bd86cfacb6951b4c3f/build-end.log
Signed-off-by: Thomas Devoogdt <thomas@devoogdt.com>
---
...explicitly-check-for-pthread-support.patch | 37 +++++++++++++++++++
1 file changed, 37 insertions(+)
create mode 100644 package/fontconfig/0001-meson.build-explicitly-check-for-pthread-support.patch
diff --git a/package/fontconfig/0001-meson.build-explicitly-check-for-pthread-support.patch b/package/fontconfig/0001-meson.build-explicitly-check-for-pthread-support.patch
new file mode 100644
index 0000000000..ca394ab7d5
--- /dev/null
+++ b/package/fontconfig/0001-meson.build-explicitly-check-for-pthread-support.patch
@@ -0,0 +1,37 @@
+From 3c9de31dda1a1d44fade7a61e66c989178d6c2a4 Mon Sep 17 00:00:00 2001
+From: Thomas Devoogdt <thomas@devoogdt.com>
+Date: Sun, 26 Jan 2025 10:15:39 +0100
+Subject: [PATCH] meson.build: explicitly check for pthread support
+
+Tested using buildroot. The br-arm-full-nothread fails
+because meson assumes thread support when cross-compiling.
+
+Dependency threads found: YES unknown (cached)
+Has header "pthread.h" : NO
+
+Upstream: https://gitlab.freedesktop.org/fontconfig/fontconfig/-/commit/aad470dad519b6fe3459023b82941b4414b71313
+Signed-off-by: Thomas Devoogdt <thomas@devoogdt.com>
+---
+ meson.build | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/meson.build b/meson.build
+index 4439758..07e242b 100644
+--- a/meson.build
++++ b/meson.build
+@@ -383,8 +383,10 @@ endif
+
+ if host_machine.system() != 'windows'
+ thread_dep = dependency('threads')
+- conf.set('HAVE_PTHREAD', 1)
+- deps += [thread_dep]
++ if thread_dep.found() and cc.has_header('pthread.h')
++ conf.set('HAVE_PTHREAD', 1)
++ deps += [thread_dep]
++ endif
+ endif
+
+ fc_templatedir = get_option('template-dir')
+--
+2.43.0
+
--
2.43.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2025-01-27 12:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-25 18:21 [Buildroot] [PATCH] package/fontconfig: bump to 2.16.0 Thomas Devoogdt
2025-01-25 21:38 ` Julien Olivain
2025-01-26 10:42 ` Julien Olivain
2025-01-27 12:56 ` [Buildroot] [PATCH 1/2] package/fontconfig: fix compile issue if BR2_DEBUG_3 has been selected Thomas Devoogdt
2025-01-27 12:56 ` Thomas Devoogdt [this message]
2025-01-27 20:19 ` Julien Olivain
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250127125643.1758840-2-thomas@devoogdt.com \
--to=thomas@devoogdt.com \
--cc=buildroot@buildroot.org \
--cc=eric.le.bihan.dev@free.fr \
--cc=ju.o@free.fr \
--cc=thomas.devoogdt@barco.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox