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

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


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
-- 
1.7.0.4



More information about the ffmpeg-devel mailing list