From: Frank Ch. Eigler Date: Sun, 25 Apr 1999 18:54:24 +0000 (+0000) Subject: * libtool.m4 (cygwin*): Look for target objdump tool. X-Git-Tag: release-1-3~29 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=14776c3cfa6cb4556aa83d7488d9e49d318a2117;p=thirdparty%2Flibtool.git * 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. --- diff --git a/ChangeLog b/ChangeLog index aa931869e..7bf881176 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,18 @@ +1999-04-25 Frank Ch. Eigler + + * 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 * ltconfig.in (irix*, soname_spec, library_names_spec): Missing diff --git a/libtool.m4 b/libtool.m4 index fda60699c..4c7eeb1b6 100644 --- a/libtool.m4 +++ b/libtool.m4 @@ -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 diff --git a/ltconfig.in b/ltconfig.in index d444616d8..46a99198f 100755 --- a/ltconfig.in +++ b/ltconfig.in @@ -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. @@ -1699,8 +1704,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 @@ -2461,7 +2466,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 \ @@ -2544,7 +2549,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 @@ -2566,7 +2571,7 @@ cat <> "$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 @@ -2612,6 +2617,9 @@ NM=$NM # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" +# Used on cygwin: object dumper. +OBJDUMP="$OBJDUMP" + # Used on cygwin: assembler. AS="$AS" diff --git a/ltmain.in b/ltmain.in index a77881f40..5a70241e7 100644 --- a/ltmain.in +++ b/ltmain.in @@ -635,7 +635,13 @@ compiler." # #undef WIN32_LEAN_AND_MEAN # #include # +# #ifdef __cplusplus +# extern "C" { +# #endif # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); +# #ifdef __cplusplus +# } +# #endif # # #include # DECLARE_CYGWIN_DLL( DllMain ); @@ -1917,7 +1923,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"