From dfcde667ecdb7bd48e0761dd5f1270de77a664fb Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Thu, 2 Dec 2004 22:50:36 +0000 Subject: [PATCH] 1779. [port] OSF 5.1: libtool didn't handle -pthread correctly. Redo w/ fix from generic fix from libtool maintainer. --- ltmain.sh | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/ltmain.sh b/ltmain.sh index 7b262ef02f..718b2103b4 100644 --- a/ltmain.sh +++ b/ltmain.sh @@ -1487,19 +1487,11 @@ EOF continue ;; - -mt|-mthreads|-kthread|-Kthread|-pthreads|--thread-safe) - deplibs="$deplibs $arg" - continue - ;; - - -pthread) - case $host in - *-*-osf5.1) - # -pthread is a compiler only option - continue - ;; + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe) + case "$archive_cmds" in + *"\$LD"*) ;; + *) deplibs="$deplibs $arg";; esac - deplibs="$deplibs $arg" continue ;; @@ -1987,7 +1979,10 @@ EOF compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else - deplibs="$deplib $deplibs" + case "$archive_cmds" in + *"\$LD"*) ;; + *) deplibs="$deplibs $arg";; + esac fi continue ;;