]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
Prefer $NM @file when the toolchain isn't native to $build.
authorPeter Rosin <peda@lysator.liu.se>
Mon, 13 Sep 2010 07:48:57 +0000 (09:48 +0200)
committerPeter Rosin <peda@lysator.liu.se>
Thu, 16 Sep 2010 18:00:10 +0000 (20:00 +0200)
* libltdl/config/ltmain.m4sh (func_mode_link): Avoid calculating
the command line length and take the @file branch *if* the file
names needs to be converted for the toolchain and the @file
branch works.  Fixes problems in stresstest.at when doing a cross
from Cygwin to MinGW using MinGW native tools (a.k.a. a "faked"
cross), and for the specific case of MSVC on Cygwin it makes the
test pass.

Signed-off-by: Peter Rosin <peda@lysator.liu.se>
ChangeLog
libltdl/config/ltmain.m4sh

index 543623f50128700dfcb5b6e0c9e2cbfe482af06b..1697a1b6d4fa07a65d10700c5c28e76a2e92764d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2010-09-13  Peter Rosin  <peda@lysator.liu.se>
+
+       Prefer $NM @file when the toolchain isn't native to $build.
+       * libltdl/config/ltmain.m4sh (func_mode_link): Avoid calculating
+       the command line length and take the @file branch *if* the file
+       names needs to be converted for the toolchain and the @file
+       branch works.  Fixes problems in stresstest.at when doing a cross
+       from Cygwin to MinGW using MinGW native tools (a.k.a. a "faked"
+       cross), and for the specific case of MSVC on Cygwin it makes the
+       test pass.
+
 2010-09-14  Eric Blake  <eblake@redhat.com>
 
        maint: ship .xz, not .lzma
index 6036f4f830dadd207aeef5573910d4273e56dcb7..18f0f3993dd6536832487ad888503ef996087634 100644 (file)
@@ -7349,10 +7349,23 @@ 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
+             # Take the normal branch if the nm_file_list_spec branch
+             # doesn't work or if tool conversion is not needed.
+             case $nm_file_list_spec~$to_tool_file_cmd in
+               *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*)
+                 try_normal_branch=yes
+                 eval cmd=\"$cmd1\"
+                 func_len " $cmd"
+                 len=$func_len_result
+                 ;;
+               *)
+                 try_normal_branch=no
+                 ;;
+             esac
+             if test $try_normal_branch = yes \
+                && { 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