libtool
[Top][All Lists]
Advanced

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

Re: On Windows, $old_archive_cmds uses `lib' to create static archives.


From: Ralf Wildenhues
Subject: Re: On Windows, $old_archive_cmds uses `lib' to create static archives.
Date: Mon, 23 Apr 2007 07:46:00 +0200
User-agent: Mutt/1.5.15 (2007-04-13)

* Benoit Sigoure wrote on Sun, Apr 22, 2007 at 07:42:24PM CEST:
> 
> On Windows, when compiling with Visual C++, libtool seems to figure out
> automagically that it has to create static archives with the `lib' command.
[...]
> I wonder how libtool figured this out and why libtool does this since it does
> not support the Microsoft toolchain anyway.

Yes, there are some patches floating around to change this, but they
haven't been applied.

> My question is: how can I override this behavior?  For instance, I can easily
> use make CCLD=wrapper_script.sh but here, I have no control since it's
> hardcoded in the libtool script.

Which Libtool version do you use?  Plain or with any patches?

> I want to do this because I want to link everything with the /NODEFAULTLIB 
> flag
> without actually changing anything in the code I'm compiling.  And of course,
> libtool won't let the `/NODEFAULTLIB' flag pass through.

Not for $old_archive_cmds.  I guess we could add some flag here.
(Want to suggest a patch? ;-)

Simplest workaround for you would be to put a shell script named
`lib' early in your path that adds /NODEFAULTLIB (or simply adds
an environment variable) to the command line, I guess.

> As a reminder, I use the Microsoft toolchain using lots of wrapper scripts so
> that it appears to work transparantly just like GCC (this thread explains what
> I did: http://lists.gnu.org/archive/html/libtool/2006-11/msg00046.html).

Ah, ok.  So the workaround would fit right in your line of work, no?
;-)

Cheers,
Ralf




reply via email to

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