libtool-patches
[Top][All Lists]
Advanced

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

MSVC: Support for response files with $NM.


From: Peter Rosin
Subject: MSVC: Support for response files with $NM.
Date: Fri, 02 Jul 2010 14:45:47 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.10) Gecko/20100512 Thunderbird/3.0.5

Hi!

The MSVC linker can't do relinking (-r -o), and this patch avoids
a usage of that in libtool when it digs for symbols in large
numbers of object files. With the patch I get identical behavior
inside "Run tests with low max_cmd_len" as I do outside, without
the patch lots of stuff go belly-up with low max_cmd_len. I found
no regressions on neither cygwin/gcc nor debian/gcc (admittedly
both with "recent" binutils nm, supporting @FILE).

The failures without the patch are variations of this:
/cwrapper.at:91: $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -no-undefined -o 
liba.la -rpath /foo liba.lo
stderr:
stdout:
libtool: link: link -r -o .libs/liba.la-1.obj .libs/liba.obj
Microsoft (R) Incremental Linker Version 8.00.50727.762
Copyright (C) Microsoft Corporation.  All rights reserved.

LINK : warning LNK4044: unrecognized option '/r'; ignored
LINK : warning LNK4044: unrecognized option '/o'; ignored
LINK : fatal error LNK1181: cannot open input file '.libs/liba.la-1.obj'


The attached patch is basically:
Support for response files with $NM.
902120b3d9ff0e756b0598f06f5ac79164938d2b

plus the relevant part of:
Fix _LT_TAGVAR errors, hide error output.
6f9c4a15717a896a7da7904d433f0a8e1842bc04

augmented by:
Enable response file support for GNU nm; reorder.
1b36758e54020910c96877608e421ea16acd6ccc

and finished off with the relevant part of:
patch msvc-documentation.patch
06cfce005204bb8ca212aadab38b38c0202ea04e

Further, the ChangeLog change has been collapsed into one
entry and I have updated the code to use the new func_append
function.

Previous discussion:
http://lists.gnu.org/archive/html/libtool-patches/2008-08/msg00012.html
(and following "Next by thread" links)
http://lists.gnu.org/archive/html/libtool-patches/2008-08/msg00046.html

Ok to push?

Cheers,
Peter

2010-07-01  Ralf Wildenhues  <address@hidden>
            Peter Rosin  <address@hidden>

        Support for response files with $NM.
        * libltdl/m4/libtool.m4 (_LT_CMD_GLOBAL_SYMBOLS)
        <nm_file_list_spec>: New tag variable. Set it to '@' if input
        files can be passed to $NM in a file named with the '@' option.
        * libltdl/config/ltmain.m4sh (func_mode_link): When
        nm_file_list_spec is nonempty, use it to avoid skipped_export.
        * doc/libtool.texi (libtool script contents): Document
        new variable.


Attachment: nm-at-file.patch
Description: Source code patch


reply via email to

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