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: Sat, 09 Aug 2008 11:03:50 +0200
User-agent: Thunderbird 2.0.0.16 (Windows/20080708)

Ralf Wildenhues skrev:
Hi Peter,

* Peter Rosin wrote on Thu, Aug 07, 2008 at 10:10:29AM CEST:
The previous patch was not enough, program linking happened in more than
one place. Here's a new patch that fixes that and also adds the
postlink_cmds variable as mentioned above.

This patch actually fixes all mainfest problems. Tests 39 and 40 now
succeed, but 29 still fails, but 29 now stumbles later when the MSVC
toolchain can't handle static/shared linking of non-libtool libraries.
(The static library is always selected for non-libtool libs, as it gets
the preferred name, foo.lib. The import lib gets the name foo-0.lib and
is only found if there is a libfoo.la)

That's definitely better than what we had before.

Does this BTW mean that the manifest file ends up being part of the .exe
and thus needs not be explicitly installed and uninstalled?  That would
be nice.

Yes, the mt command embeds the manifest as a resource, so nothing extra to
install.

2008-08-07  Peter Rosin  <address@hidden>

        * libltdl/m4/libtool.m4 (_LT_LINKER_SHLIBS) <postlink_cmds>:
        New tag variable.
        [ cygwin, mingw, cegcc ] <cl*>: Embed the manifest file as a
        resource.
        (_LT_LANG_CXX_CONFIG): Likewise.
        * libltdl/config/ltmain.m4sh (func_mode_link): After linking
        a program, replace @OUTPUT@ in $postlink_cmds and then execute
        the commands.

Not so bad; can we rely on 'mt' being present on all systems that have
cl?  Have you tried this patch on a setup where the program is relinked
at install time (does this ever happen with cl)?

Hi Ralf,

No, the manifest was introduced in MSVC 7 or 8 or something. MSVC 6 doesn't
generate any manifests. That's one reason for the postlink_cmds to have
if test -f @address@hidden;

That way, mt is only tried if there is a manifest file to embed, which also
covers the case when the manifest file isn't needed (and thus not
generated). If MSVC has generated a manifest, it better also have mt.

It might be a problem if you build inside the src tree and a
foo.exe.manifest is part of the source tree, and the .exe isn't generated
in the .libs subdir. I guess you just shouldn't do that. Doctor, it hurts
when I etc...

Cheers,
Peter




reply via email to

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