* libtool.m4 (cygwin*): Look for target objdump tool.

* ltconfig.in (cygwin*, file_magic_cmd): Use autoconf-located target
objdump tool.  Track OBJDUMP like DLLTOOL and AS.

* ltconfig.in (cygwin*, deplibs_check_method): Accept
"architecture: i386" as optional suffix, for it is printed on a
separate line sometimes.

* ltmain.in (cygwin*, ltdll.c): Wrap DllMain declaration in extern "C".

* ltmain.in (deplibs_check_method=file_magic): Redirect stderr to
/dev/null, to suppress error messages from target objdump.
This commit is contained in:
Frank Ch. Eigler 1999-04-25 18:54:24 +00:00 committed by Alexandre Oliva
parent caae05bd39
commit 36e0c3cf90
4 changed files with 37 additions and 7 deletions

View File

@ -1,3 +1,18 @@
1999-04-25 Frank Ch. Eigler <fche@cygnus.com>
* libtool.m4 (cygwin*): Look for target objdump tool.
* ltconfig.in (cygwin*, file_magic_cmd): Use autoconf-located target
objdump tool. Track OBJDUMP like DLLTOOL and AS.
* ltconfig.in (cygwin*, deplibs_check_method): Accept
"architecture: i386" as optional suffix, for it is printed on a
separate line sometimes.
* ltmain.in (cygwin*, ltdll.c): Wrap DllMain declaration in extern "C".
* ltmain.in (deplibs_check_method=file_magic): Redirect stderr to
/dev/null, to suppress error messages from target objdump.
1999-04-25 Alexandre Oliva <oliva@dcc.unicamp.br>
* ltconfig.in (irix*, soname_spec, library_names_spec): Missing

1
libtool.m4 vendored
View File

@ -112,6 +112,7 @@ case "$host" in
*-*-cygwin*)
AC_CHECK_TOOL(DLLTOOL, dlltool, false)
AC_CHECK_TOOL(AS, as, false)
AC_CHECK_TOOL(OBJDUMP, objdump, false)
;;
esac

View File

@ -213,6 +213,7 @@ old_LIBS="$LIBS"
old_NM="$NM"
old_RANLIB="$RANLIB"
old_DLLTOOL="$DLLTOOL"
old_OBJDUMP="$OBJDUMP"
old_AS="$AS"
# Parse the command line options.
@ -470,6 +471,9 @@ old_postuninstall_cmds=
# Set a sane default for `AR'.
test -z "$AR" && AR=ar
# Set a sane default for `OBJDUMP'.
test -z "$OBJDUMP" && OBJDUMP=objdump
# If RANLIB is not set, then run the test.
if test "${RANLIB+set}" != "set"; then
result=no
@ -494,8 +498,9 @@ if test -n "$RANLIB"; then
old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
fi
# Set sane defaults for `DLLTOOL' and `AS', used on cygwin.
# Set sane defaults for `DLLTOOL', `OBJDUMP', and `AS', used on cygwin.
test -z "$DLLTOOL" && DLLTOOL=dlltool
test -z "$OBJDUMP" && OBJDUMP=objdump
test -z "$AS" && AS=as
# Check to see if we are using GCC.
@ -1708,8 +1713,8 @@ cygwin* | mingw*)
library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
fi
dynamic_linker='Win32 ld.exe'
deplibs_check_method='file_magic file format pei*-i386.*architecture: i386'
file_magic_cmd='objdump -f'
deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
file_magic_cmd='${OBJDUMP} -f'
need_lib_prefix=no
# FIXME: first we should search . and the directory the executable is in
shlibpath_var=PATH
@ -2470,7 +2475,7 @@ case "$ltmain" in
# Now quote all the things that may contain metacharacters.
for var in ltecho old_CC old_CFLAGS old_CPPFLAGS \
old_LD old_LDFLAGS old_LIBS \
old_NM old_RANLIB old_LN_S old_DLLTOOL old_AS \
old_NM old_RANLIB old_LN_S old_DLLTOOL old_OBJDUMP old_AS \
AR CC LD LN_S NM LTSHELL LTCONFIG_VERSION \
reload_flag reload_cmds wl \
pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
@ -2555,7 +2560,7 @@ EOF
# Double-quote the variables that need it (for aesthetics).
for var in old_CC old_CFLAGS old_CPPFLAGS \
old_LD old_LDFLAGS old_LIBS \
old_NM old_RANLIB old_LN_S old_DLLTOOL old_AS; do
old_NM old_RANLIB old_LN_S old_DLLTOOL old_OBJDUMP old_AS; do
eval "$var=\\\"\$var\\\""
done
@ -2577,7 +2582,7 @@ cat <<EOF >> "$cfgfile"
# CC=$old_CC CFLAGS=$old_CFLAGS CPPFLAGS=$old_CPPFLAGS \\
# LD=$old_LD LDFLAGS=$old_LDFLAGS LIBS=$old_LIBS \\
# NM=$old_NM RANLIB=$old_RANLIB LN_S=$old_LN_S \\
# DLLTOOL=$old_DLLTOOL AS=$old_AS \\
# DLLTOOL=$old_DLLTOOL OBJDUMP=$old_OBJDUMP AS=$old_AS \\
# $0$ltconfig_args
#
# Compiler and other test output produced by $progname, useful for
@ -2623,6 +2628,9 @@ NM=$NM
# Used on cygwin: DLL creation program.
DLLTOOL="$DLLTOOL"
# Used on cygwin: object dumper.
OBJDUMP="$OBJDUMP"
# Used on cygwin: assembler.
AS="$AS"

View File

@ -635,7 +635,13 @@ compiler."
# #undef WIN32_LEAN_AND_MEAN
# #include <stdio.h>
#
# #ifdef __cplusplus
# extern "C" {
# #endif
# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
# #ifdef __cplusplus
# }
# #endif
#
# #include <cygwin/cygwin_dll.h>
# DECLARE_CYGWIN_DLL( DllMain );
@ -2005,7 +2011,7 @@ EOF
*) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
esac
done
if eval $file_magic_cmd \"\$potlib\" \
if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \
| sed 10q \
| egrep "$file_magic_regex" > /dev/null; then
newdeplibs="$newdeplibs $a_deplib"