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

ChangeLog
NEWS
libtool.m4
ltmain.in

index 0ead646914b1d6a73f15f6deeadc4d6dec085bbb..a7eef7318d27c7deecbe1179e271b76ead15b805 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2001-06-27  Gary V. Vaughan  <gary@gnu.org>
+
+       From brad@openbsd.org:
+       * NEWS: Updated.
+       * libtool.m4 (_LT_AC_LTCONFIG_HACK) [openbsd]: Improved support
+       for various openbsd platforms.
+       * ltmain.in: Ditto,
+
 2001-05-20  Peter Eisentraut  <peter_e@gmx.net>
 
        * libtool.m4 (_LT_AC_LTCONFIG_HACK): Fix typo in variable name.
diff --git a/NEWS b/NEWS
index a7c575c48fb454fc302ee0daeacdd9da5ddc006a..4ca29a98262e7f73b25806fa7834cfa6605638de 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,7 @@ NEWS - list of user-visible changes between releases of GNU Libtool
 
 New in 1.4.1: 2001-??-??; CVS version 1.4.0a, Libtool team:
 * Don't leave here-doc files behind.
+* Improved support for OpenBSD.
 \f
 New in 1.4: 2001-04-25; CVS version 1.3e, Libtool team:
 * Support for aix5*.
index a02dfb6830311e4a693b040b7c13b9d3b2eb3118..d6702737bbc9673a555f400c66af085816c1a325 100644 (file)
@@ -1180,7 +1180,7 @@ exclude_expsyms="_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++.
@@ -1188,7 +1188,9 @@ cygwin* | mingw* | pw32* )
     with_gnu_ld=no
   fi
   ;;
-
+openbsd*)
+  with_gnu_ld=no
+  ;;
 esac
 
 ld_shlibs=yes
@@ -1592,10 +1594,21 @@ else
     ;;
 
   openbsd*)
-    archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
-    hardcode_libdir_flag_spec='-R$libdir'
     hardcode_direct=yes
     hardcode_shlibpath_var=no
+    case "$host_os" in
+      openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+        archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+        hardcode_libdir_flag_spec='-R$libdir'
+      ;;
+      *)
+        archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
+        hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+        if [ "`echo __ELF__ | $CC -E - | grep __ELF__`" = "" -o "$host_os-$host_cpu" = "openbsd2.8-powerpc" ]; then
+         export_dynamic_flag_spec='${wl}-E'
+        fi
+      ;;
+    esac
     ;;
 
   os2*)
@@ -2081,9 +2094,12 @@ newsos6)
 
 openbsd*)
   version_type=sunos
-  if test "$with_gnu_ld" = yes; then
-    need_lib_prefix=no
-    need_version=no
+  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
   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
index e386f659aab9b1f5314f8cf5094ff0459e62a98c..7e2f095384a33f8d15695aaf341ea5c9f2a6e858 100644 (file)
--- a/ltmain.in
+++ b/ltmain.in
@@ -1036,6 +1036,18 @@ compiler."
            # These systems don't actually have a C library (as such)
            test "X$arg" = "X-lc" && continue
            ;;
+          *-*-openbsd*)
+            # Do not include libc due to us having libc/libc_r.
+            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"
@@ -2413,6 +2425,9 @@ compiler."
          *-*-netbsd*)
            # Don't link with libc until the a.out ld.so is fixed.
            ;;
+          *-*-openbsd*)
+            # Do not include libc due to us having libc/libc_r.
+            ;;
          *)
            # Add libc to deplibs on all other systems if necessary.
            if test $build_libtool_need_lc = "yes"; then