[SCM] GNU Libtool branch, master, updated. v2.2.10-16-gd640a3f

2010-06-14 Thread Ralf Wildenhues
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project GNU Libtool.

The branch, master has been updated
   via  d640a3f4fca82e18b16eed3d6cc2f91e5cc8d74e (commit)
  from  0263ff229bbf6f02a61d4ccad3bd4ab3a5601e1d (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -
commit d640a3f4fca82e18b16eed3d6cc2f91e5cc8d74e
Author: Ralf Wildenhues ralf.wildenh...@gmx.de
Date:   Sun Jun 13 11:46:16 2010 +0200

Enable colored Autotest testsuite output if available.

* tests/testsuite.at: Move AT_INIT call down to late in the
file, all prior code can go beforehand.
Call AT_COLOR_TESTS if defined.

Signed-off-by: Ralf Wildenhues ralf.wildenh...@gmx.de

---

Summary of changes:
 ChangeLog  |7 +++
 tests/testsuite.at |9 ++---
 2 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 2ffbcee..8629a74 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2010-06-14  Ralf Wildenhues  ralf.wildenh...@gmx.de
+
+   Enable colored Autotest testsuite output if available.
+   * tests/testsuite.at: Move AT_INIT call down to late in the
+   file, all prior code can go beforehand.
+   Call AT_COLOR_TESTS if defined.
+
 2010-06-14  Peter O'Gorman  pe...@pogma.com
 
Pass resident test with --disable-shared too.
diff --git a/tests/testsuite.at b/tests/testsuite.at
index 423e544..3935962 100644
--- a/tests/testsuite.at
+++ b/tests/testsuite.at
@@ -1,6 +1,6 @@
 # Process with autom4te to create an -*- Autotest -*- test suite.
 #
-#   Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Free Software
+#   Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
 #   Foundation, Inc.
 #   Written by Gary V. Vaughan, 2004
 #
@@ -23,8 +23,6 @@
 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 
 
-AT_INIT
-
 m4_divert_push([PREPARE_TESTS])dnl
 : ${tst_dist=dist}
 : ${ACLOCAL=aclocal}
@@ -441,6 +439,11 @@ m4_pattern_allow([^dnl$])
 # We exercise these tools.
 dnl AT_TESTED([grep autoreconf autom4te automake])
 
+# Enable colored output if available.
+m4_ifdef([AT_COLOR_TESTS], [AT_COLOR_TESTS])
+
+AT_INIT
+
 ## --- ##
 ## The suite.  ##
 ## --- ##


hooks/post-receive
-- 
GNU Libtool



Re: Multiple test failures with --disable-shared

2010-06-14 Thread Ralf Wildenhues
Hi Peter,

* Peter O'Gorman wrote on Mon, Jun 14, 2010 at 05:18:55AM CEST:
 On 06/13/2010 12:07 AM, Ralf Wildenhues wrote:
 * Peter O'Gorman wrote on Sun, Jun 13, 2010 at 06:07:44AM CEST:
[ the resident test ]
 I'm not sure what testing that modules cannot be unloaded gets you
 when you don't have shared libraries.
 
 That may be true, but the failure was during lt_dlopen.  I think it
 should be possible to preload modules with the resident bit, no?  I
 mean, they are the prototype of resident modules, their closing is what
 won't do the right thing for non-residents (and maybe a future
 improvement of the preopen loader could even emulate that).
 
 This failure looks like a genuine ltdl bug to me; why not leave it open
 for now?

 IIRC this one could also be fixed by using
 LTDL_SET_PRELOADED_SYMBOLS, I don't remember for sure, but I recall
 being convinced that these were all testsuite issues.

Well, if that fixes it, then that is fine with me of course.

Thanks!
Ralf



MSVC: Find potential libs regardless of case.

2010-06-14 Thread Peter Rosin

Hi!

Here's the next patch on the MSVC branch. I decided to merge in
a couple of things further ahead, no point in reviewing stuff
when an improvement is around the corner, right?

What I'm looking for is a go-ahead that this patch is ready for
master, but then delay pushing it until enough of the MSVC support
is reviewed and ready to make this patch relevant. I'm fine with
waiting with regression testing until just before pushing (as I
don't expect any regressions), so that we are not getting too
tired of regression testing and run out of steem.

So, this is basically

On Windows, find potential libs regardless of file name case.
7350644a0a5f5922326cfebe073b1822ae028a9b
Disable nocase handling for cross compiles.
5b9cabda803d10ba01b7b38e2731d4927e4c0024

and relevant parts of

patch msvc-documentation.patch
06cfce005204bb8ca212aadab38b38c0202ea04e

merged into one patch but with cygwin removed since I don't
really care about Cygwin+MSVC at this point and Eric Blake
and Chuck didn't want it. Minimum resistance etc...

Previous discussions of this patch:

http://lists.gnu.org/archive/html/libtool-patches/2008-08/msg7.html
http://lists.gnu.org/archive/html/libtool-patches/2007-07/msg00039.html

Cheers,
Peter

2010-06-14  Peter Rosin  p...@lysator.liu.se

On Windows, find potential libs regardless of file name case.
* libltdl/m4/libtool.m4 (_LT_CHECK_MAGIC_METHOD),
libltdl/config/ltmain.m4sh (func_mode_link): On Windows,
find potential libs regardless of file name case.
* tests/nocase.at: New test, to check for regressions
of the above.
* Makefile.am: Add above new test.
* doc/libtool.texi (libtool script contents): Document
new variables.
commit b9a24622056e15aeca5fba9afa5647d949a6f2fa
Author: Peter Rosin p...@lysator.liu.se
Date:   Mon Jun 14 12:52:55 2010 +0200

On Windows, find potential libs regardless of file name case.

* libltdl/m4/libtool.m4 (_LT_CHECK_MAGIC_METHOD),
libltdl/config/ltmain.m4sh (func_mode_link): On Windows,
find potential libs regardless of file name case.
* tests/nocase.at: New test, to check for regressions
of the above.
* Makefile.am: Add above new test.
* doc/libtool.texi (libtool script contents): Document
new variables.

diff --git a/ChangeLog b/ChangeLog
index a313b4b..10c1c62 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2010-06-14  Peter Rosin  p...@lysator.liu.se
+
+   On Windows, find potential libs regardless of file name case.
+   * libltdl/m4/libtool.m4 (_LT_CHECK_MAGIC_METHOD),
+   libltdl/config/ltmain.m4sh (func_mode_link): On Windows,
+   find potential libs regardless of file name case.
+   * tests/nocase.at: New test, to check for regressions
+   of the above.
+   * Makefile.am: Add above new test.
+   * doc/libtool.texi (libtool script contents): Document
+   new variables.
+
 2010-06-13  Peter O'Gorman  pe...@pogma.com
 
Test with --disable-shared at release time too.
diff --git a/Makefile.am b/Makefile.am
index 8e00b3e..1114e67 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -477,6 +477,7 @@ TESTSUITE_AT= tests/testsuite.at \
  tests/deplib-in-subdir.at \
  tests/infer-tag.at \
  tests/localization.at \
+ tests/nocase.at \
  tests/install.at \
  tests/versioning.at \
  tests/destdir.at \
diff --git a/doc/libtool.texi b/doc/libtool.texi
index 051aec3..035cb38 100644
--- a/doc/libtool.texi
+++ b/doc/libtool.texi
@@ -5981,6 +5981,16 @@ and relinking at install time is triggered.  This also 
means that @var{DESTDIR}
 installation does not work as expected.
 @end defvar
 
+...@defvar file_magic_glob
+How to find potential files when @var{deplibs_check_method} is
+...@samp{file_magic}. @var{file_magic_glob} is a @code{sed} expression,
+and the @code{sed} instance is fed potential files, that is
+transformed by the @var{file_magic_glob} expression. Useful when the
+shell does not support the shell option @code{nocaseglob}, making
+...@var{want_nocaseglob} inappropriate. Normally disabled (i.e.
+...@var{file_magic_glob} empty).
+...@end defvar
+
 @defvar finish_cmds
 Commands to tell the dynamic linker how to find shared libraries in a
 specific directory.
@@ -6252,6 +6262,13 @@ The library version numbering type.  One of 
@samp{libtool},
 @samp{osf}, @samp{sunos}, @samp{windows}, or @samp{none}.
 @end defvar
 
+...@defvar want_nocaseglob
+Find potential files using the shell option @code{nocaseglob} when
+...@var{deplibs_check_method} is @samp{file_magic}. Normally set to
+...@samp{no}, set to @samp{yes} to enable the @code{nocaseglob} shell
+option when looking for potential files.
+...@end defvar
+
 @defvar whole_archive_flag_spec
 Compiler flag to generate shared objects from convenience archives.
 @end defvar
diff --git a/libltdl/config/ltmain.m4sh b/libltdl/config/ltmain.m4sh

Re: Multiple test failures with --disable-shared

2010-06-14 Thread Peter O'Gorman

On 06/14/2010 12:58 AM, Ralf Wildenhues wrote:


IIRC this one could also be fixed by using
LTDL_SET_PRELOADED_SYMBOLS, I don't remember for sure, but I recall
being convinced that these were all testsuite issues.


Well, if that fixes it, then that is fine with me of course.


Ok thanks, pushed this. No test failures for me with --disable-shared now.

Peter
From 0263ff229bbf6f02a61d4ccad3bd4ab3a5601e1d Mon Sep 17 00:00:00 2001
From: Peter O'Gorman pe...@pogma.com
Date: Mon, 14 Jun 2010 11:04:17 -0500
Subject: [PATCH] Pass resident test with --disable-shared too.

* tests/resident.at: use LTDL_SET_PRELOADED_SYMBOLS.
---
 ChangeLog |5 +
 tests/resident.at |2 ++
 2 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index a313b4b..2ffbcee 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2010-06-14  Peter O'Gorman  pe...@pogma.com
+
+	Pass resident test with --disable-shared too.
+	* tests/resident.at: use LTDL_SET_PRELOADED_SYMBOLS.
+
 2010-06-13  Peter O'Gorman  pe...@pogma.com
 
 	Test with --disable-shared at release time too.
diff --git a/tests/resident.at b/tests/resident.at
index 2a85204..cf00688 100644
--- a/tests/resident.at
+++ b/tests/resident.at
@@ -38,6 +38,8 @@ main (int argc, char* argv[])
   lt_dlhandle plugin_handle;
   lt_dladvise advise;
 
+  LTDL_SET_PRELOADED_SYMBOLS();
+
   if (argc  2)
 {
   fprintf (stderr, usage: %s plugin\n, argv[0]);
-- 
1.7.0.1



Re: Enable colored Autotest testsuite output if available.

2010-06-14 Thread Eric Blake
On 06/13/2010 05:17 AM, Ralf Wildenhues wrote:
 OK to commit this patch if this one is accepted into Autoconf?
 http://lists.gnu.org/archive/html/autoconf-patches/2010-06/msg00031.html
 
 The move the testsuite.at code above AT_INIT should have no impact
 beside reordering things in the PREPARE_TESTS diversion a bit, which
 should be harmless (I checked the diff with current git Autoconf).
 
 Thanks,
 Ralf
 
 Enable colored Autotest testsuite output if available.

Looks nice to me; in fact, it's probably okay to commit even without
autoconf's colored output patch committed yet.

-- 
Eric Blake   ebl...@redhat.com+1-801-349-2682
Libvirt virtualization library http://libvirt.org



signature.asc
Description: OpenPGP digital signature


Re: MSVC: Find potential libs regardless of case.

2010-06-14 Thread Ralf Wildenhues
Hi Peter,

* Peter Rosin wrote on Mon, Jun 14, 2010 at 01:26:04PM CEST:
 Here's the next patch on the MSVC branch. I decided to merge in
 a couple of things further ahead, no point in reviewing stuff
 when an improvement is around the corner, right?

this patch is ok for master, provided that it introduces no regressions
for MinGW with GCC, and you fix the trivial nits below.  You decide how
much rechecking is needed for that, and no need to ask for another
approval for the fixed patch.  I don't care when and in what order you
apply it, as long as it's not accidentally during a release freeze.  So
you might as well want to do it now and forget about it.  ;-)

 What I'm looking for is a go-ahead that this patch is ready for
 master, but then delay pushing it until enough of the MSVC support

However you like.  Thanks.

You need a short NEWS entry for the semantic change on MinGW that libs
are searched case-insensitively now.

 diff --git a/doc/libtool.texi b/doc/libtool.texi
 index 051aec3..035cb38 100644
 --- a/doc/libtool.texi
 +++ b/doc/libtool.texi
 @@ -5981,6 +5981,16 @@ and relinking at install time is triggered.  This also 
 means that @var{DESTDIR}
  installation does not work as expected.
  @end defvar
  
 +...@defvar file_magic_glob
 +How to find potential files when @var{deplibs_check_method} is
 +...@samp{file_magic}. @var{file_magic_glob} is a @code{sed} expression,
 +and the @code{sed} instance is fed potential files, that is
 +transformed by the @var{file_magic_glob} expression. Useful when the
 +shell does not support the shell option @code{nocaseglob}, making
 +...@var{want_nocaseglob} inappropriate. Normally disabled (i.e.
 +...@var{file_magic_glob} empty).
 +...@end defvar

I find this paragraph hard to understand.  Maybe
  s/fed potential files/fed potential file names/   ?
  s/empty/is /   ?

@var is not for variables, it is for metasyntactic variables only, which
are not needed anywhere in this and the other added paragraph.  Use
@samp or @code for file_magic_glob and want_nocaseglob.

 +...@defvar want_nocaseglob
 +Find potential files using the shell option @code{nocaseglob} when

comma before when

 +...@var{deplibs_check_method} is @samp{file_magic}. Normally set to
 +...@samp{no}, set to @samp{yes} to enable the @code{nocaseglob} shell

Period after no, not comma; capitalize 'Set'.

 +option when looking for potential files.

when looking for potential file names in a case-insensitive manner.

 +...@end defvar

 --- a/libltdl/m4/libtool.m4
 +++ b/libltdl/m4/libtool.m4
 @@ -3163,6 +3163,21 @@ tpf*)
;;
  esac
  ])
 +
 +file_magic_glob=
 +want_nocaseglob=no
 +if test $build = $host; then
 +  case $host_os in
 +  mingw* | pw32*)
 +if ( shopt | grep nocaseglob ) /dev/null 21; then
 +  want_nocaseglob=yes
 +else
 +  file_magic_glob=`echo 
 aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e 
 s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g`
 +fi
 +;;
 +  esac
 +fi
 +
  file_magic_cmd=$lt_cv_file_magic_cmd
  deplibs_check_method=$lt_cv_deplibs_check_method
  test -z $deplibs_check_method  deplibs_check_method=unknown
 @@ -3171,6 +3186,10 @@ _LT_DECL([], [deplibs_check_method], [1],
  [Method to check whether dependent libraries are shared objects])
  _LT_DECL([], [file_magic_cmd], [1],
  [Command to use when deplibs_check_method == file_magic])
 +_LT_DECL([], [file_magic_glob], [1],
 +[How to find potential files when deplibs_check_method == file_magic])

Please use = not == in shell script comments.  Another instance below,
and yes, I see the one that was there previously, might as well fix that
too while you're at it.  Thanks.

 +_LT_DECL([], [want_nocaseglob], [1],
 +[Find potential files using nocaseglob when deplibs_check_method == 
 file_magic])
  ])# _LT_CHECK_MAGIC_METHOD

 --- /dev/null
 +++ b/tests/nocase.at
 @@ -0,0 +1,82 @@
 +# nocase.at --  test for nocase lib search  -*- Autotest -*-
 +#
 +#   Copyright (C) 2007 Free Software Foundation, Inc.

Oops.

 +#   Written by Peter Rosin, 2007

 +AT_SETUP([nocase library search])

 +AT_DATA([foo/Foo.c],
 +[
 +int Foo(void) { return 1; }

Space before open parenthesis.  Several instances.  (Yes, I know we are
not consistent in the test suite, and it's harmless if you don't fix
this, but when I notice deviations from GCS I'll mention them.  ;-)

 +$LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c -o foo/Foo.lo 
 foo/Foo.c
 +AT_CHECK([$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o 
 foo/libFoo.la foo/Foo.lo ]dnl
 +  [-no-undefined -version-info 1:0:0 -rpath $libdir],
 +  [], [ignore], [ignore])
 +AT_CHECK([$LIBTOOL --mode=install cp foo/libFoo.la $libdir],
 +  [], [ignore], [ignore])
 +
 +rm -f $libdir/libFoo.la

Don't you also want this here to avoid picking up uninstalled libFoo?
  AT_CHECK([$LIBTOOL --mode=clean rm -f foo/libFoo.la], [], [ignore])

 +$LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c -o bar/bar.lo 
 bar/bar.c
 +AT_CHECK([$LIBTOOL --mode=link 

Re: MSVC: Find potential libs regardless of case.

2010-06-14 Thread Eric Blake
On 06/14/2010 03:01 PM, Ralf Wildenhues wrote:
 +eval `$EGREP '^(old_library)='  $libdir/libbar.la`
 
 This is probably lacking double-quoting around the `...` text.  Can you
 verify?

For that matter, it's not safe in the presence of signals, since some
shells end up doing eval '' if the `` is interrupted.  You want:

str=`$EGREP '^(old_library)='  $libdir/libbar.la`
eval $str

or possibly even $libdir in the first line to be robust to spaces in
file names.

-- 
Eric Blake   ebl...@redhat.com+1-801-349-2682
Libvirt virtualization library http://libvirt.org



signature.asc
Description: OpenPGP digital signature


Re: [libtool 2.2.11a] testsuite: 48 69 92 failed [cygwin]

2010-06-14 Thread Ralf Wildenhues
* Charles Wilson wrote on Sun, Jun 13, 2010 at 08:51:00PM CEST:
 On 6/12/2010 4:58 AM, Ralf Wildenhues wrote:
  * Charles Wilson wrote on Fri, Jun 11, 2010 at 02:28:41PM CEST:
  In 48, the problem occurs during libtool --clean:
  /usr/src/packages/libtool/git/build/libtool: line 1693:
  sub3/subsub/sub3/subsub/.libs/m1_ltshwrapper: No such file or directory
  
  This failure is probably easiest to debug and fix if you run
make check-local TESTSUITEFLAGS='-v -d -x 48'
cd tests/testsuite.dir/048
  
  and rerun the failing mode=clean command with --debug as first libtool
  argument.
 
 Here's the relevant portion:
[...]

Thanks.  $objdir is a global variable set in the initial section of
the libtool script, and temporarily overriding it in func_mode_uninstall
is the wrong thing to do.  Can you try whether this fixes the issue?

Thanks,
Ralf

Fix cleaning of uninstalled w32 shell wrapper in subdirs.

* libltdl/config/ltmain.m4sh (func_mode_uninstall): Do not
override global objdir variable, instead use odir for the
directory of to-be-removed files.  Drop unneeded origobjdir.
Report by Charles Wilson.

diff --git a/libltdl/config/ltmain.m4sh b/libltdl/config/ltmain.m4sh
index dd883a6..74c7114 100644
--- a/libltdl/config/ltmain.m4sh
+++ b/libltdl/config/ltmain.m4sh
@@ -7961,24 +7961,23 @@ func_mode_uninstall ()
 
 rmdirs=
 
-origobjdir=$objdir
 for file in $files; do
   func_dirname $file  .
   dir=$func_dirname_result
   if test X$dir = X.; then
-   objdir=$origobjdir
+   odir=$objdir
   else
-   objdir=$dir/$origobjdir
+   odir=$dir/$objdir
   fi
   func_basename $file
   name=$func_basename_result
-  test $mode = uninstall  objdir=$dir
+  test $mode = uninstall  odir=$dir
 
-  # Remember objdir for removal later, being careful to avoid duplicates
+  # Remember odir for removal later, being careful to avoid duplicates
   if test $mode = clean; then
case  $rmdirs  in
- * $objdir *) ;;
- *) rmdirs=$rmdirs $objdir ;;
+ * $odir *) ;;
+ *) rmdirs=$rmdirs $odir ;;
esac
   fi
 
@@ -8004,18 +8003,18 @@ func_mode_uninstall ()
 
  # Delete the libtool libraries and symlinks.
  for n in $library_names; do
-   rmfiles=$rmfiles $objdir/$n
+   rmfiles=$rmfiles $odir/$n
  done
- test -n $old_library  rmfiles=$rmfiles $objdir/$old_library
+ test -n $old_library  rmfiles=$rmfiles $odir/$old_library
 
  case $mode in
  clean)
case   $library_names  in
#in the beginning catches empty $dlname
* $dlname *) ;;
-   *) rmfiles=$rmfiles $objdir/$dlname ;;
+   *) rmfiles=$rmfiles $odir/$dlname ;;
esac
-   test -n $libdir  rmfiles=$rmfiles $objdir/$name 
$objdir/${name}i
+   test -n $libdir  rmfiles=$rmfiles $odir/$name $odir/${name}i
;;
  uninstall)
if test -n $library_names; then
@@ -8082,12 +8081,12 @@ func_mode_uninstall ()
 
# note $name still contains .exe if it was in $file originally
# as does the version of $file that was added into $rmfiles
-   rmfiles=$rmfiles $objdir/$name $objdir/${name}S.${objext}
+   rmfiles=$rmfiles $odir/$name $odir/${name}S.${objext}
if test $fast_install = yes  test -n $relink_command; then
- rmfiles=$rmfiles $objdir/lt-$name
+ rmfiles=$rmfiles $odir/lt-$name
fi
if test X$noexename != X$name ; then
- rmfiles=$rmfiles $objdir/lt-${noexename}.c
+ rmfiles=$rmfiles $odir/lt-${noexename}.c
fi
  fi
fi
@@ -8095,7 +8094,6 @@ func_mode_uninstall ()
   esac
   func_show_eval $RM $rmfiles 'exit_status=1'
 done
-objdir=$origobjdir
 
 # Try to remove the ${objdir}s in the directories where we deleted files
 for dir in $rmdirs; do



Re: [libtool 2.2.11a] testsuite: 48 69 92 failed [cygwin]

2010-06-14 Thread Charles Wilson
On 6/14/2010 11:26 PM, Ralf Wildenhues wrote:
 Thanks.  $objdir is a global variable set in the initial section of
 the libtool script, and temporarily overriding it in func_mode_uninstall
 is the wrong thing to do.

It looked fishy to me, but I assumed it was put there for a reason...but
I couldn't figure out what that reason was, since it seemed like subdir
objects would have been handled anyway.

Now that I see where you used $odir, it makes more sense.

 Can you try whether this fixes the issue?

It does, but I only tried to run test 048.  I'll report back tomorrow
after the whole test suite finishes.  Then I'll try incrementally to
address your points vis the other two failures (069 and 092).

--
Chuck



Re: pr-msvc-support merge

2010-06-14 Thread Peter Rosin

Hi Ralf,

Den 2010-06-12 10:05 skrev Ralf Wildenhues:

* Peter Rosin wrote on Sat, Jun 12, 2010 at 12:49:18AM CEST:

The above may sound as if I'm opposed to moving the script to
automake, but I'm not. I'm mostly afraid of the script ending up
where the cccl script - or should I say script_s_ - ended up.


Well, I sort of figured that the 'compile' script could end up absorbing
quite a bit of the cccl functionality so to make it unneeded.  But hey,
let's be honest, somebody would have to do this work, because I don't
have the resources to do it.


Do you think something along these lines would be acceptable? It would
remove the need of some patches on the pr-msvc-support branch...

Is it perhaps time for me to assign copyright for automake changes?

Cheers,
Peter
diff --git a/lib/compile b/lib/compile
index c0096a7..ce89059 100755
--- a/lib/compile
+++ b/lib/compile
@@ -1,9 +1,9 @@
 #! /bin/sh
 # Wrapper for compilers which do not understand `-c -o'.
 
-scriptversion=2009-10-06.20; # UTC
+scriptversion=2010-06-14.06; # UTC
 
-# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2009  Free Software
+# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2009, 2010  Free Software
 # Foundation, Inc.
 # Written by Tom Tromey tro...@cygnus.com.
 #
@@ -29,6 +29,108 @@ scriptversion=2009-10-06.20; # UTC
 # bugs to bug-autom...@gnu.org or send patches to
 # automake-patc...@gnu.org.
 
+path_conv=
+
+# func_path_conf build_path
+# Convert a $build path to $host form and store it in $path
+func_path_conv ()
+{
+  path=$1
+  case $path in
+/[^/]*) # absolute path, and no UNC path
+  if test -z $path_conv; then
+   # lazily determine how to convert abs paths
+   case `uname -s` in
+ MINGW*)
+   path_conv=mingw
+   ;;
+ CYGWIN*)
+   path_conv=cygwin
+   ;;
+ *)
+   path_conv=wine
+   ;;
+   esac
+  fi
+  case $path_conv in
+   mingw)
+ path=`cmd //C echo $path  | sed -e 's/\(.*\)  *\$/\1/'`
+ ;;
+   cygwin)
+ path=`cygpath -w $path`
+ ;;
+   wine)
+ path=`winepath -w $path`
+ ;;
+  esac
+  ;;
+  esac
+}
+
+# func_cl_wrapper cl arg...
+# Adjust compile command to suite cl
+func_cl_wrapper ()
+{
+  # Assume a capable shell
+  for arg
+  do
+if test -n $eat; then
+  eat=
+else
+  case $1 in
+   -o)
+ # configure might choose to run compile as `compile cc -o foo foo.c'.
+ eat=1
+ case $2 in
+   *.o | *.obj)
+ func_path_conv $2
+ set x $@ -Fo$path
+ shift
+ ;;
+   *)
+ func_path_conv $2
+ set x $@ -Fe$path
+ shift
+ ;;
+ esac
+ ;;
+   -I*)
+ func_path_conv ${1#-I}
+ set x $@ -I$path
+ shift
+ ;;
+   -l*)
+ set x $@ ${1#-l}.lib
+ shift
+ ;;
+   -L*)
+ func_path_conv ${1#-L}
+ export LINK=$LINK -LIBPATH:$path
+ ;;
+   -Wl,*)
+ arg=${1#-Wl,}
+ save_ifs=$IFS; IFS=','
+ for flag in $arg; do
+   IFS=$save_ifs
+   export LINK=$LINK $flag
+ done
+ IFS=$save_ifs
+ ;;
+   -Xlinker)
+ eat=1
+ export LINK=$LINK $2
+ ;;
+   *)
+ set x $@ $1
+ shift
+ ;;
+  esac
+fi
+shift
+  done
+  exec $@
+}
+
 case $1 in
   '')
  echo $0: No command.  Try \`$0 --help' for more information. 12
@@ -53,6 +155,9 @@ EOF
 echo compile $scriptversion
 exit $?
 ;;
+  cl | *[/\\]cl)
+func_cl_wrapper $@  # Doesn't return...
+;;
 esac
 
 ofile=
___
http://lists.gnu.org/mailman/listinfo/libtool


Re: pr-msvc-support merge

2010-06-14 Thread Ralf Wildenhues
[ adding automake-patches; this is
  http://thread.gmane.org/gmane.comp.gnu.libtool.general/10927/focus=10954 ]

* Peter Rosin wrote on Mon, Jun 14, 2010 at 09:35:45AM CEST:
 Den 2010-06-12 10:05 skrev Ralf Wildenhues:
 Well, I sort of figured that the 'compile' script could end up absorbing
 quite a bit of the cccl functionality so to make it unneeded.  But hey,
 let's be honest, somebody would have to do this work, because I don't
 have the resources to do it.
 
 Do you think something along these lines would be acceptable? It would
 remove the need of some patches on the pr-msvc-support branch...

The patch looks pretty good to me already, but is lacking additions for
ChangeLog, NEWS, and maybe doc/ and tests/ too.

Wrt. test suite exposure, here's my overall take on this for Automake:
Generally, the suite should try to cover each and every single code bit,
even error cases, as much as is feasible without big hassles.  Of
course, that'll only be realistic if you take the union of test suite
runs over all sorts of systems (but if some system-specific part can be
emulated elsewhere, that's great of course).  As a first step, if you
tell me that the patch fixes some failures of existing tests on some
system with
  env CC=cl make check

then that is fine with me too; as far as we have this information, it
should be noted in the log entry.

I understand the Automake test suite takes very long on MinGW.  As
long as patches are MSVC-specific, you don't need to run the whole
suite for every single patch.  Make good use of 'recheck' and
subsetting, as described in tests/README; for example, if you're only
ever dealing with C code handling,
  cd $top_srcdir/tests  set `grep -l CC *.test`  cd -
  make -k check TESTS=$*

should cut load by two thirds already.

If there are tests that evoke popups or other things requiring
interactivity, then we should invent a 'required' name for that
and a helper make rule to run only those tests, or the complement,
similar to how is done in Libtool (do you use that there BTW?).

Wrt. 'compile' not being used by default in packages not using
AM_PROG_CC_C_O: don't worry about that for the moment.  It is a trivial
first approximation to install the 'compile' script somewhere and use
  ./configure CC='/usr/local/bin/compile cl'

Don't be tempted to add AM_PROG_CC_C_O to projects not needing it
otherwise.  If Automake support for MSVC is significantly improved,
at that point it could for example just install the compile script by
default in any project using C, and have AC_PROG_CC already trigger
the is this MSVC? check without AM_PROG_CC_C_O.

Wrt. avoiding the uname forkexec, that can for example be optimized
by passing an option to the compile script before the compiler argument.
This too can come later, when we know better what set of information is
needed in 'compile'.

Some nits and questions:

 +  case $path_conv in
 + mingw)
 +   path=`cmd //C echo $path  | sed -e 's/\(.*\)  *\$/\1/'`

I fail to understand what this sed script is for.  Help?

 + cygwin)
 +   path=`cygpath -w $path`

IIUC cygpath is pretty much required to be present on Cygwin
installations, right?  Can it fail though?  Should $path retain its old
value if it does?  Don't we want -m rather than -w for forward slashes
(which IIUC even MSVC programs should support) to avoid quoting issues?
  path=`cygpath -m $path || echo $path`

 + wine)
 +   path=`winepath -w $path`

winepath OTOH may not be present, so this should definitely fall back to
the unconverted path I think.  And maybe the path_conv-setting code
check for presence of winepath.

 +# func_cl_wrapper cl arg...
 +# Adjust compile command to suite cl
 +func_cl_wrapper ()
 +{
 +  # Assume a capable shell
 +  for arg
 +  do
 +if test -n $eat; then
 +  eat=
 +else
 +  case $1 in
 + -o)
 +   # configure might choose to run compile as `compile cc -o foo foo.c'.
 +   eat=1
 +   case $2 in
 + *.o | *.obj)
 +   func_path_conv $2
 +   set x $@ -Fo$path
 +   shift
 +   ;;
 + *)
 +   func_path_conv $2
 +   set x $@ -Fe$path
 +   shift
 +   ;;
 +   esac
 +   ;;
 + -I*)
 +   func_path_conv ${1#-I}
 +   set x $@ -I$path
 +   shift
 +   ;;
 + -l*)
 +   set x $@ ${1#-l}.lib
 +   shift
 +   ;;
 + -L*)
 +   func_path_conv ${1#-L}
 +   export LINK=$LINK -LIBPATH:$path

Is LINK a predefined variable?  Does it come from libtool?  Or from the
user or the system?

 +   ;;
 + -Wl,*)
 +   arg=${1#-Wl,}
 +   save_ifs=$IFS; IFS=','
 +   for flag in $arg; do
 + IFS=$save_ifs
 + export LINK=$LINK $flag
 +   done
 +   IFS=$save_ifs

For this, IFS needs to be initialized to default near the beginning of
the script (there is an embedded TAB in the last line):

nl='
'
IFS= $nl

 +   ;;
 + -Xlinker)
 +   eat=1
 +   export 

Re: [RFC] [PATCH] libltdl error reporting

2010-06-14 Thread Peter O'Gorman

On 06/10/2010 12:33 AM, Peter O'Gorman wrote:


At least glibc and Mac OS X reset the dlerror() string to NULL every
time a dl*() api is called (I will check what other systems do in the
next few days). This is so programmers can do:


Sigh, but FreeBSD doesn't.

dlopen nonexisting file
dlopen existing file
check dlerror()

Says 'Cannot open nonexisting file' on FreeBSD (null with glibc and 
Mac OS X).


Oh well, will be interesting to see what other systems to.

Peter

___
http://lists.gnu.org/mailman/listinfo/libtool