libtool-patches
[Top][All Lists]
Advanced

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

[PATCH] OpenBSD support


From: Brad
Subject: [PATCH] OpenBSD support
Date: Sat, 4 Aug 2001 00:19:28 -0400 (EDT)

Here are patches for both the 1.4 branch and the HEAD branch to improve
OpenBSD support. I was bad and used "if [ ... ]; then" instead of using
"if test ... ; then" and noticed it after the sh.test failed. Also enabled
modules without "lib" prefix and non-versioned as well as moving
interlibrary dependency checking to the "correct" location ... I noticed
the only OS that still has it in the incorrect location is AIX.

// Brad

address@hidden
address@hidden

libtool 1.4

--- libtool.m4.orig     Fri Aug  3 23:35:37 2001
+++ libtool.m4  Fri Aug  3 23:39:05 2001
@@ -1634,7 +1634,7 @@
       *)
         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
+        if test "`echo __ELF__ | $CC -E - | grep __ELF__`" = "" -o 
"$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
          export_dynamic_flag_spec='${wl}-E'
         fi
       ;;
@@ -2127,12 +2127,16 @@

 openbsd*)
   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 [ "`echo __ELF__ | $CC -E - | grep __ELF__`" = "" -o "$host_os-$host_cpu" 
= "openbsd2.8-powerpc" ]; then
+  if test "`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'
+    shlibpath_overrides_runpath=no
   else
     deplibs_check_method='file_magic OpenBSD.* shared library'
+    shlibpath_overrides_runpath=yes
   fi
   library_names_spec='${libname}${release}.so$versuffix 
${libname}.so$versuffix'
   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'


--


libtool HEAD

--- libtool.m4.orig     Fri Aug  3 23:44:26 2001
+++ libtool.m4  Sat Aug  4 00:01:48 2001
@@ -1292,15 +1292,15 @@

 openbsd*)
   version_type=sunos
+  need_lib_prefix=no
+  need_version=no
   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'
+  if test "`echo __ELF__ | $CC -E - | grep __ELF__`" = "" -o 
"$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+    shlibpath_overrides_runpath=no
   else
-    deplibs_check_method='file_magic OpenBSD.* shared library'
+    shlibpath_overrides_runpath=yes
   fi
   ;;

@@ -1949,6 +1949,16 @@
 nto-qnx)
   lt_cv_deplibs_check_method=unknown
   ;;
+
+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__`" = "" -o 
"$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*)
   # this will be overridden with pass_all, but let us keep it just in case
@@ -4753,7 +4763,6 @@
     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'
@@ -4762,7 +4771,7 @@
         *)
           _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
+          if test "`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
         ;;




reply via email to

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