libtool-patches
[Top][All Lists]
Advanced

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

multi-language-branch: C++ support under AIX


From: Robert Boehne
Subject: multi-language-branch: C++ support under AIX
Date: Thu, 21 Sep 2000 19:34:02 -0500

As this is my first patch, I would appreciate any
tips on creating them.  flames > /dev/null
AIX is strange, *.a files can actually be shared
objects, or contain shared objects as members.

boreas::/boreas/libtool (61)% cvs diff -p -u ltcf-cxx.sh
Index: ltcf-cxx.sh
===================================================================
RCS file: /home/cvs/libtool/Attic/ltcf-cxx.sh,v
retrieving revision 1.1.2.23
diff -p -u -r1.1.2.23 ltcf-cxx.sh
--- ltcf-cxx.sh 2000/09/15 16:49:03     1.1.2.23
+++ ltcf-cxx.sh 2000/09/22 00:27:54
@@ -135,8 +135,59 @@ case "$host_os" in
     ld_shlibs=no
     ;;
   aix4*)
-    # FIXME: insert proper C++ library support
-    ld_shlibs=no
+    case "$cc_basename" in
+      xlC_r)
+        # FIXME: insert proper C++ library support
+        # the "_r" is for the thread safe version
+        version_type=none
+        LD=makeC++SharedLib_r
+        archive_cmds='$LD $LDFLAGS -p 0 ${wl}-bbigtoc $predep_objects
$libobjs $deplibs $postdep_objects $linker_flags -o $lib'
+        hardcode_action=relink
+        ;;
+      xlC)
+        # FIXME: insert proper C++ library support
+        version_type=none
+        LD=makeC++SharedLib
+        archive_cmds='$LD $LDFLAGS -p 0 ${wl}-bbigtoc $predep_objects
$libobjs $deplibs $postdep_objects $linker_flags -o $lib'
+        hardcode_action=relink
+        ;;
+      *)
+        # GNU C++ compiler with AIX linker
+        if test "$with_gcc" = yes && test "$with_gnu_ld" = no; then
+          hardcode_libdir_flag_spec='${wl}-b ${wl}nolibpath ${wl}-b
${wl}libpath:$libdir:/usr/lib:/lib'
+          hardcode_libdir_separator=':'
+          # FIXME: insert proper C++ library support
+          collect2name=`${CC} -print-prog-name=collect2`
+         if test -f "$collect2name" && \
+            strings "$collect2name" | grep resolve_lib_name >/dev/null
+          then
+            # We have reworked collect2
+            hardcode_direct=yes
+          else
+            # We have old collect2
+            hardcode_direct=unsupported
+            # It fails to find uninstalled libraries when the
uninstalled
+            # path is not listed in the libpath.  Setting
hardcode_minus_L
+            # to unsupported forces relinking
+            hardcode_minus_L=yes
+            hardcode_libdir_flag_spec='-L$libdir'
+            hardcode_libdir_separator=
+          fi
+          allow_undefined_flag=' ${wl}-berok'
+          no_undefined_flag=' ${wl}-bnoerok'
+          version_type=none
+          need_version=no
+          archive_cmds='$CC -shared ${wl}-bbigtoc ${wl}-bexpall
$predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o
$lib'
+          case "$host_os" in aix4.[01]|aix4.[01].*)
+            # According to Greg Wooledge, -bexpall is only supported
from AIX 4.2 on
+            always_export_symbols=yes ;;
+          esac
+       else
+          # FIXME: insert proper C++ library support for other
compilers
+          ld_shlibs=no
+        fi
+        ;;
+    esac
     ;;
   chorus*)
     case "$cc_basename" in

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


reply via email to

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