[Top][All Lists]

[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: Gecko/20100512 Thunderbird/3.0.5


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:
/ $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -no-undefined -o -rpath /foo liba.lo
libtool: link: link -r -o .libs/ .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/'

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

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

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

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

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

Previous discussion:
(and following "Next by thread" links)

Ok to push?


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]