[FFmpeg-devel] [PATCH] configure: uClibc native pthread requires -ldl

Michael Niedermayer michaelni at gmx.at
Mon May 26 15:36:30 CEST 2014


On Mon, May 26, 2014 at 03:21:03PM +0200, Neil Armstrong wrote:
> In the configure script, add a pthread detection with
> -ldl added to cflags, because uClibc requires -ldl to
> link with native libpthread.
> 
> Tested with a custom ARM toolchain with uClibc 0.9.33.2 and gcc 4.6.3.
> 
> Signed-off-by: Neil Armstrong <narmstrong at neotion.com>
> ---
>  configure |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
> 
> diff --git a/configure b/configure
> index fae2f77..d59cafc 100755
> --- a/configure
> +++ b/configure
> @@ -4590,6 +4590,9 @@ if ! disabled pthreads && ! enabled w32threads && ! enabled os2threads; then
>      if check_func pthread_join -pthread && check_func pthread_create -pthread; then
>          add_cflags -pthread
>          add_extralibs -pthread
> +    elif check_func pthread_join -ldl -pthread && check_func pthread_create -ldl -pthread; then
> +        add_cflags -ldl -pthread
> +        add_extralibs -ldl -pthread
>      elif check_func pthread_join -pthreads && check_func pthread_create -pthreads; then
>          add_cflags -pthreads
>          add_extralibs -pthreads

shouldnt this be after the plain "-pthreads" try ?
as its less "plain"


[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I have often repented speaking, but never of holding my tongue.
-- Xenocrates
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140526/68e0207b/attachment.asc>


More information about the ffmpeg-devel mailing list