libtool
[Top][All Lists]
Advanced

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

libtool/MinGW DLLs patch - tidied up section 1


From: Max Bowsher
Subject: libtool/MinGW DLLs patch - tidied up section 1
Date: Tue, 17 Sep 2002 13:18:20 +0100

I am tidying and explaining my patch bit by bit. Here is the first chunk,
including the merge of the Cygwin-local changes to libtool (not done by me).

Hunks 1 & 2 should be fine. Hunk 3 is purely the addition of a comment, which
you may prefer to leave out on the grounds of unnecessary bloat.
Either way, the functional change in that section goes hand-in-hand with a
change to archive_expsym_cmds

Max.

------ from here is the text of the attatchment, for ease of viewing /
discussion ------

Explanation: This section is a merge of the current Cygwin patches to
libtool.m4,
 plus a couple of changes with respect to MinGW

Hunk 1: The comment says it all

Hunk 2: Apparently a bugfix to Cygwin's postinstall_cmds. I want to borrow those
 postinstall_cmds later, so we should have the latest version.

Hunk 3: Up to the '-' came from Cygwin. The next bit of the comment is mine. I'm
 not even sure if $ltdll_cmds work any more. I've bee using the $NM
 incantation, since I do have a sort and a uniq.

--- libtool.m4.cvs 2002-09-11 08:35:40.000000000 +0100
+++ libtool.m4.cvs+cyg 2002-09-17 12:52:47.000000000 +0100
@@ -610,6 +610,17 @@
     lt_cv_sys_max_cmd_len=12288;    # 12K is about right
     ;;

+  cygwin* | mingw*)
+    # On Win9x/ME, this test blows up -- it succeeds, but takes
+    # about 5 minutes as the teststring grows exponentially.
+    # Worse, since 9x/ME are not pre-emptively multitasking,
+    # you end up with a "frozen" computer, even though with patience
+    # the test eventually succeeds (with a max line length of 256k).
+    # Instead, let's just punt: use the minimum linelength reported by
+    # all of the supported platforms: 8192 (on NT/2K/XP).
+    lt_cv_sys_max_cmd_len=8192;
+    ;;
+
   gnu*)
     # Under GNU Hurd, this test is not required because there is
     # no limit to the length of command line arguments.
@@ -1118,10 +1129,11 @@
     library_names_spec='$libname.dll.a'
     sys_lib_search_path_spec="/lib /lib/w32api /usr/lib /usr/local/lib"
     soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} |
sed -e 's/[[.]]/-/g'`${versuffix}.dll'
-    postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo
\$dlname'\''`~
+    postinstall_cmds='base_file=`basename \${file}`~
+      dlpath=`bash 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo
\$dlname'\''`~
       dldir=$destdir/`dirname \$dlpath`~
       test -d \$dldir || mkdir -p \$dldir~
-      $install_prog .libs/$dlname \$dldir/$dlname'
+      $install_prog $dir/$dlname \$dldir/$dlname'
     postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
       dlpath=$dir/\$dldll~
        $rm \$dlpath'
@@ -4514,7 +4526,7 @@
       _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience |
awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) &&
([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
     fi
     ;;
-  mingw* | pw32*)
+  mingw* | pw32*) # and not cygwin.  Cygwin uses the $NM incantation, below -
and so, probably, should mingw if sort and uniq can be guaranteed. The $NM is
_much_ quicker than $ltdll_cmds
     _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
   ;;
   *)
END_OF_PATCH

Attachment: max-libtool.m4-01-cygmerge.patch
Description: Text document


reply via email to

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