libtool-patches
[Top][All Lists]
Advanced

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

[PATCH] improved OpenBSD support


From: Brad
Subject: [PATCH] improved OpenBSD support
Date: Sat, 1 Sep 2001 00:49:20 -0400 (EDT)

Here are 2 patches for both of the libtool branches which adds improved
support for OpenBSD.

ChangeLog entry:

>From Brad <address@hidden>:
* libtool.m4: More improvements to the OpenBSD support.

// Brad

address@hidden
address@hidden

libtool HEAD branch

--- libtool.m4.orig     Fri Aug 31 23:35:20 2001
+++ libtool.m4  Sat Sep  1 00:26:52 2001
@@ -172,7 +172,14 @@

 if test -n "$RANLIB"; then
   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
-  old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
+  case "$host_os" in
+  openbsd*)
+    old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
+  ;;
+  *)
+    old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
+  ;;
+  esac
 fi

 # Only perform the check for file, if the check method requires it
@@ -1283,7 +1290,14 @@
   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
   shlibpath_var=LD_LIBRARY_PATH
   if test "`echo __ELF__ | $CC -E - | grep __ELF__`" = "" || 
test"$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-    shlibpath_overrides_runpath=no
+    case "$host_os" in
+      openbsd2.[[89]] | openbsd2.[[89]].*)
+       shlibpath_overrides_runpath=no
+      ;;
+      *)
+       shlibpath_overrides_runpath=yes
+      ;;
+    esac
   else
     shlibpath_overrides_runpath=yes
   fi
@@ -4769,20 +4783,22 @@
     openbsd*)
       _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 test "`echo __ELF__ | $CC -E - | grep __ELF__`" = "" || test 
"$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-           _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
-          fi
-        ;;
-      esac
+      if test "`echo __ELF__ | $CC -E - | grep __ELF__`" = "" || test 
"$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+        _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'
+        _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+      else
+       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'
+         ;;
+       esac
+      fi
       ;;

     os2*)

libtool 1.4 branch

--- libtool.m4.orig     Fri Aug 31 23:20:11 2001
+++ libtool.m4  Sat Sep  1 00:26:03 2001
@@ -770,7 +770,14 @@

 if test -n "$RANLIB"; then
   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
-  old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
+  case "$host_os" in
+  openbsd*)
+    old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
+  ;;
+  *)
+    old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
+  ;;
+  esac
 fi

 # Allow CC to be a program name with arguments.
@@ -1626,19 +1633,22 @@
   openbsd*)
     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 test "`echo __ELF__ | $CC -E - | grep __ELF__`" = "" || test 
"$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-         export_dynamic_flag_spec='${wl}-E'
-        fi
-      ;;
-    esac
+    if test "`echo __ELF__ | $CC -E - | grep __ELF__`" = "" || test 
"$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+      archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs 
$linker_flags'
+      hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+      export_dynamic_flag_spec='${wl}-E'
+    else
+      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'
+       ;;
+      esac
+    fi
     ;;

   os2*)
@@ -2129,13 +2139,16 @@
   version_type=sunos
   need_lib_prefix=no
   need_version=no
-  file_magic_cmd=/usr/bin/file
-  file_magic_test_file=`echo /usr/lib/libc.so.*`
   if test "`echo __ELF__ | $CC -E - | grep __ELF__`" = "" || test 
"$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-    [deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared 
object']
-    shlibpath_overrides_runpath=no
+    case "$host_os" in
+      openbsd2.[[89]] | openbsd2.[[89]].*)
+       shlibpath_overrides_runpath=no
+      ;;
+      *)
+       shlibpath_overrides_runpath=yes
+      ;;
+    esac
   else
-    deplibs_check_method='file_magic OpenBSD.* shared library'
     shlibpath_overrides_runpath=yes
   fi
   library_names_spec='${libname}${release}.so$versuffix 
${libname}.so$versuffix'
@@ -3318,6 +3331,16 @@
   [lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB 
(executable|dynamic lib)']
   lt_cv_file_magic_cmd=/usr/bin/file
   lt_cv_file_magic_test_file=/usr/lib/libnls.so
+  ;;
+
+openbsd*)
+  lt_cv_file_magic_cmd=/usr/bin/file
+  lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
+  if test "`echo __ELF__ | $CC -E - | grep __ELF__`" = "" || test 
"$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+    [lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared 
object']
+  else
+    lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
+  fi
   ;;

 osf3* | osf4* | osf5*)




reply via email to

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