From: Peter Korsgaard <jacmet@uclibc.org>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 07/10] libffi: make thread support optional
Date: Sat, 17 Nov 2012 23:46:41 +0100 [thread overview]
Message-ID: <87pq3brgoe.fsf@dell.be.48ers.dk> (raw)
In-Reply-To: <1952f1984c0a2fae4cd5eabc15f9b7eb37623224.1353191025.git.thomas.petazzoni@free-electrons.com> (Thomas Petazzoni's message of "Sat, 17 Nov 2012 23:24:05 +0100")
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:
Thomas> Fixes:
Thomas> http://autobuild.buildroot.org/results/7ee57d01917ea72d1811469e482513dda2ceb1ea/build-end.log
Thomas> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Thomas> ---
Thomas> ...ffi-0003-Make-thread-support-conditionnal.patch | 73 ++++++++++++++++++++
Thomas> 1 file changed, 73 insertions(+)
Thomas> create mode 100644 package/libffi/libffi-0003-Make-thread-support-conditionnal.patch
Thomas> diff --git a/package/libffi/libffi-0003-Make-thread-support-conditionnal.patch b/package/libffi/libffi-0003-Make-thread-support-conditionnal.patch
Thomas> new file mode 100644
Thomas> index 0000000..90d98d6
Thomas> --- /dev/null
Thomas> +++ b/package/libffi/libffi-0003-Make-thread-support-conditionnal.patch
Thomas> @@ -0,0 +1,73 @@
Thomas> +From a7f6342120060564a829704cceb843e53e0b34a9 Mon Sep 17 00:00:00 2001
Thomas> +From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Thomas> +Date: Sat, 17 Nov 2012 18:44:16 +0100
Thomas> +Subject: [PATCH 3/3] Make thread support conditionnal
Thomas> +
Thomas> +When libffi is linked against a C library that does not have thread
Thomas> +support, it is not necessary to use a mutex to protect global
Thomas> +variables, since the application calling libffi cannot be
Thomas> +multi-threaded.
Thomas> +
Thomas> +Therefore, make the libffi thread support conditionnal: when we're
Thomas> +building against uClibc with no thread support, don't use the
Thomas> +pthread_mutex.
Thomas> +
Thomas> +Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Thomas> +---
Thomas> + src/closures.c | 12 ++++++++++++
Thomas> + 1 file changed, 12 insertions(+)
Thomas> +
Thomas> +diff --git a/src/closures.c b/src/closures.c
Thomas> +index 1b37827..3d151f6 100644
Thomas> +--- a/src/closures.c
Thomas> ++++ b/src/closures.c
Thomas> +@@ -70,7 +70,10 @@
Thomas> +
Thomas> + # elif FFI_MMAP_EXEC_WRIT /* !FFI_EXEC_TRAMPOLINE_TABLE */
Thomas> +
Thomas> ++#if defined(__UCLIBC__) && !defined(__HAS_NO_THREADS__)
Thomas> + #define USE_LOCKS 1
Thomas> ++#endif
Ehh, what about glibc?
Shouldn't it be !__UCLIBC__ || !__HAS_NO_THREADS__ ?
--
Bye, Peter Korsgaard
next prev parent reply other threads:[~2012-11-17 22:46 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-17 22:23 [Buildroot] [pull request] Pull request for branch misc-fixes Thomas Petazzoni
2012-11-17 22:23 ` [Buildroot] [PATCH 01/10] python: use default configure commands to get shared build Thomas Petazzoni
2012-11-17 22:24 ` [Buildroot] [PATCH 02/10] libxml2: add support for building host library with python support Thomas Petazzoni
2012-11-17 22:24 ` [Buildroot] [PATCH 03/10] mesa3d: requires host-libxml2 and host-python to generate some files Thomas Petazzoni
2012-11-17 22:24 ` [Buildroot] [PATCH 04/10] libatomic_ops: bump to version 7.2 Thomas Petazzoni
2012-11-17 22:24 ` [Buildroot] [PATCH 05/10] gnutls: fix build failure due to non-existing gets in recent C libraries Thomas Petazzoni
2012-11-17 22:24 ` [Buildroot] [PATCH 06/10] gsl: fix build on !i386 uClibc Thomas Petazzoni
2012-11-17 22:24 ` [Buildroot] [PATCH 07/10] libffi: make thread support optional Thomas Petazzoni
2012-11-17 22:46 ` Peter Korsgaard [this message]
2012-11-17 22:24 ` [Buildroot] [PATCH 08/10] php: fix C++ link issue Thomas Petazzoni
2012-11-17 22:24 ` [Buildroot] [PATCH 09/10] attr: fix static build Thomas Petazzoni
2012-11-17 22:24 ` [Buildroot] [PATCH 10/10] dbus: uses fork(), requires MMU Thomas Petazzoni
2012-11-17 22:54 ` [Buildroot] [pull request] Pull request for branch misc-fixes Peter Korsgaard
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=87pq3brgoe.fsf@dell.be.48ers.dk \
--to=jacmet@uclibc.org \
--cc=buildroot@busybox.net \
/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