]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* libtool.m4 (AC_LIBTOOL_LANG_CXX_CONFIG): modify
authorCharles Wilson <cwilson@ece.gatech.edu>
Tue, 31 Dec 2002 05:28:47 +0000 (05:28 +0000)
committerRobert Boehne <rboehne@gnu.org>
Tue, 31 Dec 2002 05:28:47 +0000 (05:28 +0000)
$archive_expsym_cmds to restore support for using
.def files via the -export-symbols switch.
(AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]): in both the [CXX]
branch and the default branch, improve $export_symbols_cmds
so that DATA symbols are properly  labelled.  In the default
branch, duplicate the _CXX_CONFIG correction for
$archive_expsym_cmds.

ChangeLog
libtool.m4

index c819e196398abb202ee4bba3de80a91f78b24290..8ebc6538aec180eed9ff22e8d86f3e1ca178e365 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2002-12-27  Charles Wilson  <cwilson@ece.gatech.edu>
+
+       * libtool.m4 (AC_LIBTOOL_LANG_CXX_CONFIG): modify
+       $archive_expsym_cmds to restore support for using
+       .def files via the -export-symbols switch.
+       (AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]): in both the [CXX]
+       branch and the default branch, improve $export_symbols_cmds
+       so that DATA symbols are properly  labelled.  In the default
+       branch, duplicate the _CXX_CONFIG correction for
+       $archive_expsym_cmds.
+
 2002-12-30  Charles Wilson  <cwilson@ece.gatech.edu>
 
        * libtool.m4 (AC_LIBTOOL_RC): AC_PROG_RC doesn't exist --
index 75c35eb599d35c017f2743c291eb57b2f7c7d254..3800f03de41fcf1d7780c6d5db2fc7643cab02b0 100644 (file)
@@ -2711,7 +2711,15 @@ case $host_os in
 
     if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
-      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}-retain-symbols-file $wl$export_symbols ${wl}--out-implib,$lib'
+      # If the export-symbols file already is a .def file (1st line
+      # is EXPORTS), use it as is; otherwise, prepend...
+      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+       cp $export_symbols $output_objdir/$soname.def;
+      else
+       echo EXPORTS > $output_objdir/$soname.def;
+       cat $export_symbols >> $output_objdir/$soname.def;
+      fi~
+      $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
     else
       _LT_AC_TAGVAR(ld_shlibs, $1)=no
     fi
@@ -4681,6 +4689,9 @@ ifelse([$1],[CXX],[
   pw32*)
     _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
   ;;
+  cygwin* | mingw*)
+    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
+  ;;
   *)
     _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
   ;;
@@ -4789,10 +4800,19 @@ EOF
       _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
       _LT_AC_TAGVAR(always_export_symbols, $1)=no
       _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
 
       if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
-       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}-retain-symbols-file $wl$export_symbols ${wl}--out-implib,$lib'
+       # If the export-symbols file already is a .def file (1st line
+       # is EXPORTS), use it as is; otherwise, prepend...
+       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+         cp $export_symbols $output_objdir/$soname.def;
+       else
+         echo EXPORTS > $output_objdir/$soname.def;
+         cat $export_symbols >> $output_objdir/$soname.def;
+       fi~
+       $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000  ${wl}--out-implib,$lib'
       else
        ld_shlibs=no
       fi