OSDN Git Service

2001-01-03 Benjamin Kosnik <bkoz@redhat.com>
[pf3gnuchains/gcc-fork.git] / ltcf-cxx.sh
index c134a42..9c7782f 100644 (file)
@@ -135,8 +135,12 @@ case "$host_os" in
     ld_shlibs=no
     ;;
   aix4*)
-    # FIXME: insert proper C++ library support
-    ld_shlibs=no
+    archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+    # -bexpall does not export symbols beginning with underscore (_)
+    always_export_symbols=yes
+    # Exported symbols can be pulled into shared objects from archives
+    whole_archive_flag_spec=' '
+    build_libtool_need_lc=yes
     ;;
   chorus*)
     case "$cc_basename" in
@@ -163,11 +167,15 @@ case "$host_os" in
         ;;
     esac
     ;;
-  freebsd*)
-    # FreeBSD uses GNU C++ and GNU ld
-    # FIXME: insert proper C++ library support
+  freebsd[12]*)
+    # C++ shared libraries reported to be fairly broken before switch to ELF
     ld_shlibs=no
     ;;
+  freebsd*)
+    # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
+    # conventions
+    ld_shlibs=yes
+    ;;
   hpux*)
     case "$cc_basename" in
       CC)
@@ -587,6 +595,10 @@ if test "$with_gcc" = yes; then
     # we not sure about C++ programs.
     ac_cv_prog_cc_static="$ac_cv_prog_cc_static ${ac_cv_prog_cc_wl}-lC"
     ;;
+  *djgpp*)
+    # DJGPP does not support shared libraries at all
+    ac_cv_prog_cc_pic=
+    ;;
   cygwin* | mingw* | os2*)
     # This hack is so that the source file can tell whether it is being
     # built for inclusion in a dll (and should export symbols for example).
@@ -778,7 +790,17 @@ else
       ;;
   esac
 fi
-ac_cv_prog_cc_pic="$ac_cv_prog_cc_pic -DPIC"
+
+case "$host_os" in
+    # Platforms which do not suport PIC and -DPIC is meaningless
+    # on them:
+    *djgpp*)
+      ac_cv_prog_cc_pic=
+      ;;
+    *)
+      ac_cv_prog_cc_pic="$ac_cv_prog_cc_pic -DPIC"
+      ;;
+esac
 
 
 # Figure out "hidden" C++ library dependencies from verbose