Libtool fix for -pthread

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Libtool fix for -pthread

Marc Matteo
Our libtool doesn't quite handle -pthread right.  It needs to put it under
"dependency_libs" in the *.la files it creates where it can be picked up
by dependent ports via libtool.

This shows up in devel/glib2 and devel/ORBit2.

So, I have a pretty simple patch for devel/libtool linked below:

http://www.lectroid.net/ports/libtool.diff

Thanks,
Marc

Reply | Threaded
Open this post in threaded view
|

Re: Libtool fix for -pthread

Jacob Meuser
On Sat, Nov 19, 2005 at 10:56:42PM -0800, Marc Matteo wrote:
> Our libtool doesn't quite handle -pthread right.  It needs to put it under
> "dependency_libs" in the *.la files it creates where it can be picked up
> by dependent ports via libtool.
>
> This shows up in devel/glib2 and devel/ORBit2.
>
> So, I have a pretty simple patch for devel/libtool linked below:
>
> http://www.lectroid.net/ports/libtool.diff

couple comments,

Index: patches/patch-libltdl_ltmain_sh
===================================================================
RCS file: /pub/cvs/ports/devel/libtool/patches/patch-libltdl_ltmain_sh,v
retrieving revision 1.13

this patch is actually useless.  libltdl/ltmain.sh gets rebuilt
from the ltmain.in we patch.

Index: patches/patch-ltmain_in
===================================================================
RCS file: /pub/cvs/ports/devel/libtool/patches/patch-ltmain_in,v
retrieving revision 1.13
diff -u -r1.13 patch-ltmain_in
--- patches/patch-ltmain_in 2 Nov 2005 02:47:09 -0000 1.13
+++ patches/patch-ltmain_in 20 Nov 2005 06:32:39 -0000

...

@@ -36,7 +48,19 @@
        if test "$linkmode,$pass" = "lib,link" ||
  test "$linkmode,$pass" = "prog,scan"; then
  libs="$deplibs"
-@@ -2245,20 +2257,20 @@ EOF
+@@ -2012,6 +2029,11 @@ EOF
+  else
+    compiler_flags="$compiler_flags $deplib"
+  fi
++  case $host in
++  *-*-openbsd*)
++    test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
++    ;;
++  esac

this can be further restricted:

++  case $host in
++  *-*-openbsd*)
++    if test "$linkmode,$pass" = "lib,conv"; then
++      newdependency_libs="$deplib $newdependency_libs"
++    fi
++    ;;
++  esac

--
<[hidden email]>