libtool-patches
[Top][All Lists]
Advanced

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

PATCH: Head fix for export_symbols_cmds under AIX


From: Robert Boehne
Subject: PATCH: Head fix for export_symbols_cmds under AIX
Date: Tue, 28 Aug 2001 15:00:11 -0500

Hello all!

I've been working on fixing a problem under AIX with building
C++ libraries, and here is the result.  This patch alters the
macro AC_LIBTOOL_PROG_LD_SHLIBS to properly set export_symbols_cmds
when creating CXX tags, and for all tags under AIX.  The result
is that export_symbols_cmds is identical to the MLB version
under AIX 4.* Power.  It causes no regressions under Linux,
but I'd like someone to test cygwin for me, as I don't have
access to it.

Thanks!

ChangeLog entry:

2001-07-31  Robert Boehne  <address@hidden>

        * libtool.m4 (AC_LIBTOOL_PROG_LD_SHLIBS) Fixed a problem
        with export_symbols_cmds not being set for CXX tags, and
        not being properly set for any tag under AIX/Power.


-- 
Robert Boehne             Software Engineer
Ricardo Software   Chicago Technical Center
TEL: (630)789-0003 x. 238
FAX: (630)789-0127
email:  address@hidden
Index: libtool.m4
===================================================================
RCS file: /cvsroot/libtool/libtool/libtool.m4,v
retrieving revision 1.219
diff -u -r1.219 libtool.m4
--- libtool.m4  2001/08/19 20:20:25     1.219
+++ libtool.m4  2001/08/28 19:11:09
@@ -4219,7 +4219,26 @@
 # See if the linker supports building shared libraries.
 AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
 [AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared 
libraries])
-ifelse([$1],[CXX],[],[
+ifelse([$1],[CXX],[
+  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | 
$global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  case $host_os in
+  aix4* | aix5*)
+    # If we're using GNU nm, then we don't want the "-C" option.
+    # -C means demangle to AIX nm, but means don't demangle with GNU nm
+    if $NM -V 2>&1 | egrep '(GNU)' > /dev/null; then
+      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | 
awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && 
([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
+    else
+      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience 
| awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && 
([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
+    fi
+    ;;
+  cygwin* | mingw* | pw32*)
+    _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"'
+  ;;
+  *)
+    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | 
$global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  ;;
+  esac
+],[
   runpath_var=
   _LT_AC_TAGVAR(allow_undefined_flag, $1)=
   
@@ -4498,6 +4517,13 @@
         exp_sym_flag='-Bexport'
         no_entry_flag=""
       else
+       # If we're using GNU nm, then we don't want the "-C" option.
+       # -C means demangle to AIX nm, but means don't demangle with GNU nm
+       if $NM -V 2>&1 | egrep '(GNU)' > /dev/null; then
+          _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs 
$convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == 
"B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > 
$export_symbols'
+       else
+         _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs 
$convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == 
"B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > 
$export_symbols'
+       fi
         aix_use_runtimelinking=no
   
         # Test if we are trying to use run time linking or normal

reply via email to

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