libtool-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: osf5.1 + cc + -pthread


From: Peter O'Gorman
Subject: Re: osf5.1 + cc + -pthread
Date: Fri, 14 Jan 2005 22:52:47 +0900
User-agent: Mozilla Thunderbird 1.0 (Macintosh/20041206)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Can someone give a second opinion on this? Whose patch is "better"?
I'm obviously biased, so shouldn't decide. Some kind of fix is required though.

Thanks,
Peter



Albert Chin wrote:
|
| Patch below. Unlike the previous patch, we don't exclude based on $LD
| but include based on $CC.
|

Albert's patch:
Index: ltmain.in
===================================================================
RCS file: /cvsroot/libtool/libtool/Attic/ltmain.in,v
retrieving revision 1.334.2.42
diff -u -3 -p -r1.334.2.42 ltmain.in
- --- ltmain.in 9 Dec 2004 18:00:47 -0000       1.334.2.42
+++ ltmain.in   11 Dec 2004 22:19:00 -0000
@@ -1033,6 +1042,7 @@ EOF
~     finalize_shlibpath=
~     convenience=
~     old_convenience=
+    add_to_deplibs=
~     deplibs=
~     old_deplibs=
~     compiler_flags=
@@ -1498,7 +1508,7 @@ EOF
~       ;;

~      -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
- -     deplibs="$deplibs $arg"
+       add_to_deplibs="$add_to_deplibs $arg"
~       continue
~       ;;

@@ -1888,6 +1898,25 @@ EOF
~     *) linkmode=prog ;; # Anything else should be a program.
~     esac

+    # arguments we can add to $deplibs except when creating a
+    # libtool library where the compiler driver is different
+    # from the linker driver.
+    if test "X$add_to_deplibs" != "X"; then
+      if test "$linkmode" = "lib"; then
+       case "`eval $echo $archive_cmds`" in
+       "$CC"*)
+         for deplib in $add_to_deplibs; do
+           deplibs="$deplibs $deplib"
+         done
+         ;;
+       esac
+      else
+       for deplib in $add_to_deplibs; do
+        deplibs="$deplibs $deplib"
+       done
+      fi
+    fi
+
~     case $host in
~     *cygwin* | *mingw* | *pw32*)
~       # don't eliminate duplications in $postdeps and $predeps

Mine:
diff -u -3 -p -u -r1.334.2.41 ltmain.in
- --- ltmain.in 1 Dec 2004 18:00:58 -0000 1.334.2.41
+++ ltmain.in 5 Dec 2004 11:48:30 -0000
@@ -1488,7 +1488,10 @@ EOF
~        ;;

~      -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
- -       deplibs="$deplibs $arg"
+       case "$archive_cmds" in
+         *"\$LD"*) ;;
+         *) deplibs="$deplibs $arg";;
+       esac
~        continue
~        ;;

@@ -1976,7 +1979,10 @@ EOF
~            compile_deplibs="$deplib $compile_deplibs"
~            finalize_deplibs="$deplib $finalize_deplibs"
~          else
- -           deplibs="$deplib $deplibs"
+           case "$archive_cmds" in
+             *"\$LD"*) ;;
+             *) deplibs="$deplib $deplibs";;
+           esac
~          fi
~          continue
~          ;;
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (Darwin)

iQCVAwUBQefOrriDAg3OZTLPAQKqwgP/WnoaitFwX/bfGXw40ZLe7wPeozvUy3sg
zq14KFtYxgzff3q0C+5RPSAcolEpSVrKKlnrW0xH9LhmQGTBfOdsLX4n1Xnsf/9g
MNd4k8igmJ0Lg1JRd7DkYf+97R8tPkCVQCgBjoPlyh3NQ6QUDa20OYVoFBNBdbBi
L7tZ+kQC9qM=
=TuJ0
-----END PGP SIGNATURE-----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]