From: Arnout Vandecappelle <arnout@mind.be>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] xlib_libpthread-stubs: needs -pthread when linking statically
Date: Sun, 17 Feb 2013 21:44:09 +0100 [thread overview]
Message-ID: <51214119.6020806@mind.be> (raw)
In-Reply-To: <20130217183823.4f196ea9@skate>
On 17/02/13 18:38, Thomas Petazzoni wrote:
> Dear Arnout Vandecappelle (Essensium/Mind),
>
> On Sun, 17 Feb 2013 14:50:22 +0100, Arnout Vandecappelle
> (Essensium/Mind) wrote:
>> From: "Arnout Vandecappelle (Essensium/Mind)" <arnout@mind.be>
>>
>> Fixes http://autobuild.buildroot.net/results/392512cb348123d76962df02e38675a80eae41b1
>>
>> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
>> ---
>> My gcc manual only documents the -pthread option for some architectures,
>> but it seems to work for x86, sh and arm as well.
>
> Thanks. However, I'd like to see if an upstream fix would not be more
> appropriate for this. If you look at the build log, it shows:
>
> checking for pthread_self... no
> checking for pthread_mutex_init... no
> checking for pthread_mutex_destroy... no
> checking for pthread_mutex_lock... no
> checking for pthread_mutex_unlock... no
> checking for pthread_cond_init... no
> checking for pthread_cond_destroy... no
> checking for pthread_condattr_init... no
> checking for pthread_condattr_destroy... no
> checking for pthread_cond_wait... no
> checking for pthread_cond_timedwait... no
> checking for pthread_cond_signal... no
> checking for pthread_cond_broadcast... no
> checking for pthread_equal... no
> checking for pthread_exit... no
>
> It is really those tests that are wrong I'd say. They should have
> detected that the C library provides the pthread functions.
>
> The AC_CHECK_FUNCS test in configure.ac checks those functions, but
> does not specify that those functions should be tested by linking
> against -lpthread. Wouldn't an upstreamable configure.ac patch be more
> appropriate here?
Linking against -lpthread isn't enough, apparently.
Many packages use the ACX_PTHREAD macro [1]. That is probably a
possibility.
Regards,
Arnout
[1] http://ac-archive.sourceforge.net/ac-archive/acx_pthread.html
--
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286500
Essensium/Mind http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
prev parent reply other threads:[~2013-02-17 20:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-17 13:50 [Buildroot] [PATCH] xlib_libpthread-stubs: needs -pthread when linking statically Arnout Vandecappelle
2013-02-17 17:38 ` Thomas Petazzoni
2013-02-17 20:44 ` Arnout Vandecappelle [this message]
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=51214119.6020806@mind.be \
--to=arnout@mind.be \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.