libtool-patches
[Top][All Lists]
Advanced

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

Re: [Mingw-users] libtool, dlls and -lm


From: Ralf Wildenhues
Subject: Re: [Mingw-users] libtool, dlls and -lm
Date: Wed, 21 Dec 2005 18:45:06 +0100

[ adding subscribers-only mingw-users back -- they may have useful
input on this ] Hi Bob,
* Bob Friesenhahn wrote on Mon, Dec 19, 2005 at 06:46:21PM CET:
On Mon, 19 Dec 2005, Ralf Wildenhues wrote:
>
>Question to libtool folks: OK to apply this patch? There are other reasons not to find the 'file' command. For example, it does not appear to be provided with the MSYS environment. But objdump is provided with MinGW. That is why I had MinGW using objdump while Cygwin uses file.

Sure.
The patch assumes particular output from the 'file' command.

It assumes that, for an ar archive, it will output something matching
*ar\ archive*
(in shell pattern notation).
I believe that is fairly safe; I've even tested that now on some BSDs.
Note func_win32_libid uses `$OBJDUMP -f' and `$NM -f posix -A ..'
to determine whether it's an import library.  Both of those tools have
to be part of the cross-toolchain on non-mingw, so that should be safe
as well.  Besides, if my patch introduced brokenness for cross-compiles,
that would already be broken for any cross-compile to cygwin anyway.
Since there is no standard 'file' command provided with MSYS/MinGW, is
this safe?

OK, so the only remaining case really is MSYS/MinGW itself.  Do we know
of win32 installations that provide a `file' command that does not do
what we expect?  Note that not having `file' available would be fine
here, but one that does something completely unrelated, for example,
would hurt.
Maybe we should limit use of func_win32_libid to the case where both
`file' is available and $host != $build?
What if MinGW is used in a cross-development environment (e.g.  some
*BSD environment) which uses a different 'file' program than expected?

See above: that should be safe. Any more issues?
Cheers,
Ralf
>       * libtool.m4 (AC_DEPLIBS_CHECK_METHOD) [ mingw, pw32 ]:
>       If `file' is present, use `func_win32_libid' rather than
>       `objdump -f', to facilitate cross-compilation.
>       Reported by Pierre Ossman <address@hidden>.




reply via email to

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