libtool-patches
[Top][All Lists]
Advanced

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

Re: MSVC: For MSVC, embed the manifest as a resource in the executable.


From: Peter Rosin
Subject: Re: MSVC: For MSVC, embed the manifest as a resource in the executable.
Date: Mon, 28 Jun 2010 11:01:11 +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 Ralf,

Thanks for the review!

Den 2010-06-26 22:42 skrev Ralf Wildenhues:
* Peter Rosin wrote on Fri, Jun 25, 2010 at 12:20:53AM CEST:
Den 2010-06-24 20:17 skrev Ralf Wildenhues:
I guess.  Wait.  Will mt be needed for programs also in packages using
only static libraries on w32, that maybe won't (or don't want to) use
the win32-dll option?  Then it needs to be outside of this option,
preferably in a new macro in libtool.m4, AC_REQUIREd by the macro(s)
that use(s) mt.

Yes, it might well be. It will be needed as soon as libtool is involved
with linking a program (and when it is using cl for that, of course).

Putting the check for mt outside the win32-dll option is right then.

Will it also be needed by packages using Automake but not Libtool?  IOW,
does your cl always create manifest files?  If not: when does it?

Yes, I suppose it does.

or should I add a macro somewhere (where?) that is more like LT_PATH_NM?
I.e. walks the PATH and discards mt:s that do not appear to be the
intended mt.

Let's try the easy way first, but after the AC_CHECK_TOOL, ensure -? is
accepted.  I don't want magnetic tape action anywhere due to libtool.

Here's a first shot.

I know that I haven't addressed the exeext comment
in your other reply, but I don't know what you want me to do. Please
advise further...

Step 0 would be using
   case ... in
   *.exe | *.EXE ) ...

because nobody mixes case.  Step 1 (optional) would be having a variable
in ltmain which contains exeext-normalized value (i.e., either always
with, or always without the extension), so you don't have to put the
case in the tag code.  Step 2: IIUC then this particular .EXE can only
come from some makefile(.am) author using upper-case .EXE *in* the file.
Slap that author.  ;-)

I don't really grok step 1, so I stopped at step 0. But I wish I could get
to the LART step though :-)

Do I need a NEWS entry for the new MT environment variable?

Yes that could help I guess.

Ok, added.

Is the name
MT in too much contention? I can easily imagine that this is not going
to be the first MT variable in the world...

codesearch.google.com exists to answer such questions for the open and
free software world.  Use the regex search interface.

Ok, looked and...

But what should it be instead?

$MANIFEST or $MANIFEST_TOOL?  What is Microsoft's verbose name for the
tool?  I don't have a big problem with MT though.

...I changed it to $MANIFEST_TOOL.

This is what mt (from Visual Studio 2005) says at the top:

Microsoft (R) Manifest Tool version 5.2.3790.2075
Copyright (c) Microsoft Corporation 2005.
All rights reserved.

Other than that, I think you too have a couple unneeded eval in the
change.  I don't remember if I already approved of the patch but in case
not, you may commit after fixing issues, posting updated version, and
waiting 72h then, unless you have further questions you want answered.

I simply plagiarized those evals from the name lister macro above. Oh
well, I fixed that.

I have run the testsuite over the last couple of days on the following
systems, but without this last round of trivial changes (but I have
verified that the trivial changes didn't trivially break anything, i.e.
it looks good on one system). The regression testing was done against
3d2d3ef8 "Ensure getopts.m4sh is compatible with Autoconf-2.61 and newer."

MSYS/MinGW
MSYS/MSVC
Cygwin/gcc
Debian Linux cross to mingw32 (with Wine)
Debian Linux/gcc

No regressions and this is the (slightly edited for readability) summary
from the MSVC run (lots of expected failures since I don't have Automake
installed in this environment, I use Cygwin for that part):

abs_srcdir=`CDPATH="${ZSH_VERSION+.}:" && cd .. && pwd`; cd tests; \
        CONFIG_SHELL="/bin/sh" /bin/sh $abs_srcdir/tests/testsuite \
          MAKE="make" CC="/path/to/compile cl" CFLAGS="-MD -Zi -EHsc" \
        CPP="/path/to/compile cl -E" CPPFLAGS="" LD="link" LDFLAGS="" \
        LIBS="" LN_S="ln -s" NM="dumpbin -symbols" RANLIB=":" MT="mt" \
        STRIP=":" lt_INSTALL="/bin/install -c" OBJEXT="obj" EXEEXT=".exe" \
        SHELL="/bin/sh" CONFIG_SHELL="/bin/sh" CXX="/path/to/compile cl" \
        CXXFLAGS="-MD -Zi -EHsc" CXXCPP="/path/to/compile cl -E" F77="no" \
        FFLAGS="" FC="no" FCFLAGS="" GCJ="no" GCJFLAGS="-g -O2" \
        _lt_pkgdatadir="/path/to/libtool/msvc/.." \
        LIBTOOLIZE="/path/to/libtool/libtoolize" \
        LIBTOOL="/path/to/libtool/libtool" \
        tst_aclocaldir="/path/to/libtool/msvc/../libltdl/m4"

## ------------------------------- ##
## GNU Libtool 2.2.11a test suite. ##
## ------------------------------- ##

Libtoolize operation.

  1: libtoolize macro installation                   ok
  2: libtoolize macro directory mismatch error       ok
  3: libtoolize macro serial update                  ok
  4: libtoolize config files serial update           ok
  5: diagnose missing LT_CONFIG_LTDL_DIR             ok
  6: copy ltdl.m4 with shared macro directory        ok
  7: correctly parse LTDL_INIT from configure.ac     ok
  8: diagnose missing LTDL_INIT invocation           ok
  9: upgrading verbatim style aclocal.m4             expected failure 
(libtoolize.at:601)
 10: verbatim aclocal.m4 w/o AC_CONFIG_MACRO_DIR     expected failure 
(libtoolize.at:692)
 11: nonrecursive ltdl with AC_CONFIG_MACRO_DIR      ok
 12: subproject ltdl with non-shared directories     ok
 13: LIBTOOLIZE_OPTIONS                              ok
 14: cleanup old installation                        ok

Testing libtool functions.

 15: standard command line options                   ok
 16: mode short-hands                                ok
 17: duplicate members in archive tests              ok
 18: duplicate convenience archive names             FAILED 
(duplicate_conv.at:79)
 19: preserve duplicate convenience deps             skipped 
(duplicate_deps.at:66)
 20: passing CC flags through libtool                ok
 21: passing CXX flags through libtool               ok
 22: passing F77 flags through libtool               skipped (flags.at:24)
 23: passing FC flags through libtool                skipped (flags.at:24)
 24: passing GCJ flags through libtool               skipped (flags.at:24)
 25: inherited_linker_flags                          ok
 26: C convenience archives                          ok
 27: C++ convenience archives                        ok
 28: F77 convenience archives                        skipped 
(convenience.at:111)
 29: FC convenience archives                         skipped 
(convenience.at:171)
 30: Java convenience archives                       skipped 
(convenience.at:231)
 31: Link order test                                 FAILED (link-order.at:69)
 32: Link order of deplibs                           ok
 33: Failure tests                                   ok
 34: shlibpath_overrides_runpath                     skipped (shlibpath.at:54)
 35: Runpath in libtool library files                ok
 36: static linking flags for programs               FAILED (static.at:198)
 37: ccache -all-static                              FAILED (static.at:374)
 38: Export test                                     FAILED (export.at:157)
 39: sys_lib_search_path                             skipped (search-path.at:57)
 40: indirect convenience                            ok
 41: indirect uninstalled                            ok
 42: static library contains static library          UNEXPECTED PASS
 43: both of -o prog and -o prog$EXEEXT work         ok
 44: execute mode                                    ok
 45: bindir compile check                            ok
 46: bindir basic lib test                           ok
 47: bindir install tests                            ok
 48: cwrapper for uninstalled executables            ok
 49: deplib in subdir                                ok
 50: inferred tag                                    ok
 51: CXX inferred tag                                ok
 52: F77 inferred tag                                skipped (infer-tag.at:56)
 53: FC inferred tag                                 skipped (infer-tag.at:70)
 54: GCJ inferred tag                                skipped (infer-tag.at:84)
 55: localized compiler messages                     ok
 56: nocase library search                           ok
 57: Install tests                                   ok
 58: versioning                                      ok

DESTDIR tests

 59: Simple DESTDIR install                          ok
 60: DESTDIR with in-package deplibs                 ok

Support for older m4 interface.

 61: AM_PROG_LIBTOOL                                 ok
 62: AC_WITH_LTDL                                    expected failure 
(old-m4-iface.at:160)

Libtool subdir-objects support.

 63: C subdir-objects                                expected failure 
(am-subdir.at:78)
 64: C++ subdir-objects                              expected failure 
(am-subdir.at:146)

Libltdl functionality.

 65: lt_dlexit unloading libs                        FAILED (lt_dlexit.at:147)
 66: lt_dlopenadvise library loading                 FAILED (lt_dladvise.at:387)
 67: lt_dlopen error messages                        skipped (lt_dlopen.at:31)
 68: lt_dlopen archive                               skipped (lt_dlopen_a.at:94)
 69: lt_dlopenext error messages                     ok
 70: libdir of installed modules                     ok
 71: ltdl API                                        ok
 72: dlloader API                                    ok
 73: loadlibrary error messages                      FAILED (loadlibrary.at:238)
 74: syntax of .la files                             ok
 75: resident modules                                ok
 76: SList functionality                             ok
 77: enforced lib prefix                             FAILED 
(need_lib_prefix.at:170)

Standalone Libltdl.

 78: compiling softlinked libltdl                    ok
 79: compiling copied libltdl                        ok
 80: installable libltdl                             ok
 81: linking libltdl without autotools               ok

Subproject Libltdl.

 82: compiling softlinked libltdl                    expected failure 
(subproject.at:61)
 83: compiling copied libltdl                        expected failure 
(subproject.at:77)
 84: installable libltdl                             expected failure 
(subproject.at:95)
 85: linking libltdl without autotools               ok

Nonrecursive Automake Libltdl.

 86: compiling softlinked libltdl                    expected failure 
(nonrecursive.at:90)
 87: compiling copied libltdl                        expected failure 
(nonrecursive.at:114)
 88: installable libltdl                             expected failure 
(nonrecursive.at:140)

Recursive Automake Libltdl.

 89: compiling softlinked libltdl                    expected failure 
(recursive.at:68)
 90: compiling copied libltdl                        expected failure 
(recursive.at:88)
 91: installable libltdl                             expected failure 
(recursive.at:110)

C++ template tests.

 92: simple template test                            ok
 93: template test with subdirs                      ok

Constructors.

 94: C++ static constructors                         ok
 95: C++ exception handling                          FAILED (exceptions.at:268)

libtool script generation.

 96: config.status                                   expected failure 
(early-libtool.at:109)
 97: config.lt                                       expected failure 
(early-libtool.at:216)

Libtool usage in GCC

 98: AC_NO_EXECUTABLES                               expected failure 
(no-executables.at:74)

Detecting identical deplibs.

 99: build tree relpaths                             expected failure 
(deplibs-ident.at:68)

configure interface to libltdl.

100: installable libltdl                             expected failure 
(configure-iface.at:144)
101: --with-ltdl-include/lib                         expected failure 
(configure-iface.at:227)
102: --with-included-ltdl                            expected failure 
(configure-iface.at:282)
103: convenience libltdl                             expected failure 
(configure-iface.at:321)

Libtool stress test.

104: Link option thorough search test                FAILED (stresstest.at:260)
105: Run tests with low max_cmd_len                  FAILED (cmdline_wrap.at:43)
106: override pic_flag at configure time             FAILED (pic_flag.at:48)

Mac OS X tests

107: darwin fat compile                              skipped (darwin.at:42)
108: darwin concurrent library extraction            ok
109: darwin gdb debug information                    skipped (darwin.at:154)
110: deplibs without file command                    ok

## ------------- ##
## Test results. ##
## ------------- ##

ERROR: 94 tests were run,
1 passed unexpectedly,
35 failed (22 expected failures).
16 tests were skipped.

The reason for the failures have been beaten to death previously, some
of the failures have fixes, some not. I'm not going through that here.

Cheers,
Peter

Attachment: manifest-3.patch
Description: Source code patch


reply via email to

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