libtool-patches
[Top][All Lists]
Advanced

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

RE: Libtool: Microsoft dumpbin as name lister


From: Peter Ekberg
Subject: RE: Libtool: Microsoft dumpbin as name lister
Date: Tue, 23 Aug 2005 09:53:58 +0200

Albert Chin wrote:
> > Running "link /dump" has the same effect as running "dumpbin"; so
> > perhaps checking for MS Link is enough - if you have identified
> > the MS linker, you can use it to list symbols (and I imagine
> > libtool may need to know about the linker anyway).
> 
> If dumpbin is an alias for "link" with some args, how about scrapping
> use of dumpbin and replacing with the appropriate "link" command-line?

As the same is true for "lib" == "link -lib" I have had the same
thought. The problem is that link is most likely shadowed on the
PATH on Cygwin. So, some care has to be taken to avoid the use
of the wrong link program.

I dreamed up something like this:

1. Check if $CC is cl with a test compile to see if $CC
   defines _MSC_VER, if not bail.

2. If (first word of) $CC contains / or \, replace last
   path component (should be cl or cl.exe) with "link".

3. If (first word of) $CC does not contain / or \, use
   which(1) (or, if which should not be used for some reason,
   search the path manually) to locate the full path of
   $CC and replace last path component with "link".

You now have good input for $LD.

: ${NM="$LD -dump -symbols"}
: ${AR="$LD -lib"}

Any faults in the above? Comments?

Cheers,
Peter




reply via email to

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