]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* ltmain.in: Add -pthread and similar to $deplibs ($compile_deplibs
authorScott James Remnant <scott@netsplit.com>
Mon, 10 Nov 2003 21:06:49 +0000 (21:06 +0000)
committerScott James Remnant <scott@netsplit.com>
Mon, 10 Nov 2003 21:06:49 +0000 (21:06 +0000)
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.

ChangeLog
NEWS
ltmain.in

index dec4ec47102d1b8f189c30f28570051c578afd02..5c6c851a91b3d190e48f9e30c2d55c069cbe1d8c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2003-11-10  Scott James Remnant  <scott@netsplit.com>
+
+       * 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.
+
 2003-11-10  Scott James Remnant  <scott@netsplit.com>
 
        * m4/libtool.m4  (AC_LIBTOOL_SYS_DYNAMIC_LINKER) [linux]: Include
diff --git a/NEWS b/NEWS
index 16693b95b36037c45719623d98fbb9095616e68e..b174aa63b9992981e83de1c1d6c44cddb10fc01a 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -8,6 +8,7 @@ New in 1.5b: 2003-??-??; CVS version 1.5a, Libtool team:
   calls itself for relinking etc.
 * -no-suppress in compile mode shows compiler output for both PIC and non-PIC
   object compilation.
+* `-pthread' and similar options are honoured when linking shared libraries.
 * Shared objects (.lo) are no longer created when `-static' is passed in
   compile mode.
 * New compile mode option `-shared' prevents creation of static objects (.o).
index f36cea02abbd7585b329456735ccb767455d25e5..3bce91ef4b529f5441826be063a69233f7f55b8e 100644 (file)
--- a/ltmain.in
+++ b/ltmain.in
@@ -1325,6 +1325,11 @@ EOF
        continue
        ;;
 
+      -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
+       deplibs="$deplibs $arg"
+       continue
+        ;;
+
       # gcc -m* arguments should be passed to the linker via $compiler_flags
       # in order to pass architecture information to the linker
       # (e.g. 32 vs 64-bit).  This may also be accomplished via -Wl,-mfoo
@@ -1845,6 +1850,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