]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* NEWS: Updated.
authorGary V. Vaughan <gary@gnu.org>
Wed, 27 Jun 2001 17:56:09 +0000 (17:56 +0000)
committerGary V. Vaughan <gary@gnu.org>
Wed, 27 Jun 2001 17:56:09 +0000 (17:56 +0000)
* libtool.m4 (AC_LIBTOOL_SYS_DYNAMIC_LINKER) [openbsd]: Improved
support for various openbsd platforms.
(AC_LIBTOOL_PROG_LD_SHLIBS): Ditto.
* ltmain.in: Ditto,

ChangeLog
NEWS
libtool.m4
ltmain.in

index 7e148cd4cd3bf373c39e053f756913acbad4f943..a9d0189bae4c494a735639305affed44ed305aa0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2001-06-27  Gary V. Vaughan  <gary@gnu.org>
+
+       * NEWS: Updated.
+       * libtool.m4 (AC_LIBTOOL_SYS_DYNAMIC_LINKER) [openbsd]: Improved
+       support for various openbsd platforms.
+       (AC_LIBTOOL_PROG_LD_SHLIBS): Ditto.
+       * ltmain.in: Ditto,
+
 2001-06-26  Gary V. Vaughan  <gary@gnu.org>
        
        * NEWS: Updated.
diff --git a/NEWS b/NEWS
index e8d3112abf3f71d7b0621e8e167e2fcc06ed3054..fcaf8e9c27c946fd4b7f46eb94795d6269b21ec5 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,7 @@ NEWS - list of user-visible changes between releases of GNU Libtool
 New in 1.4b: 2001-??-??; CVS version 1.4a, Libtool team:
 * Full support for C++ compiler.
 * Support for GNU gcj compiler.
+* Improved support for OpenBSD.
 * internal mutex handling no longer has namespace clashes on NCR MP-RAS.
 \f
 New in 1.4.1: 2001-??-??; CVS version 1.4.0a, Libtool team:
index 2c1cb741d48fddbb24191835bf59ba7e3e114ec0..8e4d318477e9d6b45592d8e92914bd829e1b225d 100644 (file)
@@ -1213,13 +1213,16 @@ newsos6)
 
 openbsd*)
   version_type=sunos
-  if test "$with_gnu_ld" = yes; then
-    need_lib_prefix=no
-    need_version=no
-  fi
   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
   shlibpath_var=LD_LIBRARY_PATH
+  file_magic_cmd=/usr/bin/file
+  file_magic_test_file=`echo /usr/lib/libc.so.*`
+  if [ "`echo __ELF__ | $CC -E - | grep __ELF__`" = "" -o "$host_os-$host_cpu" = "openbsd2.8-powerpc" ]; then
+    deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
+  else
+    deplibs_check_method='file_magic OpenBSD.* shared library'
+  fi
   ;;
 
 os2*)
@@ -3867,7 +3870,7 @@ _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
 extract_expsyms_cmds=
 
 case $host_os in
-cygwin* | mingw* | pw32* )
+cygwin* | mingw* | pw32*)
   # FIXME: the MSVC++ port hasn't been tested in a loooong time
   # When not using gcc, we currently assume that we are using
   # Microsoft Visual C++.
@@ -3875,7 +3878,9 @@ cygwin* | mingw* | pw32* )
     with_gnu_ld=no
   fi
   ;;
-
+openbsd*)
+  with_gnu_ld=no
+  ;;
 esac
 
 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
@@ -4307,10 +4312,22 @@ else
     ;;
 
   openbsd*)
-    _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
-    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
     _LT_AC_TAGVAR(hardcode_direct, $1)=yes
     _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+  
+    case "$host_os" in
+      openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+      ;;
+      *)
+        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
+        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+        if [ "`echo __ELF__ | $CC -E - | grep __ELF__`" = "" -o "$host_os-$host_cpu" = "openbsd2.8-powerpc" ]; then
+         _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+        fi
+      ;;
+    esac
     ;;
 
   os2*)
index 283227013fc4aaab84ce3d514f39e80884a250c6..5b11a6b5a4aabe6006fa7af4c0a52dd748d9d7ce 100644 (file)
--- a/ltmain.in
+++ b/ltmain.in
@@ -1216,12 +1216,24 @@ EOF
            # These systems don't actually have a C library (as such)
            test "X$arg" = "X-lc" && continue
            ;;
+         *-*-openbsd*)
+           # OpenBSD uses either libc or libc_r.
+           continue
+           ;;
          *-*-rhapsody* | *-*-darwin1.[012])
            # Rhapsody C and math libraries are in the System framework
            deplibs="$deplibs -framework System"
            continue
          esac
        fi
+        if test "X$arg" = "X-lc_r"; then
+         case $host in
+         *-*-openbsd*)
+           # Do not include libc_r directly, use -pthread flag.
+           continue
+           ;;
+         esac
+        fi
        deplibs="$deplibs $arg"
        continue
        ;;
@@ -2797,7 +2809,10 @@ EOF
          *-*-netbsd*)
            # Don't link with libc until the a.out ld.so is fixed.
            ;;
-         *)
+          *-*-openbsd*)
+           # OpenBSD uses either libc or libc_r.
+            ;;
+         *)
            # Add libc to deplibs on all other systems if necessary.
            if test $build_libtool_need_lc = "yes"; then
              deplibs="$deplibs -lc"