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

OpenBSD, PHP-4.0.4RC5, ltconfig patch



[cross-posted, watch those replies]

PHP-4.0.4 is about to be released, and this patch to its ltconfig
to fix compilation on OpenBSD is required, but hasn't received 
adequate testing (i.e., only I've tested it)

Zero feedback from the PHP-QA team (several of whom run OpenBSD),
so I'm hoping that the ports@openbsd.org team will be able to test
it out.  

Particularly needed is non-i386 testing.  If someone could do this
very soon (since PHP is on the final RC at the moment), this would save
us a patch in our ports tree (and a number of open bug reports on
bugs.php.net about failed linking on OpenBSD)

You can obtain php-4.0.4RC5 at:
http://php.net/distributions/php-4.0.4RC5.tar.gz

-- 
Anil Madhavapeddy, <anil@recoil.org>
Index: ltconfig
===================================================================
RCS file: /repository/php4/ltconfig,v
retrieving revision 1.20.2.1
diff -u -r1.20.2.1 ltconfig
--- ltconfig	2000/12/09 11:37:27	1.20.2.1
+++ ltconfig	2000/12/13 22:36:33
@@ -1105,6 +1105,9 @@
     with_gnu_ld=no
   fi
   ;;
+openbsd*)
+  with_gnu_ld=no
+  ;;
 
 esac
 
@@ -1402,10 +1405,18 @@
     ;;
 
   openbsd*)
-    archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts'
-    hardcode_libdir_flag_spec='-R$libdir'
     hardcode_direct=yes
     hardcode_shlibpath_var=no
+    case "$host_os" in
+      openbsd2.[01234567])
+	archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts'
+	hardcode_libdir_flag_spec='-R$libdir'
+      ;;
+      *)
+	archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linkopts'
+	hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+      ;;
+    esac
     ;;
 
   os2*)
@@ -2018,13 +2029,10 @@
 
 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
+  deplibs_check_method='pass_all'
   ;;
 
 os2*)