From: Scott James Remnant Date: Fri, 23 Jan 2004 06:02:54 +0000 (+0000) Subject: * ltmain.in: Add -pthread and similar to $deplibs ($compile_deplibs X-Git-Tag: release-1-5-2~20 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=df4fa910c5a63b308eeaca328f628c95be498b47;p=thirdparty%2Flibtool.git * ltmain.in: Add -pthread and similar to $deplibs ($compile_deplibs and $finalize_deplibs for programs) when found on the command line or in a .la file's dependency_libs (but don't place them there) so they are honoured when linking both programs and libraries. --- diff --git a/ChangeLog b/ChangeLog index d19f93acd..6c33ac5ab 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2004-01-23 Scott James Remnant + + * ltmain.in: Add -pthread and similar to $deplibs ($compile_deplibs + and $finalize_deplibs for programs) when found on the command line + or in a .la file's dependency_libs (but don't place them there) so + they are honoured when linking both programs and libraries. + 2004-01-23 Scott James Remnant * ltmain.in: In compile mode, delay parsing of -shared, -static, diff --git a/ltmain.in b/ltmain.in index d3e5090cc..462eb6799 100644 --- a/ltmain.in +++ b/ltmain.in @@ -1343,6 +1343,11 @@ EOF continue ;; + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe) + deplibs="$deplibs $arg" + continue + ;; + -module) module=yes continue @@ -1822,6 +1827,15 @@ EOF lib= found=no case $deplib in + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe) + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + fi + continue + ;; -l*) if test "$linkmode" != lib && test "$linkmode" != prog; then $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2