[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: osf5.1 + cc + -pthread
From: |
Albert Chin |
Subject: |
Re: osf5.1 + cc + -pthread |
Date: |
Sat, 11 Dec 2004 16:20:17 -0600 |
User-agent: |
Mutt/1.5.6i |
On Thu, Dec 09, 2004 at 09:30:10PM +0900, Peter O'Gorman wrote:
> Albert Chin wrote:
> >On Sun, Dec 05, 2004 at 08:53:09PM +0900, Peter O'Gorman wrote:
> >
> >>Okay to apply to all current branches and HEAD? (this diff is branch-1-5)
> >
> >Hang on. I have an alternate patch but I'd like to compare first. Give
> >me a day or two.
>
> The only chance I'll get to apply this before Christmas is Sunday the 12th,
> please let me know before then.
Patch below. Unlike the previous patch, we don't exclude based on $LD
but include based on $CC.
--
albert chin (address@hidden)
-- snip snip
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