]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
Fix GNU nm invocation for AIX.
authorRichard Sandiford <richards@transitive.com>
Sat, 6 Jun 2009 06:50:38 +0000 (08:50 +0200)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Sat, 6 Jun 2009 06:50:38 +0000 (08:50 +0200)
* libldtl/m4/libtool.m4 (_LT_LINKER_SHLIBS)
<export_symbols_cmds>: Modify the GNU-nm-on-AIX version so that
it adds weak defined symbols to the export list.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
ChangeLog
libltdl/m4/libtool.m4

index eab3a7f7993838755ea8796fcc8a3b139638f5f4..e278549b062d2e206ece953e6f1bb215fe3922a0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2009-06-06  Richard Sandiford  <richards@transitive.com>
 
+       Fix GNU nm invocation for AIX.
+       * libldtl/m4/libtool.m4 (_LT_LINKER_SHLIBS)
+       <export_symbols_cmds>: Modify the GNU-nm-on-AIX version so that
+       it adds weak defined symbols to the export list.
+
        Build AIX shared libraries with binutils 2.19.50+.
        * libltdl/m4/libtool.m4 (_LT_LINKER_SHLIBS, _LT_LANG_CXX_CONFIG)
        <lt_use_gnu_ld_interface>: New variable to control whether the
index 21db0b070e0f36e48cdec0e87357424877b728bf..a7d9bf507c967ca43304572102ebea967759345d 100644 (file)
@@ -4129,8 +4129,10 @@ m4_if([$1], [CXX], [
   aix[[4-9]]*)
     # 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
+    # Also, AIX nm treats weak defined symbols like other global defined
+    # symbols, whereas GNU nm marks them as "W".
     if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
-      _LT_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'
+      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
     else
       _LT_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
@@ -4527,8 +4529,10 @@ _LT_EOF
       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
+       # Also, AIX nm treats weak defined symbols like other global
+       # defined symbols, whereas GNU nm marks them as "W".
        if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
-         _LT_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'
+         _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
        else
          _LT_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