[Top][All Lists]
[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: |
Fri, 25 Aug 2006 16:57:05 +0200 |
User-agent: |
Mutt/1.5.12 (2006-08-10) |
Hello Pierre,
* Pierre Ossman wrote on Tue, Aug 22, 2006 at 04:14:11PM CEST:
> Gary V. Vaughan wrote:
> > Ralf Wildenhues wrote:
> >> OK to apply this patch?
> >
> > Yes please!
> >
> >> * 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>.
>
> So, what happened with this patch?
First I never got around to testing GnuWin32 `file' right away,
and then your patch got lost. :-(
Please accept my apologies. I have applied it as follows.
Cheers,
Ralf
branch-1-5:
* 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>.
Index: libtool.m4
===================================================================
RCS file: /cvsroot/libtool/libtool/Attic/libtool.m4,v
retrieving revision 1.314.2.162
diff -u -r1.314.2.162 libtool.m4
--- libtool.m4 3 Aug 2006 14:31:47 -0000 1.314.2.162
+++ libtool.m4 25 Aug 2006 14:51:07 -0000
@@ -2306,9 +2306,15 @@
mingw* | pw32*)
# Base MSYS/MinGW do not provide the 'file' command needed by
- # func_win32_libid shell function, so use a weaker test based on 'objdump'.
- lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture:
i386)?'
- lt_cv_file_magic_cmd='$OBJDUMP -f'
+ # func_win32_libid shell function, so use a weaker test based on 'objdump',
+ # unless we find 'file', for example because we are cross-compiling.
+ if ( file / ) >/dev/null 2>&1; then
+ lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+ lt_cv_file_magic_cmd='func_win32_libid'
+ else
+ lt_cv_deplibs_check_method='file_magic file format
pei*-i386(.*architecture: i386)?'
+ lt_cv_file_magic_cmd='$OBJDUMP -f'
+ fi
;;
darwin* | rhapsody*)
HEAD:
* libltdl/m4/libtool.m4 (_LT_CHECK_MAGIC_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>.
Index: libltdl/m4/libtool.m4
===================================================================
RCS file: /cvsroot/libtool/libtool/libltdl/m4/libtool.m4,v
retrieving revision 1.80
diff -u -r1.80 libtool.m4
--- libltdl/m4/libtool.m4 22 Aug 2006 17:51:03 -0000 1.80
+++ libltdl/m4/libtool.m4 25 Aug 2006 14:51:50 -0000
@@ -2814,11 +2814,17 @@
lt_cv_file_magic_cmd='func_win32_libid'
;;
- # Base MSYS/MinGW do not provide the 'file' command needed by
- # func_win32_libid shell function, so use a weaker test based on 'objdump'.
mingw* | pw32*)
- lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture:
i386)?'
- lt_cv_file_magic_cmd='$OBJDUMP -f'
+ # Base MSYS/MinGW do not provide the 'file' command needed by
+ # func_win32_libid shell function, so use a weaker test based on 'objdump',
+ # unless we find 'file', for example because we are cross-compiling.
+ if ( file / ) >/dev/null 2>&1; then
+ lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+ lt_cv_file_magic_cmd='func_win32_libid'
+ else
+ lt_cv_deplibs_check_method='file_magic file format
pei*-i386(.*architecture: i386)?'
+ lt_cv_file_magic_cmd='$OBJDUMP -f'
+ fi
;;
darwin* | rhapsody*)