libtool-patches
[Top][All Lists]
Advanced

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

Preloading import libraries with MSVC


From: Peter Rosin
Subject: Preloading import libraries with MSVC
Date: Sat, 3 Nov 2012 00:42:13 +0100

Hi!

As discussed earlier[1], there are problems with preloading import
libraries when using Microsoft Visual C/C++. This series is a
polished version of the previously posted rough cut. However, the
first two patches are largely unrelated to the topic, but they
help visualize what the meat in the third patch is all about. So,
I guess they are related after all, which is why I posted them
as a series. :-)

This version will not create an @INIT@ symbol in the preloader
table unless one is neaded, i.e. an actual data import item
is needed to trigger the creation of the lt_syminit function
and the fake @INIT@ symbol providing its address.

Also, the "cost" in preopen.c is neglectable, as the loops from
the proof of concept first draft are gone.

With:

.../configure \
CC="`pwd`/build-aux/compile cl -nologo" \
CFLAGS="-MD -Zi -EHsc" \
CXX="`pwd`/build-aux/compile cl -nologo" \
CXXFLAGS="-MD -Zi -EHsc" \
NM="dumpbin -symbols -headers" \
LD=link \
STRIP=: \
AR="`pwd`/build-aux/ar-lib lib" \
RANLIB=: \
F77=no FC=no GCJ=no

from MSYS with Microsoft Visual C/C++ 2010 on $PATH, I get:

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

139 tests behaved as expected.
29 tests were skipped.

So, all failures are fixed. The testsuite is also clean on Cygwin
and MinGW (which makes me confident that the added special caseing
doesn't mess up systems that don't make use of them).

Is it unintrusive enough? Ok to push?

(confession: I did a few last minute trivial changes just before
posting which (drumroll) shouldn't affect things. Anyway, the testsuite
is part way through with thouse changes and the patch has been somewhat
exercised so it is looking good, but I will naturally post a followup
if anything untoward surfaces)

Cheers,
Peter

[1] http://lists.gnu.org/archive/html/libtool-patches/2012-10/msg00055.html



reply via email to

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