>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