Re: [PATCH 1/6] Add --gnulib-version and --news options to announce-gen.

2010-09-01 Thread Ralf Wildenhues
Hello Gary,

* Gary V. Vaughan wrote on Wed, Sep 01, 2010 at 08:09:32AM CEST:
> On 1 Sep 2010, at 12:25, Ralf Wildenhues wrote:
> > That didn't help to make it more readable, or cause less buggy code
> > though.
> 
> Well that's because the shared code in getopts.m4sh is still getting
> exposure.  I think that M4SH_GETOPTS is infinitely more readable and
> maintainable, and especially worth the effort of using and debugging
> if I am to contribute a variation to Autoconf's m4sugar libraries.

I don't think it makes sense to let the users of Libtool, nor its
developers, be test drivers for proposed features to Autoconf.  The
testing Autoconf code is best done extensively inside the Autoconf
testsuite.  For the benefit of avoiding repeated regressions, I have
added Libtool testsuite exposure to a couple of the issues I found, in
v2.2.10-70-g21cffd1 and in v2.2.10-73-g3078821.  But fundamentally, I
think that is not the right approach.

> Why maintain several copies of the same code if we can do it just
> once?

Because the previous code (in ltmain) was not broken?  Because the move
introduced a few regressions?

> >> Surely you're not suggesting that we continue to hand code, maintain,
> >> synchronize the option parsing loop in each of our scripts?
> > 
> > Well, bootstrap didn't need one so far, did it?  How much maintenance
> > does an option parsing loop need, once it is written?  I didn't have the
> > feeling that that was a biggie on our list before that.
> 
> Certainly not a biggie.  But after using the M4SH_GETOPTS generated
> bootstrap script on my gnulib branch for less than a week, going back
> to the under-featured master branch version is already painful.

OK, so which M4SH_GETOPTS-related feature is missing from bootstrap?
Do you propose have a generated bootstrap?

Thanks,
Ralf



Avoid leaking make flags into testsuite results.

2010-09-01 Thread Ralf Wildenhues
I'm committing the following bug fix, with code taken from
automake/tests/defs.in and adapted for Libtool.  It ought to fix about
a third of all the failures in all the autobuild logs; e.g., tests 107
and 109 seen in this log:


| ../../libtool/tests/configure-iface.at:153: $MAKE -q main$EXEEXT || exit 1
| stderr:
| stdout:
| Don't know how to make libltdl/libltdl.la
| `main' not remade because of errors
| ../../libtool/tests/configure-iface.at:153: exit code was 0, expected 1
| 107. configure-iface.at:102: 107. installable libltdl 
(configure-iface.at:102): FAILED (configure-iface.at:153)

This one has been particularly nasty because rerunning the test itself
made the failure go away, and there is no indication in the log that -k was
used (only transported to the inner make through the MAKEFLAGS environment
variable).

It also fixes jobserver warnings seen, e.g., in tests/demo-make.log with
  make -j3 check-TESTS TESTS='tests/demo-conf.test tests/demo-make.test'

| PASS: tests/demo-make.test (exit: 0)
| 
| 
| demo-make.test: ===  Running demo-make.test
| demo-make.test: ===  Running `make ' in demo
| make[5]: Entering directory `/tmp/build/tests/demo'
| make[5]: warning: jobserver unavailable: using -j1.  Add `+' to parent make 
rule.
[...]

It also fixes a couple more spurious failures that I've been struggling
with: for example, demo-noinst-link.test fails on several systems, e.g.:


| libtool: link: /opt/fsw/gcc42/bin/gcc -g -O2 -o .libs/hell main.o  -L./.libs 
-lhello -lm -Wl,+b 
-Wl,/tmp/lt/build-hppa2.0w-hp-hpux11.23-gcc/tests/demo/.libs:/tmp/lt/build-hppa2.0w-hp-hpux11.23-gcc/_inst-demo/lib
| /usr/ccs/bin/ld: Unsatisfied symbols:
|nothing (first referenced in main.o) (data)
|foo (first referenced in main.o) (code)
| collect2: ld returned 1 exit status
| *** Error exit code 1
| demo-noinst-link.test: ===  Succeeded: this means the installed library was 
used, which is wrong
| 
| FAIL: tests/f77demo-exec.test (exit: 1)

and that, too is a $MAKE ... command not failing when it should.

Cheers,
Ralf

Avoid leaking make flags into testsuite results.

* tests/defs.m4sh: Unset MFLAGS, MAKEFLAGS, MAKELEVEL, __MKLVL__
and MAKE_JOBS_FIFO.
* tests/testsuite.at: Likewise.
Fixes warnings in test logs when the user uses 'make -jN check'
and inner $MAKE invocations can't connect to the job server.
Fixes spurious failures of configure-iface.at and of
demo-noinst-link tests with BSD and Tru64 make if the user uses
'make -k', as the exit status of the latter is not reliable.

diff --git a/tests/defs.m4sh b/tests/defs.m4sh
index 0d23dea..b56426f 100644
--- a/tests/defs.m4sh
+++ b/tests/defs.m4sh
@@ -346,6 +346,11 @@ m4dir=$srcdir/libltdl/m4
 auxdir=$srcdir/libltdl/config
 scripts="$auxdir/ltmain.m4sh $srcdir/libtoolize.m4sh"
 
+# Unset some MAKE... variables that may cause $MAKE to act like a
+# recursively invoked sub-make.  Any $MAKE invocation in a test is
+# conceptually an independent invocation.
+unset MFLAGS MAKEFLAGS MAKELEVEL __MKLVL__ MAKE_JOBS_FIFO
+
 # On AIX, shared libraries remain loaded in memory after use if they
 # are world-readable, until root issues slibclean.  On NFS, this causes
 # a testsuite rerun to fail to clean up test group directories.  Avoid
diff --git a/tests/testsuite.at b/tests/testsuite.at
index a20e074..c646c5d 100644
--- a/tests/testsuite.at
+++ b/tests/testsuite.at
@@ -61,6 +61,11 @@ case $lt_INSTALL in
 ;;
 esac
 
+# Unset some MAKE... variables that may cause $MAKE to act like a
+# recursively invoked sub-make.  Any $MAKE invocation in a test is
+# conceptually an independent invocation.
+unset MFLAGS MAKEFLAGS MAKELEVEL __MKLVL__ MAKE_JOBS_FIFO
+
 # On AIX, shared libraries remain loaded in memory after use if they
 # are world-readable, until root issues slibclean.  On NFS, this causes
 # a testsuite rerun to fail to clean up test group directories.  Avoid



tests: fix localization test for GCC on HP-UX 11.00.

2010-09-01 Thread Ralf Wildenhues
http://autobuild.josefsson.org/libtool/log-20100829162778217.txt
This patch fixes the spurious failure when the compiler is properly
setup for localization but the  'diff' program isn't.  :-)

Cheers,
Ralf

tests: fix localization test for GCC on HP-UX 11.00.

* tests/localization.at (localized compiler messages): Be sure
to switch the locale only for the actual compiler commands, so
we don't pick up warnings from helper tools such as diff which
may not have the locale installed.

diff --git a/tests/localization.at b/tests/localization.at
index 71cdad4..392511e 100644
--- a/tests/localization.at
+++ b/tests/localization.at
@@ -1,7 +1,6 @@
 # localization.at -- libtool and locales-*- Autotest -*-
 #
-#   Copyright (C) 2008, 2009 Free Software Foundation, Inc.
-#   Written by Ralf Wildenhues, 2008
+#   Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
 #
 #   This file is part of GNU Libtool.
 #
@@ -26,10 +25,8 @@ AT_SETUP([localized compiler messages])
 AT_KEYWORDS([libtool])
 
 # Let's try German locale.  :-)
-LANG=de_DE
-LANGUAGE=de_DE
-LC_ALL=de_DE
-export LANG LANGUAGE LC_ALL
+m4_pushdef([lt_localize],
+[LANG=de_DE LANGUAGE=de_DE LC_ALL=de_DE])
 
 AT_DATA([a.c],
 [[int x[-1];
@@ -39,13 +36,15 @@ AT_DATA([b.c],
 ]])
 
 # First see if setting a locale is accepted at all.
-AT_CHECK([$CC $CPPFLAGS $CFLAGS -c b.c || exit 77], [], [stdout], [stderr])
+AT_CHECK([(lt_localize $CC $CPPFLAGS $CFLAGS -c b.c) || exit 77],
+[], [stdout], [stderr])
 
 # Find out about expected output.
-AT_CHECK([$CC $CPPFLAGS $CFLAGS -c a.c || exit 1], [1], [stdout], [stderr])
+AT_CHECK([(lt_localize $CC $CPPFLAGS $CFLAGS -c a.c) || exit 1],
+[1], [stdout], [stderr])
 LT_AT_NORMALIZE_COMPILER_OUTPUT([stdout], [expected-stdout])
 LT_AT_NORMALIZE_COMPILER_OUTPUT([stderr], [expected-stderr])
-AT_CHECK([$LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c a.c || 
exit 1],
+AT_CHECK([(lt_localize $LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS 
-c a.c) || exit 1],
 [1], [stdout], [stderr])
 LT_AT_NORMALIZE_COMPILER_OUTPUT([stdout], [libtool-stdout])
 LT_AT_NORMALIZE_COMPILER_OUTPUT([stderr], [libtool-stderr])
@@ -63,10 +62,12 @@ AT_CHECK([diff expected-stderr libtool-stderr])
 AT_CHECK([diff expected-stdout libtool-stdout])
 
 # check that we get our quoting right.
-LANGUAGE='a; nosuchprogram " '\''  & $x /#+*(){}|,:`\ !%'
-export LANGUAGE
-AT_CHECK([$LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c b.c],
+m4_define([lt_localize],
+[[LANGUAGE='a; nosuchprogram " '\''  & $x /#+*(){}|,:`\ !%']])
+AT_CHECK([(lt_localize $LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS 
-c b.c)],
 [0], [stdout], [stderr])
 AT_CHECK([grep nosuchprogram stdout stderr], [1])
 
+m4_popdef([lt_localize])
+
 AT_CLEANUP



Re: [PATCH 1/6] Add --gnulib-version and --news options to announce-gen.

2010-09-01 Thread Ralf Wildenhues
Hello Gary,

* Gary V. Vaughan wrote on Wed, Sep 01, 2010 at 09:49:01PM CEST:
> Well, libltdl also works well enough.

No, it doesn't.

> I'm a good way into a complete
> rewrite... are you saying that you'd rather put up with the limitations
> of the current libltdl architecture than move to a cleaner and (IMHO)
> more maintainable implementation that will no doubt give up several
> months of new bugs to shake out?

There are few bugs to shake out if and when testsuite exposure is
pervasive, and testing on several system proves functioning.
Problem solved.  And sure, if your patches add that testsuite coverage,
then it will be my pleasure to approve them through ASAP.

I'm following this approach in Automake now, and I think Libtool really
should do this too: try to expose every code path that is added to the
test suite.  Yes, every single code path, including error paths.

Cheers,
Ralf



tests: avoid spurious pic_flag test failure on HP-UX 10.20.

2010-09-01 Thread Ralf Wildenhues
http://autobuild.josefsson.org/libtool/log-201008291316745734000.txt

| 113. pic_flag.at:24: testing override pic_flag at configure time ...
| ../../libtool/tests/pic_flag.at:36: $CC $CPPFLAGS $CFLAGS $C_pic_flag -c 
foo.c || exit 77
| stderr:
| cc: warning 422: Unknown option "f" ignored.
| cc: warning 422: Unknown option "i" ignored.
| stdout:
| ../../libtool/tests/pic_flag.at:39: grep fpic stdout stderr && exit 77

So, let's please this compiler, too.  Pushed.

Cheers,
Ralf

tests: avoid spurious pic_flag test failure on HP-UX 10.20.

* tests/pic_flag.at (override pic_flag at configure time):
Match HP-UX 10.20 cc warning about unknown options, to skip
the test.

diff --git a/tests/pic_flag.at b/tests/pic_flag.at
index ffad842..fb39f7f 100644
--- a/tests/pic_flag.at
+++ b/tests/pic_flag.at
@@ -37,6 +37,7 @@ AT_CHECK([$CC $CPPFLAGS $CFLAGS $C_pic_flag -c foo.c || exit 
77],
 [], [stdout], [stderr])
 # The configure test for the PIC flag also checks for warnings.
 AT_CHECK([grep fpic stdout stderr && exit 77], [1])
+AT_CHECK([[grep '[uU]nknown.*option' stdout stderr && exit 77]], [1])
 
 CXX_pic_flag='-fpic -DPIC'
 if $CXX $CPPFLAGS $CXXFLAGS $CXX_pic_flag -c foo.cpp; then :; else



[PATCH 0/7] Support for toolchains that are not $host-native.

2010-09-01 Thread Peter Rosin
Hi!

I was going to hold off this until after I had run the testsuite one more
time with the latest fixes, but the recent message from Gary made me post
right away. By the Lay of Murphy, I'm sure I'll regret it...

This series is a rebased and updated version of the patches posted in
http://lists.gnu.org/archive/html/libtool-patches/2010-08/msg00222.html

I have reason to believe that these patches will make the testsuite
results cleaner for MinGW (gcc) on MSYS, MSVC on MSYS, MSVC on Cygwin
and have no impact on gcc on Cygwin.

I will post details in a day of so when the testsuite has finished
running...

Cheers,
Peter



[PATCH 1/7] Add file name conversion from $build to toolchain.

2010-09-01 Thread Peter Rosin

>From 0c11bb2ae0f51acecddc97ad84a18f556d7a5f20 Mon Sep 17 00:00:00 2001
From: Peter Rosin 
Date: Tue, 31 Aug 2010 12:17:10 +0200
Subject: [PATCH 1/7] Add file name conversion from $build to toolchain.

* configure.ac: Ensure to_tool_file_cmd is available to Makefile.
* libltdl/m4/libtool.m4 (_LT_PATH_CONVERSION_FUNCTIONS): Add
cache variable lt_cv_to_tool_file_cmd that describes how to
convert file names from $build to toolchain format.
* libltdl/config/ltmain.m4sh (func_to_tool_file): New function
that utilizes the above.
* Makefile.am: Ensure to_tool_file_cmd is included in
TEST_ENVIRONMENT so that it is passed to (old testsuite) tests.
* testsuite.at: Ensure to_tool_file_cmd is passed as a variable
setting on the configure line for (new testsuite) tests.

Signed-off-by: Peter Rosin 
---
 ChangeLog  |   14 ++
 Makefile.am|3 ++-
 configure.ac   |1 +
 libltdl/config/ltmain.m4sh |   14 ++
 libltdl/m4/libtool.m4  |   20 +++-
 tests/testsuite.at |5 -
 6 files changed, 54 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 230981e..cc30469 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2010-08-25  Peter Rosin  
+
+   Add file name conversion from $build to toolchain.
+   * configure.ac: Ensure to_tool_file_cmd is available to Makefile.
+   * libltdl/m4/libtool.m4 (_LT_PATH_CONVERSION_FUNCTIONS): Add
+   cache variable lt_cv_to_tool_file_cmd that describes how to
+   convert file names from $build to toolchain format.
+   * libltdl/config/ltmain.m4sh (func_to_tool_file): New function
+   that utilizes the above.
+   * Makefile.am: Ensure to_tool_file_cmd is included in
+   TEST_ENVIRONMENT so that it is passed to (old testsuite) tests.
+   * testsuite.at: Ensure to_tool_file_cmd is passed as a variable
+   setting on the configure line for (new testsuite) tests.
+
 2010-09-01  Ralf Wildenhues  
 
Avoid leaking make flags into testsuite results.
diff --git a/Makefile.am b/Makefile.am
index 48fbf73..dcd0876 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -518,7 +518,8 @@ TESTS_ENVIRONMENT = MAKE="$(MAKE)" CC="$(CC)" 
CFLAGS="$(CFLAGS)" \
F77="$(F77)" FFLAGS="$(FFLAGS)" \
FC="$(FC)" FCFLAGS="$(FCFLAGS)" \
GCJ="$(GCJ)" GCJFLAGS="$(GCJFLAGS)" \
-   lt_cv_to_host_file_cmd="$(to_host_file_cmd)"
+   lt_cv_to_host_file_cmd="$(to_host_file_cmd)" \
+   lt_cv_to_tool_file_cmd="$(to_tool_file_cmd)"
 
 BUILDCHECK_ENVIRONMENT = _lt_pkgdatadir="$(abs_top_srcdir)" \
LIBTOOLIZE="$(abs_top_builddir)/libtoolize" \
diff --git a/configure.ac b/configure.ac
index aaa946f..d36adde 100644
--- a/configure.ac
+++ b/configure.ac
@@ -203,6 +203,7 @@ LT_LANG(Windows Resource)
 # Ensure the correct file name (and path) conversion function
 # is available to the test suite.
 AC_SUBST([to_host_file_cmd])dnl
+AC_SUBST([to_tool_file_cmd])dnl
 
 ## --- ##
 ## Work out which tests to run ##
diff --git a/libltdl/config/ltmain.m4sh b/libltdl/config/ltmain.m4sh
index c31f788..32f396d 100644
--- a/libltdl/config/ltmain.m4sh
+++ b/libltdl/config/ltmain.m4sh
@@ -873,6 +873,20 @@ func_to_host_file ()
 # end func_to_host_file
 
 
+# func_to_tool_file ARG
+# converts the file name ARG from $build format to toolchain format. Return
+# result in func_to_tool_file_result.
+func_to_tool_file ()
+{
+  $opt_debug
+# lt_func_to_host_file_result=$func_to_host_file_result
+  $to_tool_file_cmd "$1"
+  func_to_tool_file_result=$func_to_host_file_result
+# func_to_host_file_result=$lt_func_to_host_file_result
+}
+# end func_to_tool_file
+
+
 # func_convert_file_noop ARG
 # Copy ARG to func_to_host_file_result.
 func_convert_file_noop ()
diff --git a/libltdl/m4/libtool.m4 b/libltdl/m4/libtool.m4
index 666130d..bb1a213 100644
--- a/libltdl/m4/libtool.m4
+++ b/libltdl/m4/libtool.m4
@@ -7718,5 +7718,23 @@ to_host_file_cmd=$lt_cv_to_host_file_cmd
 AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
 _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
  [0], [convert $build file names to $host format])dnl
-])# _LT_PATH_CONVERSION_FUNCTIONS
 
+AC_MSG_CHECKING([how to convert $build file names to toolchain format])
+AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
+[#assume ordinary cross tools, or native build.
+lt_cv_to_tool_file_cmd=func_convert_file_noop
+case $host in
+  *mingw* )
+case $build in
+  *mingw* ) # actually msys
+lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
+;;
+esac
+;;
+esac
+])
+to_tool_file_cmd=$lt_cv_to_tool_file_cmd
+AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
+_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
+ [0], [convert $build files to toolchain format])dnl
+])# _LT_PATH_CONVERSION_FUNCTIONS
diff --git a/tests/testsuite.at b/tests/testsuite.at
index c646c5d..ea13ec9 100644
--- a/tests/testsuite.at
+++ b/tests/testsuite.at
@@ -37,7 +37,7 @@ for tool in A

[PATCH 2/7] Convert file names to toolchain format when linking.

2010-09-01 Thread Peter Rosin

>From 6d6f0d24c51c7b4902452a312c5a377dae65d85a Mon Sep 17 00:00:00 2001
From: Peter Rosin 
Date: Sun, 29 Aug 2010 13:31:47 +0200
Subject: [PATCH 2/7] Convert file names to toolchain format when linking.

* libltdl/config/ltmain.m4sh (func_mode_link): When exporting
symbols and when linking using command files (or response
files), make sure that both the name of the command file and
the content are made up of file names in a format appropriate
for the tool. Fixes problems in stresstest.at on MSYS when run
with low command line length.

Signed-off-by: Peter Rosin 
---
 ChangeLog  |   10 ++
 libltdl/config/ltmain.m4sh |   11 ---
 2 files changed, 18 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index cc30469..b0adaa0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
 2010-08-25  Peter Rosin  
 
+   Convert file names to toolchain format when linking.
+   * libltdl/config/ltmain.m4sh (func_mode_link): When exporting
+   symbols and when linking using command files (or response
+   files), make sure that both the name of the command file and
+   the content are made up of file names in a format appropriate
+   for the tool. Fixes problems in stresstest.at on MSYS when run
+   with low command line length.
+
+2010-08-25  Peter Rosin  
+
Add file name conversion from $build to toolchain.
* configure.ac: Ensure to_tool_file_cmd is available to Makefile.
* libltdl/m4/libtool.m4 (_LT_PATH_CONVERSION_FUNCTIONS): Add
diff --git a/libltdl/config/ltmain.m4sh b/libltdl/config/ltmain.m4sh
index 32f396d..417fbfc 100644
--- a/libltdl/config/ltmain.m4sh
+++ b/libltdl/config/ltmain.m4sh
@@ -7488,10 +7488,13 @@ EOF
echo 'INPUT (' > $output
for obj in $save_libobjs
do
- $ECHO "$obj" >> $output
+ func_to_tool_file "$obj"
+ $ECHO "$func_to_tool_file_result" >> $output
done
echo ')' >> $output
func_append delfiles " $output"
+   func_to_tool_file "$output"
+   output=$func_to_tool_file_result
  elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && 
test "X$file_list_spec" != X; then
output=${output_objdir}/${output_la}.lnk
func_verbose "creating linker input file list: $output"
@@ -7505,10 +7508,12 @@ EOF
fi
for obj
do
- $ECHO "$obj" >> $output
+ func_to_tool_file "$obj"
+ $ECHO "$func_to_tool_file_result" >> $output
done
func_append delfiles " $output"
-   output=$firstobj\"$file_list_spec$output\"
+   func_to_tool_file "$output"
+   output=$firstobj\"$file_list_spec$func_to_tool_file_result\"
  else
if test -n "$save_libobjs"; then
  func_verbose "creating reloadable object files..."
-- 
1.7.1



[PATCH 3/7] Convert file names to toolchain format in $NM and $AR @files.

2010-09-01 Thread Peter Rosin
>From c8a113b5db03bcc9b034019a749b8de0b75bfcf7 Mon Sep 17 00:00:00 2001
From: Peter Rosin 
Date: Sun, 29 Aug 2010 13:55:16 +0200
Subject: [PATCH 3/7] Convert file names to toolchain format in $NM and $AR 
@files.

* libltdl/config/ltmain.m4sh (func_mode_link): When listing
symbols and when creating archives using command files (or
response files), make sure that both the name of the command
file and the content are made up of file names in a format
appropriate for the tool. Fixes stresstest.at on MSYS when
run with low command line length.

Signed-off-by: Peter Rosin 
---
 ChangeLog  |   10 ++
 libltdl/config/ltmain.m4sh |   12 
 2 files changed, 18 insertions(+), 4 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index b0adaa0..4e78b98 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
 2010-08-25  Peter Rosin  
 
+   Convert file names to toolchain format in $NM and $AR @files.
+   * libltdl/config/ltmain.m4sh (func_mode_link): When listing
+   symbols and when creating archives using command files (or
+   response files), make sure that both the name of the command
+   file and the content are made up of file names in a format
+   appropriate for the tool. Fixes stresstest.at on MSYS when
+   run with low command line length.
+
+2010-08-25  Peter Rosin  
+
Convert file names to toolchain format when linking.
* libltdl/config/ltmain.m4sh (func_mode_link): When exporting
symbols and when linking using command files (or response
diff --git a/libltdl/config/ltmain.m4sh b/libltdl/config/ltmain.m4sh
index 417fbfc..aa4b479 100644
--- a/libltdl/config/ltmain.m4sh
+++ b/libltdl/config/ltmain.m4sh
@@ -7339,11 +7339,13 @@ EOF
save_libobjs=$libobjs
save_output=$output
output=${output_objdir}/${output_la}.nm
-   libobjs=$nm_file_list_spec$output
+   func_to_tool_file "$output"
+   libobjs=$nm_file_list_spec$func_to_tool_file_result
func_append delfiles " $output"
func_verbose "creating $NM input file list: $output"
for obj in $save_libobjs; do
- $ECHO "$obj"
+ func_to_tool_file "$obj"
+ $ECHO "$func_to_tool_file_result"
done > "$output"
eval cmd=\"$cmd1\"
func_show_eval "$cmd" 'exit $?'
@@ -8325,9 +8327,11 @@ EOF
  func_verbose "using command file archive linking..."
  for obj in $oldobjs
  do
-   $ECHO "$obj"
+   func_to_tool_file "$obj"
+   $ECHO "$func_to_tool_file_result"
  done > $output_objdir/$libname.libcmd
- oldobjs=" $archiver_list_spec$output_objdir/$libname.libcmd"
+ func_to_tool_file "$output_objdir/$libname.libcmd"
+ oldobjs=" $archiver_list_spec$func_to_tool_file_result"
  cmds=$old_archive_cmds
else
  # the command line is too long to link in one step, link in parts
-- 
1.7.1



[PATCH 4/7] Use func_to_tool_file instead of fix_srcfile_path.

2010-09-01 Thread Peter Rosin
>From 16232cc7ddfc4bab981a2fa2d87757c68832b32e Mon Sep 17 00:00:00 2001
From: Peter Rosin 
Date: Sun, 29 Aug 2010 18:26:16 +0200
Subject: [PATCH 4/7] Use func_to_tool_file instead of fix_srcfile_path.

* libltdl/config/ltmain.m4sh (func_mode_compile): Replace the
fix_srcfile_path hook with a call to func_to_tool_file.
* libltdl/m4/libtool.m4 (_LT_LINKER_SHLIBS) [cygwin,mingw,pw32]
[cegcc]: Drop fix_srcfile_path.

Signed-off-by: Peter Rosin 
---
 ChangeLog  |8 
 libltdl/config/ltmain.m4sh |5 ++---
 libltdl/m4/libtool.m4  |3 ---
 3 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 4e78b98..43e4043 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2010-08-25  Peter Rosin  
 
+   Use func_to_tool_file instead of fix_srcfile_path.
+   * libltdl/config/ltmain.m4sh (func_mode_compile): Replace the
+   fix_srcfile_path hook with a call to func_to_tool_file.
+   * libltdl/m4/libtool.m4 (_LT_LINKER_SHLIBS) [cygwin,mingw,pw32]
+   [cegcc]: Drop fix_srcfile_path.
+
+2010-08-25  Peter Rosin  
+
Convert file names to toolchain format in $NM and $AR @files.
* libltdl/config/ltmain.m4sh (func_mode_link): When listing
symbols and when creating archives using command files (or
diff --git a/libltdl/config/ltmain.m4sh b/libltdl/config/ltmain.m4sh
index aa4b479..1a49977 100644
--- a/libltdl/config/ltmain.m4sh
+++ b/libltdl/config/ltmain.m4sh
@@ -1378,9 +1378,8 @@ compiler."
 func_append removelist " $lockfile"
 trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15
 
-if test -n "$fix_srcfile_path"; then
-  eval srcfile=\"$fix_srcfile_path\"
-fi
+func_to_tool_file "$srcfile"
+srcfile=$func_to_tool_file_result
 func_quote_for_eval "$srcfile"
 qsrcfile=$func_quote_for_eval_result
 
diff --git a/libltdl/m4/libtool.m4 b/libltdl/m4/libtool.m4
index bb1a213..f985a5f 100644
--- a/libltdl/m4/libtool.m4
+++ b/libltdl/m4/libtool.m4
@@ -5036,7 +5036,6 @@ _LT_EOF
_LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
# FIXME: Should let the user specify the lib program.
_LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
-   _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
;;
   esac
@@ -5571,8 +5570,6 @@ _LT_TAGDECL([], [inherit_rpath], [0],
 to runtime path list])
 _LT_TAGDECL([], [link_all_deplibs], [0],
 [Whether libtool must link a program against all its dependency libraries])
-_LT_TAGDECL([], [fix_srcfile_path], [1],
-[Fix the shell variable $srcfile for the compiler])
 _LT_TAGDECL([], [always_export_symbols], [0],
 [Set to "yes" if exported symbols are required])
 _LT_TAGDECL([], [export_symbols_cmds], [2],
-- 
1.7.1



[PATCH 7/7] Prefer $NM @file over calculating the cmd line length.

2010-09-01 Thread Peter Rosin
>From 3181ad6033fd6798ee49b91c66b0e1c7eee6a98c Mon Sep 17 00:00:00 2001
From: Peter Rosin 
Date: Wed, 1 Sep 2010 22:13:12 +0200
Subject: [PATCH 7/7] Prefer $NM @file over calculating the cmd line length.

* libltdl/config/ltmain.m4sh (func_mode_link): Avoid calculating
the cammand line length if the name lister has @file support and
always use the @file branch. This works around the fact that all
objects and archives still need to be transformed to toolchain
format for toolchains that does not support @file. At least for
toolchains that have @file support...

Signed-off-by: Peter Rosin 
---
 ChangeLog  |   10 ++
 libltdl/config/ltmain.m4sh |   28 +++-
 2 files changed, 25 insertions(+), 13 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 06d2e76..2841f0f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
 2010-09-01  Peter Rosin  
 
+   Prefer $NM @file over calculating the cmd line length.
+   * libltdl/config/ltmain.m4sh (func_mode_link): Avoid calculating
+   the cammand line length if the name lister has @file support and
+   always use the @file branch. This works around the fact that all
+   objects and archives still need to be transformed to toolchain
+   format for toolchains that does not support @file. At least for
+   toolchains that have @file support...
+
+2010-09-01  Peter Rosin  
+
Convert file name to toolchain format when invoking $NM.
* libltdl/config/ltmain.m4sh (func_generate_dlsyms)
(func_win32_libid, func_cygming_gnu_implib_p)
diff --git a/libltdl/config/ltmain.m4sh b/libltdl/config/ltmain.m4sh
index f75f6af..ef42f1e 100644
--- a/libltdl/config/ltmain.m4sh
+++ b/libltdl/config/ltmain.m4sh
@@ -7333,13 +7333,7 @@ EOF
save_ifs="$IFS"; IFS='~'
for cmd1 in $cmds; do
  IFS="$save_ifs"
- eval cmd=\"$cmd1\"
- func_len " $cmd"
- len=$func_len_result
- if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; 
then
-   func_show_eval "$cmd" 'exit $?'
-   skipped_export=false
- elif test -n "$nm_file_list_spec"; then
+ if test -n "$nm_file_list_spec"; then
func_basename "$output"
output_la=$func_basename_result
save_libobjs=$libobjs
@@ -7359,12 +7353,20 @@ EOF
libobjs=$save_libobjs
skipped_export=false
  else
-   # The command line is too long to execute in one step.
-   func_verbose "using reloadable object file for export list..."
-   skipped_export=:
-   # Break out early, otherwise skipped_export may be
-   # set to false by a later but shorter cmd.
-   break
+   eval cmd=\"$cmd1\"
+   func_len " $cmd"
+   len=$func_len_result
+   if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le 
-1; then
+ func_show_eval "$cmd" 'exit $?'
+ skipped_export=false
+   else
+ # The command line is too long to execute in one step.
+ func_verbose "using reloadable object file for export list..."
+ skipped_export=:
+ # Break out early, otherwise skipped_export may be
+ # set to false by a later but shorter cmd.
+ break
+   fi
  fi
done
IFS="$save_ifs"
-- 
1.7.1



[PATCH 6/7] Convert file name to toolchain format when invoking $NM.

2010-09-01 Thread Peter Rosin
>From acf4b65fb20f86e0757f13a0dce11c1fb27411d3 Mon Sep 17 00:00:00 2001
From: Peter Rosin 
Date: Wed, 1 Sep 2010 22:03:23 +0200
Subject: [PATCH 6/7] Convert file name to toolchain format when invoking $NM.

* libltdl/config/ltmain.m4sh (func_generate_dlsyms)
(func_win32_libid, func_cygming_gnu_implib_p)
(func_cygming_ms_implib_p): When using the name lister to find
symbols in files, convert the file names to a format appropriate
for the tool.

Signed-off-by: Peter Rosin 
---
 ChangeLog  |9 +
 libltdl/config/ltmain.m4sh |   23 +++
 2 files changed, 24 insertions(+), 8 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index d086d9a..06d2e76 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2010-09-01  Peter Rosin  
+
+   Convert file name to toolchain format when invoking $NM.
+   * libltdl/config/ltmain.m4sh (func_generate_dlsyms)
+   (func_win32_libid, func_cygming_gnu_implib_p)
+   (func_cygming_ms_implib_p): When using the name lister to find
+   symbols in files, convert the file names to a format appropriate
+   for the tool.
+
 2010-08-25  Peter Rosin  
 
Convert POSIX file names to toolchain format for MSVC
diff --git a/libltdl/config/ltmain.m4sh b/libltdl/config/ltmain.m4sh
index 1a49977..f75f6af 100644
--- a/libltdl/config/ltmain.m4sh
+++ b/libltdl/config/ltmain.m4sh
@@ -2499,8 +2499,9 @@ extern \"C\" {
  # Add our own program objects to the symbol list.
  progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP`
  for progfile in $progfiles; do
-   func_verbose "extracting global C symbols from \`$progfile'"
-   $opt_dry_run || eval "$NM $progfile | $global_symbol_pipe >> 
'$nlist'"
+   func_to_tool_file "$progfile"
+   func_verbose "extracting global C symbols from 
\`$func_to_tool_file_result'"
+   $opt_dry_run || eval "$NM $func_to_tool_file_result | 
$global_symbol_pipe >> '$nlist'"
  done
 
  if test -n "$exclude_expsyms"; then
@@ -2575,20 +2576,23 @@ extern \"C\" {
func_warning "Could not compute DLL name from $name"
eval '$ECHO ": $name " >> "$nlist"'
  fi
- eval "$NM $dlprefile 2>/dev/null | $global_symbol_pipe |
+ func_to_tool_file "$dlprefile"
+ eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | 
$global_symbol_pipe |
$SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> 
'$nlist'"
}
  else # not an import lib
$opt_dry_run || {
  eval '$ECHO ": $name " >> "$nlist"'
- eval "$NM $dlprefile 2>/dev/null | $global_symbol_pipe >> 
'$nlist'"
+ func_to_tool_file "$dlprefile"
+ eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | 
$global_symbol_pipe >> '$nlist'"
}
  fi
;;
*)
  $opt_dry_run || {
eval '$ECHO ": $name " >> "$nlist"'
-   eval "$NM $dlprefile 2>/dev/null | $global_symbol_pipe >> 
'$nlist'"
+   func_to_tool_file "$dlprefile"
+   eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | 
$global_symbol_pipe >> '$nlist'"
  }
;;
   esac
@@ -2750,7 +2754,8 @@ func_win32_libid ()
 # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD.
 if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null |
$EGREP 'file format (pei*-i386(.*architecture: 
i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then
-  win32_nmres=`eval $NM -f posix -A $1 |
+  func_to_tool_file "$1"
+  win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" |
$SED -n -e '
1,100{
/ I /{
@@ -2862,7 +2867,8 @@ func_cygming_dll_for_implib_fallback_core ()
 func_cygming_gnu_implib_p ()
 {
   $opt_debug
-  func_cygming_gnu_implib_tmp=`$NM $1 | eval "$global_symbol_pipe" | $EGREP ' 
(_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'`
+  func_to_tool_file "$1"
+  func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval 
"$global_symbol_pipe" | $EGREP ' 
(_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'`
   test -n "$func_cygming_gnu_implib_tmp"
 }
 
@@ -2873,7 +2879,8 @@ func_cygming_gnu_implib_p ()
 func_cygming_ms_implib_p ()
 {
   $opt_debug
-  func_cygming_ms_implib_tmp=`$NM $1 | eval "$global_symbol_pipe" | $GREP 
'_NULL_IMPORT_DESCRIPTOR'`
+  func_to_tool_file "$1"
+  func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval 
"$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'`
   test -n "$func_cygming_ms_implib_tmp"
 }
 
-- 
1.7.1



[PATCH 5/7] Convert POSIX file names to toolchain format for MSVC

2010-09-01 Thread Peter Rosin
>From f3aeb980aded1f4b71198316cd2a57b7b166ef79 Mon Sep 17 00:00:00 2001
From: Peter Rosin 
Date: Wed, 1 Sep 2010 21:23:03 +0200
Subject: [PATCH 5/7] Convert POSIX file names to toolchain format for MSVC

* libltdl/m4/libtool.m4 (_LT_LINKER_SHLIBS, _LT_LANG_CXX_CONFIG)
[mingw] : Make sure the -outputresource: file name for the
manifest tool is in Win32 format. Same for the MSVC command file
containing the exports.

Signed-off-by: Peter Rosin 
---
 ChangeLog |8 
 libltdl/m4/libtool.m4 |   12 
 2 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 43e4043..d086d9a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2010-08-25  Peter Rosin  
 
+   Convert POSIX file names to toolchain format for MSVC
+   * libltdl/m4/libtool.m4 (_LT_LINKER_SHLIBS, _LT_LANG_CXX_CONFIG)
+   [mingw] : Make sure the -outputresource: file name for the
+   manifest tool is in Win32 format. Same for the MSVC command file
+   containing the exports.
+
+2010-08-25  Peter Rosin  
+
Use func_to_tool_file instead of fix_srcfile_path.
* libltdl/config/ltmain.m4sh (func_mode_compile): Replace the
fix_srcfile_path hook with a call to func_to_tool_file.
diff --git a/libltdl/m4/libtool.m4 b/libltdl/m4/libtool.m4
index f985a5f..81b87d4 100644
--- a/libltdl/m4/libtool.m4
+++ b/libltdl/m4/libtool.m4
@@ -5004,7 +5004,8 @@ _LT_EOF
  else
sed -e 's/\\\(.*\\\)/-link\\\ -EXPORT:\\\1/' < 
$export_symbols > $output_objdir/$soname.exp;
  fi~
- $CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs 
@$output_objdir/$soname.exp -Wl,-DLL~
+ func_to_tool_file "$output_objdir/$soname.exp"~
+ $CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs 
"@$func_to_tool_file_result" -Wl,-DLL~
  linknames='
# The linker will not automatically build a static lib if we build a 
DLL.
# _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
@@ -5017,8 +5018,9 @@ _LT_EOF
*.exe|*.EXE) ;;
*) lt_outputfile="$lt_outputfile.exe" ;;
  esac~
+ func_to_tool_file "$lt_outputfile"~
  if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; 
then
-   $MANIFEST_TOOL -manifest "$lt_outputfile.manifest" 
-outputresource:"$lt_outputfile" || exit 1;
+   $MANIFEST_TOOL -manifest "$func_to_tool_file_result.manifest" 
-outputresource:"$func_to_tool_file_result" || exit 1;
$RM "$lt_outputfile.manifest";
  fi'
;;
@@ -5999,7 +6001,8 @@ if test "$_lt_caught_CXX_error" != yes; then
else
  $SED -e 's/\\\(.*\\\)/-link\\\ -EXPORT:\\\1/' < 
$export_symbols > $output_objdir/$soname.exp;
fi~
-   $CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs 
@$output_objdir/$soname.exp -Wl,-DLL~
+   func_to_tool_file "$output_objdir/$soname.exp"~
+   $CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs 
"@$func_to_tool_file_result" -Wl,-DLL~
linknames='
  # The linker will not automatically build a static lib if we build a 
DLL.
  # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
@@ -6011,8 +6014,9 @@ if test "$_lt_caught_CXX_error" != yes; then
  *.exe|*.EXE) ;;
  *) lt_outputfile="$lt_outputfile.exe" ;;
esac~
+   func_to_tool_file "$lt_outputfile"~
if test "$MANIFEST_TOOL" != ":" && test -f 
"$lt_outputfile.manifest"; then
- $MANIFEST_TOOL -manifest "$lt_outputfile.manifest" 
-outputresource:"$lt_outputfile" || exit 1;
+ $MANIFEST_TOOL -manifest "$func_to_tool_file_result.manifest" 
-outputresource:"$func_to_tool_file_result" || exit 1;
  $RM "$lt_outputfile.manifest";
fi'
  ;;
-- 
1.7.1



Re: [PATCH 4/7] Use func_to_tool_file instead of fix_srcfile_path.

2010-09-01 Thread Ralf Wildenhues
* Peter Rosin wrote on Wed, Sep 01, 2010 at 10:33:59PM CEST:
> From 16232cc7ddfc4bab981a2fa2d87757c68832b32e Mon Sep 17 00:00:00 2001
> From: Peter Rosin 
> Date: Sun, 29 Aug 2010 18:26:16 +0200
> Subject: [PATCH 4/7] Use func_to_tool_file instead of fix_srcfile_path.
> 
> * libltdl/config/ltmain.m4sh (func_mode_compile): Replace the
> fix_srcfile_path hook with a call to func_to_tool_file.
> * libltdl/m4/libtool.m4 (_LT_LINKER_SHLIBS) [cygwin,mingw,pw32]
> [cegcc]: Drop fix_srcfile_path.

Please ask google codesearch whether fix_srcfile_path is used by third
party packages which expect it to be set inside the configure script.
In case of doubt, we should keep the setting of it for compat reasons.

The patch series is lacking libtool.texi updates.

The changes to archive_cmds that introduce func_to_tool_file will make
it impossible (right?) for users to use that command inside a configure
test.  I'm not sure whether that is a problem in practice -- we
recommend using LT_OUTPUT and then using ./libtool, but a quick
codesearch check shouldn't hurt.

1/7 has a superfluous commented-out line in ltmain.

I haven't looked at the patch series in detail yet, but 1-6 look fairly
reasonable otherwise.  7 looks risky because of the logic around there;
also, the nm @file test isn't a real feature test.  Also, I just noticed
that nm_file_list_spec isn't always initialized properly.

Cheers,
Ralf



Re: [PATCH 4/7] Use func_to_tool_file instead of fix_srcfile_path.

2010-09-01 Thread Charles Wilson
On 9/1/2010 5:30 PM, Ralf Wildenhues wrote:
> * Peter Rosin wrote on Wed, Sep 01, 2010 at 10:33:59PM CEST:
>> * libltdl/config/ltmain.m4sh (func_mode_compile): Replace the
>> fix_srcfile_path hook with a call to func_to_tool_file.
>> * libltdl/m4/libtool.m4 (_LT_LINKER_SHLIBS) [cygwin,mingw,pw32]
>> [cegcc]: Drop fix_srcfile_path.
>
> The patch series is lacking libtool.texi updates.

Well, I assume Peter will get the same leniency I did, to provide
documentation at a later date, provided "later" is "pretty soon"?

I imagine he'd want to wait until after my new docu is committed first,
so he can extend some of the new sections as appropriate.  That should
happen later today.

--
Chuck




Re: [PATCH 1/7] Add file name conversion from $build to toolchain.

2010-09-01 Thread Charles Wilson
On 9/1/2010 4:32 PM, Peter Rosin wrote:
> +AC_MSG_CHECKING([how to convert $build file names to toolchain format])
> +AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
> +[#assume ordinary cross tools, or native build.
> +lt_cv_to_tool_file_cmd=func_convert_file_noop
> +case $host in
> +  *mingw* )
> +case $build in
> +  *mingw* ) # actually msys
> +lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
> +;;
> +esac
> +;;
> +esac

Repeating Ralf's commentary to me, if you're using "$host" then you
should use *-*-mingw*; if you want to use mingw* in the various match
patterns then you should use "$host_os".

--
Chuck





Re: [PATCH 4/7] Use func_to_tool_file instead of fix_srcfile_path.

2010-09-01 Thread Ralf Wildenhues
* Charles Wilson wrote on Wed, Sep 01, 2010 at 11:39:07PM CEST:
> On 9/1/2010 5:30 PM, Ralf Wildenhues wrote:
> > * Peter Rosin wrote on Wed, Sep 01, 2010 at 10:33:59PM CEST:
> >> * libltdl/config/ltmain.m4sh (func_mode_compile): Replace the
> >> fix_srcfile_path hook with a call to func_to_tool_file.
> >> * libltdl/m4/libtool.m4 (_LT_LINKER_SHLIBS) [cygwin,mingw,pw32]
> >> [cegcc]: Drop fix_srcfile_path.
> >
> > The patch series is lacking libtool.texi updates.
> 
> Well, I assume Peter will get the same leniency I did, to provide
> documentation at a later date, provided "later" is "pretty soon"?

I meant the five-line or so documentation of each libtool variable,
like fix_srcfile_path.  I think updating that should be done in sync
with the actual code.  Sorry for being unclear.

> I imagine he'd want to wait until after my new docu is committed first,
> so he can extend some of the new sections as appropriate.  That should
> happen later today.

That's all fine.

Thanks,
Ralf



Re: [PATCH] Path conversion documentation

2010-09-01 Thread Charles Wilson
On 8/30/2010 4:20 PM, Ralf Wildenhues wrote:
> * Charles Wilson wrote on Mon, Aug 30, 2010 at 09:45:00PM CEST:
>> Thanks for the review.
> 
> My pleasure.

Pushed as attached.

'Course, I notice that I screwed up the date in the ChangeLog.  Could
the next person to commit a change to that file, please fix it?

-2010-09-31 ...
+2010-09-01 ...

--
Chuck
diff --git a/ChangeLog b/ChangeLog
index 63d4b74..44d0f47 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2010-09-31  Charles Wilson  <...>
+
+	Path conversion documentation
+	* doc/libtool.texi (Platform quirks): Add new subsections
+	'Cross compiling' and 'File name conversion'.
+
 2010-09-01  Ralf Wildenhues  
 
 	tests: avoid spurious pic_flag test failure on HP-UX 10.20.
diff --git a/doc/libtool.texi b/doc/libtool.texi
index a3f1c59..573536e 100644
--- a/doc/libtool.texi
+++ b/doc/libtool.texi
@@ -223,6 +223,8 @@ Platform quirks
 * Reloadable objects::  Binding object files together.
 * Multiple dependencies::   Removing duplicate dependent libraries.
 * Archivers::   Programs that create static archives.
+* Cross compiling:: Issues that arise when cross compiling.
+* File name conversion::Converting file names between platforms.
 
 @end detailmenu
 @end menu
@@ -5750,6 +5752,8 @@ write your own.
 * Reloadable objects::  Binding object files together.
 * Multiple dependencies::   Removing duplicate dependent libraries.
 * Archivers::   Programs that create static archives.
+* Cross compiling:: Issues that arise when cross compiling.
+* File name conversion::Converting file names between platforms.
 @end menu
 
 @node References
@@ -5875,6 +5879,420 @@ must be used to ``bless'' the created library before linking against it,
 with the @kbd{ranlib lib@var{name}.a} command.  Some systems, like Irix,
 use the @code{ar ts} command, instead.
 
+@node Cross compiling
+@subsection Cross compiling
+@cindex cross compile
+
+Most build systems support the ability to compile libraries and applications
+on one platform for use on a different platform, provided a compiler capable
+of generating the appropriate output is available.  In such cross compiling
+scenarios, the platform on which the libraries or applications are compiled
+is called the @dfn{build platform}, while the platform on which the libraries
+or applications are intended to be used or executed is called the
+@dfn{host platform}.
+@ref{GNU Build System,, The GNU Build System, automake, The Automake Manual},
+of which libtool is a part, supports cross compiling via arguments passed to
+the configure script: @option{--build=...} and @option{--host=...}. However,
+when the build platform and host platform are very different, libtool is
+required to make certain accommodations to support these scenarios.
+
+In most cases, because the build platform and host platform differ, the
+cross-compiled libraries and executables can't be executed or tested on the
+build platform where they were compiled.  The testsuites of most build systems
+will often skip any tests that involve executing such foreign executables when
+cross-compiling.  However, if the build platform and host platform are
+sufficiently similar, it is often possible to run cross-compiled applications.
+Libtool's own testsuite often attempts to execute cross-compiled tests, but
+will mark any failures as @emph{skipped} since the failure might simply be due
+to the differences between the two platforms.
+
+In addition to cases where the host platform and build platform are extremely
+similar (e.g. @samp{i586-pc-linux-gnu} and @samp{i686-pc-linux-gnu}), there is
+another case in which cross-compiled host applications may be executed on the
+build platform.  This is possible when the build platform supports an emulation
+or API-enhanced environment for the host platform.  One example of this
+situation would be if the build platform were MinGW, and the host platform were
+Cygwin (or vice versa).  Both of these platforms can actually operate within a
+single Windows instance, so Cygwin applications can be launched from a MinGW
+context, and vice versa---provided certain care is taken.  Another example
+would be if the build platform were GNU/Linux on an x86 32bit processor, and
+the host platform were MinGW.  In this situation, the
+@uref{http://www.winehq.org/, Wine} environment can be used to launch Windows
+applications from the GNU/Linux operating system; again, provided certain care
+is taken.
+
+One particular issue occurs when a Windows platform such as MinGW, Cygwin, or
+MSYS is the host or build platform, while the other platform is a Unix-style
+system.  In these cases, there are often conflicts between the format of the
+file names and paths expected within host platform libraries and executables,
+and those employed on the build platform.
+
+This situation is best described using a concrete example: suppose the build
+platform is GNU/Linux