libtool-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [patch #6448] [MSVC 7/7] Add MSVC Support


From: Peter Rosin
Subject: Re: [patch #6448] [MSVC 7/7] Add MSVC Support
Date: Wed, 06 Aug 2008 18:04:05 +0200
User-agent: Thunderbird 2.0.0.16 (Windows/20080708)

Peter Rosin skrev:
Ralf Wildenhues skrev:

*snip*

Please try the patch below for simplistic at-file support with $NM.
While testing, I set nm_file_list_spec to '@' and always_export_symbols
to yes on GNU/Linux, and saw no test failure, probably because my nm
also understands '@'.  :-)
(IOW, we could enable that for when 'nm --help' lists @FILE.)

Probably the setting of nm_file_list_spec should be moved to where $NM
is set; not sure, as this is actually a Windows feature, not a $NM one.

I tried the patch and it fixes the old testsuite pdemo test, excellent!
But pdemo still fails due to an exported variable. Sigh. Why does each and
every damn test (well, almost) have to export a variable when that's listed
as not portable in the docs? Seems masochistic to me...

From my point of view, you may push the ltmain part of the patch. I'll test
any improved m4 code when you have settled on how to enable it. However,
your idea to check the help output will not work, dumpbin -? doesn't
indicate any support whatsoever for @.

Maybe hook into the existing
AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_...
and add
  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
    _LT_TAGVAR(nm_file_list_spec, $1)='@'
  fi
to the end of LT_PATH_NM?

But I don't know it's too early to use _LT_DECL/_LT_TAGVAR?

It works to have it in LT_PATH_NM, so that's where I'd put it. Like
the attached patch...

Also, I tested the patch on the new testsuite and with this patch
I get the desired behaviour in the cmdline_wrap.at test (73).

Cheers,
Peter

diff --git a/libltdl/config/ltmain.m4sh b/libltdl/config/ltmain.m4sh
index 35ae02f..29f7fba 100644
--- a/libltdl/config/ltmain.m4sh
+++ b/libltdl/config/ltmain.m4sh
@@ -6613,14 +6613,30 @@ EOF
            $opt_dry_run || $RM $export_symbols
            cmds=$export_symbols_cmds
            save_ifs="$IFS"; IFS='~'
-           for cmd in $cmds; do
+           for cmd1 in $cmds; do
              IFS="$save_ifs"
-             eval cmd=\"$cmd\"
+             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
+               output_la=`$ECHO "X$output" | $Xsed -e "$basename"`
+               save_libobjs=$libobjs
+               save_output=$output
+               output=${output_objdir}/${output_la}.nm
+               libobjs=$nm_file_list_spec$output
+               delfiles="$delfiles $output"
+               func_verbose "creating $NM input file list: $output"
+               for obj in $save_libobjs; do
+                 $ECHO "$obj"
+               done > "$output"
+               eval cmd=\"$cmd1\"
+               func_show_eval "$cmd" 'exit $?'
+               output=$save_output
+               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..."
diff --git a/libltdl/m4/libtool.m4 b/libltdl/m4/libtool.m4
index 37c0f71..10a8c95 100644
--- a/libltdl/m4/libtool.m4
+++ b/libltdl/m4/libtool.m4
@@ -3346,6 +3346,13 @@ AC_CACHE_CHECK([the name lister ($NM) interface], 
[lt_cv_nm_interface],
     lt_cv_nm_interface="MS dumpbin"
   fi
   rm -f conftest*])
+
+if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+  _LT_TAGVAR(nm_file_list_spec, $1)='@'
+fi
+
+_LT_DECL([], [nm_file_list_spec], [1],
+    [Specify filename containing input files for $NM])
 ])# LT_PATH_NM
 
 # Old names:

reply via email to

[Prev in Thread] Current Thread [Next in Thread]