libtool-patches
[Top][All Lists]
Advanced

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

[MLB] Patch: Check for GNU nm under AIX 4 and 5


From: Robert Boehne
Subject: [MLB] Patch: Check for GNU nm under AIX 4 and 5
Date: Thu, 15 Feb 2001 15:30:15 -0600

Alexandre alluded to a patch to do this, but since I have already
tested this one I figured I'd post it in case he hadn't finished his
patch.
I have tested this patch with and without GNU nm from binutils 2.10
under AIX 4.3.3, with g++ and also xlC with AIX nm.  In all three cases
the same two test cases fail (but that's another patch...)


ChangeLog entry:

2001-02-15  Robert Boehne  <address@hidden>
        
        * ltconfig.in: Under AIX 4&5 check to see if we're using
        GNU nm, if so, remove -C from the options to $NM.  The -C
        is required to demangle with AIX nm, but -C means don't
        demangle to GNU nm.



-- 
Robert Boehne             Software Engineer
Ricardo Software   Chicago Technical Center
TEL: (630)789-0003 x. 238
FAX: (630)789-0127
email:  address@hidden
ChangeLog entry:

2001-02-15  Robert Boehne  <address@hidden>
        
        * ltconfig.in: Under AIX 4&5 check to see if we're using
        GNU nm, if so, remove -C from the options to $NM.  The -C
        is required to demangle with AIX nm, but -C means don't
        demangle to GNU nm.


Index: ltconfig.in
===================================================================
RCS file: /cvsroot/libtool/libtool/Attic/ltconfig.in,v
retrieving revision 1.246.2.43
diff -u -r1.246.2.43 ltconfig.in
--- ltconfig.in 2001/02/12 18:08:11     1.246.2.43
+++ ltconfig.in 2001/02/15 21:22:14
@@ -964,7 +964,13 @@
       library_names_spec='${libname}${release}.a $libname.a'
       soname_spec='${libname}${release}.so$major.o'
     fi
-    export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 
== "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print 
\$3 } }'\'' | sort -u > $export_symbols'
+    # 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
+      export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if 
(((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { 
print \$3 } }'\'' | sort -u > $export_symbols'
+    else
+      export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if 
(((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { 
print \$3 } }'\'' | sort -u > $export_symbols'
+    fi
     shlibpath_var=LIBPATH
     deplibs_check_method='pass_all'
   fi

reply via email to

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