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

Neil Armstrong superna9999 at gmail.com
Mon May 26 15:38:38 CEST 2014


Le 26/05/2014 15:36, Michael Niedermayer a écrit :
> 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"
> 

Whatever, if it's better for you I can re-submit a patch with the test after pthreads.

Neil


More information about the ffmpeg-devel mailing list