libtool and -pthread

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

libtool and -pthread

Marc Matteo
I've mentioned this before, this diff makes libtool list our -pthread
under 'dependency_libs' in the *.la file.  This is needed for libgthread
(and presumably any other libtool generated library that depends on
-pthread) so that followon ports don't need a specifiec "LDFLAGS=-pthread"
or other such workarounds.

Is this worth having?

Index: Makefile
===================================================================
RCS file: /pub/cvs/ports/devel/libtool/Makefile,v
retrieving revision 1.46
diff -u -r1.46 Makefile
--- Makefile 16 Dec 2005 23:03:35 -0000 1.46
+++ Makefile 18 Dec 2005 20:54:44 -0000
@@ -6,7 +6,7 @@

  VERSION= 1.5.20
  DISTNAME= libtool-${VERSION}
-PKGNAME= ${DISTNAME}p3
+PKGNAME= ${DISTNAME}p4
  PKGNAME-ltdl= libltdl-${VERSION}p1
  CATEGORIES= devel
  MASTER_SITES= ${MASTER_SITE_GNU:=libtool/}
Index: patches/patch-libltdl_ltmain_sh
===================================================================
RCS file: /pub/cvs/ports/devel/libtool/patches/patch-libltdl_ltmain_sh,v
retrieving revision 1.15
diff -u -r1.15 patch-libltdl_ltmain_sh
--- patches/patch-libltdl_ltmain_sh 16 Dec 2005 23:03:35 -0000 1.15
+++ patches/patch-libltdl_ltmain_sh 18 Dec 2005 21:08:31 -0000
@@ -1,6 +1,6 @@
  $OpenBSD: patch-libltdl_ltmain_sh,v 1.15 2005/12/16 23:03:35 espie Exp $
---- libltdl/ltmain.sh.orig Wed Aug 31 20:55:39 2005
-+++ libltdl/ltmain.sh Thu Dec 15 19:10:15 2005
+--- libltdl/ltmain.sh.orig Wed Aug 31 11:55:39 2005
++++ libltdl/ltmain.sh Sun Dec 18 13:07:58 2005
  @@ -352,6 +352,8 @@ func_extract_archives ()
   # Darwin sucks
   eval std_shrext=\"$shrext_cmds\"
@@ -71,7 +71,19 @@
    fi
    deplibs="$deplibs $arg"
    continue
-@@ -1984,6 +2008,17 @@ EOF
+@@ -1522,6 +1546,11 @@ EOF
+ compiler_flags="$compiler_flags $arg"
+ compile_command="$compile_command $arg"
+ finalize_command="$finalize_command $arg"
++ case $host in
++ *-*-openbsd*)
++  deplibs="$deplibs $arg"
++  ;;
++ esac
+ continue
+ ;;
+
+@@ -1984,6 +2013,17 @@ EOF
    ;;
       esac
       for pass in $passes; do
@@ -89,7 +101,19 @@
         if test "$linkmode,$pass" = "lib,link" ||
    test "$linkmode,$pass" = "prog,scan"; then
    libs="$deplibs"
-@@ -2245,20 +2280,20 @@ EOF
+@@ -2012,6 +2052,11 @@ EOF
+  else
+    compiler_flags="$compiler_flags $deplib"
+  fi
++  case $host in
++  *-*-openbsd*)
++    test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
++    ;;
++  esac
+  continue
+  ;;
+ -l*)
+@@ -2245,20 +2290,20 @@ EOF
       # It is a libtool convenience library, so add in its objects.
       convenience="$convenience $ladir/$objdir/$old_library"
       old_convenience="$old_convenience $ladir/$objdir/$old_library"
@@ -120,7 +144,7 @@
     continue
    fi # $pass = conv

-@@ -2445,8 +2480,12 @@ EOF
+@@ -2445,8 +2490,12 @@ EOF
    fi

    link_static=no # Whether the deplib will be linked statically
@@ -134,7 +158,7 @@
     if test "$installed" = no; then
       notinst_deplibs="$notinst_deplibs $lib"
       need_relink=yes
-@@ -2644,7 +2683,7 @@ EOF
+@@ -2644,7 +2693,7 @@ EOF
       add_dir=
       add=
       # Finalize command for both is simple: just hardcode it.
@@ -143,7 +167,7 @@
         add="$libdir/$linklib"
       elif test "$hardcode_minus_L" = yes; then
         add_dir="-L$libdir"
-@@ -5932,40 +5971,6 @@ relink_command=\"$relink_command\""
+@@ -5932,40 +5981,6 @@ relink_command=\"$relink_command\""
       # Exit here if they wanted silent mode.
       test "$show" = : && exit $EXIT_SUCCESS

@@ -184,7 +208,7 @@
       exit $EXIT_SUCCESS
       ;;

-@@ -6516,12 +6521,11 @@ exit $?
+@@ -6516,12 +6531,11 @@ exit $?
   # configuration.  But we'll never go from static-only to shared-only.

   # ### BEGIN LIBTOOL TAG CONFIG: disable-shared
Index: patches/patch-ltmain_in
===================================================================
RCS file: /pub/cvs/ports/devel/libtool/patches/patch-ltmain_in,v
retrieving revision 1.15
diff -u -r1.15 patch-ltmain_in
--- patches/patch-ltmain_in 16 Dec 2005 23:03:35 -0000 1.15
+++ patches/patch-ltmain_in 18 Dec 2005 21:08:31 -0000
@@ -1,6 +1,6 @@
  $OpenBSD: patch-ltmain_in,v 1.15 2005/12/16 23:03:35 espie Exp $
---- ltmain.in.orig Wed Aug 31 20:25:28 2005
-+++ ltmain.in Thu Dec 15 19:09:43 2005
+--- ltmain.in.orig Wed Aug 31 11:25:28 2005
++++ ltmain.in Sun Dec 18 13:08:25 2005
  @@ -352,6 +352,8 @@ func_extract_archives ()
   # Darwin sucks
   eval std_shrext=\"$shrext_cmds\"
@@ -71,7 +71,19 @@
    fi
    deplibs="$deplibs $arg"
    continue
-@@ -1984,6 +2008,17 @@ EOF
+@@ -1522,6 +1546,11 @@ EOF
+ compiler_flags="$compiler_flags $arg"
+ compile_command="$compile_command $arg"
+ finalize_command="$finalize_command $arg"
++ case $host in
++ *-*-openbsd*)
++  deplibs="$deplibs $arg"
++  ;;
++ esac
+ continue
+ ;;
+
+@@ -1984,6 +2013,17 @@ EOF
    ;;
       esac
       for pass in $passes; do
@@ -89,7 +101,19 @@
         if test "$linkmode,$pass" = "lib,link" ||
    test "$linkmode,$pass" = "prog,scan"; then
    libs="$deplibs"
-@@ -2245,20 +2280,20 @@ EOF
+@@ -2012,6 +2052,11 @@ EOF
+  else
+    compiler_flags="$compiler_flags $deplib"
+  fi
++  case $host in
++  *-*-openbsd*)
++    test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
++    ;;
++  esac
+  continue
+  ;;
+ -l*)
+@@ -2245,20 +2290,20 @@ EOF
       # It is a libtool convenience library, so add in its objects.
       convenience="$convenience $ladir/$objdir/$old_library"
       old_convenience="$old_convenience $ladir/$objdir/$old_library"
@@ -120,7 +144,7 @@
     continue
    fi # $pass = conv

-@@ -2445,8 +2480,12 @@ EOF
+@@ -2445,8 +2490,12 @@ EOF
    fi

    link_static=no # Whether the deplib will be linked statically
@@ -134,7 +158,7 @@
     if test "$installed" = no; then
       notinst_deplibs="$notinst_deplibs $lib"
       need_relink=yes
-@@ -2644,7 +2683,7 @@ EOF
+@@ -2644,7 +2693,7 @@ EOF
       add_dir=
       add=
       # Finalize command for both is simple: just hardcode it.
@@ -143,7 +167,7 @@
         add="$libdir/$linklib"
       elif test "$hardcode_minus_L" = yes; then
         add_dir="-L$libdir"
-@@ -5932,40 +5971,6 @@ relink_command=\"$relink_command\""
+@@ -5932,40 +5981,6 @@ relink_command=\"$relink_command\""
       # Exit here if they wanted silent mode.
       test "$show" = : && exit $EXIT_SUCCESS

@@ -184,7 +208,7 @@
       exit $EXIT_SUCCESS
       ;;

-@@ -6516,12 +6521,11 @@ exit $?
+@@ -6516,12 +6531,11 @@ exit $?
   # configuration.  But we'll never go from static-only to shared-only.

   # ### BEGIN LIBTOOL TAG CONFIG: disable-shared