Re: 10-csw-cygwin-install-strip.patch

2004-11-01 Thread Gary V. Vaughan
Hi Chuck,

Applied to branch-2-0, except that I've used $host_os to simplify the case
matching.  I'll port into HEAD shortly.

Thanks!
Gary.

Charles Wilson wrote:
> Peter sent me an updated version of this patch, which fixes the quoting
> of the exit command, and removes os2 from the case statement (os2
> doesn't use the .dll.a convention)
> 
> -- 
> Chuck
> 
> 
> 
> 
> 2004-10-28  Peter Ekberg  
> 
> 
>   * config/ltmain.m4sh (func_mode_install): on cygwin,
>   ensure that import libraries do not get stripped.
>   * m4/libtool.m4 (_LT_SYS_DYNAMIC_LINKER): on cygwin,
>   use postinstall_cmds to strip DLL (not import lib)
>   when stripping is requested.
> 
> 
> 
-- 
Gary V. Vaughan  ())_.  [EMAIL PROTECTED],gnu.org}
Research Scientist   ( '/   http://tkd.kicks-ass.net
GNU Hacker   / )=   http://www.gnu.org/software/libtool
Technical Author   `(_~)_   http://sources.redhat.com/autobook


signature.asc
Description: OpenPGP digital signature


Re: 10-csw-cygwin-install-strip.patch

2004-10-30 Thread Charles Wilson
Peter sent me an updated version of this patch, which fixes the quoting 
of the exit command, and removes os2 from the case statement (os2 
doesn't use the .dll.a convention)

--
Chuck
2004-10-28  Peter Ekberg  


* config/ltmain.m4sh (func_mode_install): on cygwin,
ensure that import libraries do not get stripped.
* m4/libtool.m4 (_LT_SYS_DYNAMIC_LINKER): on cygwin,
use postinstall_cmds to strip DLL (not import lib)
when stripping is requested.
Index: config/ltmain.m4sh
===
RCS file: /cvsroot/libtool/libtool/config/ltmain.m4sh,v
retrieving revision 1.1.2.12
diff -u -r1.1.2.12 ltmain.m4sh
--- config/ltmain.m4sh  20 Oct 2004 08:41:34 -  1.1.2.12
+++ config/ltmain.m4sh  30 Oct 2004 18:24:15 -
@@ -1827,7 +1827,17 @@
  # Install the shared library and build the symlinks.
  $show "$install_prog $dir/$srcname $destdir/$realname"
  $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $?
- if test -n "$stripme" && test -n "$striplib"; then
+ tstripme="$stripme"
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32*)
+   case $realname in
+   *.dll.a)
+ tstripme=""
+ ;;
+   esac
+   ;;
+ esac
+ if test -n "$tstripme" && test -n "$striplib"; then
$show "$striplib $destdir/$realname"
$run eval "$striplib $destdir/$realname" || exit $?
  fi
Index: m4/libtool.m4
===
RCS file: /cvsroot/libtool/libtool/m4/libtool.m4,v
retrieving revision 1.125.2.5
diff -u -r1.125.2.5 libtool.m4
--- m4/libtool.m4   20 Oct 2004 08:41:34 -  1.125.2.5
+++ m4/libtool.m4   30 Oct 2004 18:25:43 -
@@ -1719,7 +1719,10 @@
   dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;$ECHO \$dlname'\''`~
   dldir=$destdir/`dirname \$dlpath`~
   test -d \$dldir || mkdir -p \$dldir~
-  $install_prog $dir/$dlname \$dldir/$dlname'
+  $install_prog $dir/$dlname \$dldir/$dlname~
+  if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+$run eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
+  fi'
 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
   dlpath=$dir/\$dldll~
$RM \$dlpath'

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/

10-csw-cygwin-install-strip.patch

2004-10-28 Thread Charles Wilson
On cygwin, 'make install-strip' in a libtoolized, automake-driven 
project ends up stripping the import library, instead of the DLL.  This 
is bad: not only is the DLL unstripped, but stripping an import library 
can sometimes break it, and make the installed lib unlinkable.

e.g. this command:
/bin/sh ../libtool --mode=install /usr/bin/install -c -s 'libgg.la'
'/usr/lib/libgg.la'
does the wrong thing.
The following patch was submitted on the cygwin list by Peter Ekberg. 
It fixes this problem, and incurs no regressions in the testsuite when I 
used it.

--
Chuck
2004-10-28  Peter Ekberg  


* config/ltmain.m4sh (func_mode_install): on cygwin,
ensure that import libraries do not get stripped.
* m4/libtool.m4 (_LT_SYS_DYNAMIC_LINKER): on cygwin,
use postinstall_cmds to strip DLL (not import lib)
when stripping is requested.
Index: config/ltmain.m4sh
===
RCS file: /cvsroot/libtool/libtool/config/ltmain.m4sh,v
retrieving revision 1.1.2.12
diff -u -r1.1.2.12 ltmain.m4sh
--- config/ltmain.m4sh  20 Oct 2004 08:41:34 -  1.1.2.12
+++ config/ltmain.m4sh  28 Oct 2004 17:03:37 -
@@ -1827,7 +1827,16 @@
  # Install the shared library and build the symlinks.
  $show "$install_prog $dir/$srcname $destdir/$realname"
  $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $?
- if test -n "$stripme" && test -n "$striplib"; then
+ tstripme="$stripme"
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+   case $realname in
+   *.dll.a)
+ tstripme=""
+ ;;
+   esac
+ esac
+ if test -n "$tstripme" && test -n "$striplib"; then
$show "$striplib $destdir/$realname"
$run eval "$striplib $destdir/$realname" || exit $?
  fi
Index: m4/libtool.m4
===
RCS file: /cvsroot/libtool/libtool/m4/libtool.m4,v
retrieving revision 1.125.2.5
diff -u -r1.125.2.5 libtool.m4
--- m4/libtool.m4   20 Oct 2004 08:41:34 -  1.125.2.5
+++ m4/libtool.m4   28 Oct 2004 17:03:42 -
@@ -1719,7 +1719,10 @@
   dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;$ECHO \$dlname'\''`~
   dldir=$destdir/`dirname \$dlpath`~
   test -d \$dldir || mkdir -p \$dldir~
-  $install_prog $dir/$dlname \$dldir/$dlname'
+  $install_prog $dir/$dlname \$dldir/$dlname~
+  if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+$run eval '\''$striplib \$dldir/$dlname'\'' || exit $?;
+  fi'
 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
   dlpath=$dir/\$dldll~
$RM \$dlpath'

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/