use "cc -shared" to create shared libraries on 2.8 and up.

This commit is contained in:
brad 2000-12-04 16:10:02 +00:00
parent 8f41103f3f
commit b313816afe
2 changed files with 54 additions and 15 deletions

View File

@ -1,6 +1,44 @@
--- ltconfig.orig Sun Sep 10 03:56:20 2000
+++ ltconfig Sun Sep 10 03:56:42 2000
@@ -2004,6 +2004,7 @@
--- ltconfig.orig Sat May 27 07:15:00 2000
+++ ltconfig Sat Oct 21 13:46:37 2000
@@ -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*)
@@ -2021,13 +2032,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

View File

@ -1,15 +1,16 @@
--- ltmain.sh.orig Sun Sep 10 03:56:49 2000
+++ ltmain.sh Sun Sep 10 03:57:02 2000
@@ -2619,7 +2619,7 @@
# linked before any other PIC object. But we must not use
# pic_flag when linking with -static. The problem exists in
# FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
- *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
+ *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
case "$compile_command " in
*" -static "*) ;;
*) pic_flag_for_symtable=" $pic_flag -DPIC -DFREEBSD_WORKAROUND";;
@@ -3555,40 +3555,6 @@
--- ltmain.sh.orig Wed Sep 13 15:41:36 2000
+++ ltmain.sh Mon Dec 4 11:02:13 2000
@@ -1799,6 +1799,9 @@
# rhapsody is a little odd...
deplibs="$deplibs -framework System"
;;
+ *-*-openbsd*)
+ # do not include libc due to us having libc/libc_r.
+ ;;
*)
# Add libc to deplibs on all other systems.
deplibs="$deplibs -lc"
@@ -3571,40 +3574,6 @@
# Exit here if they wanted silent mode.
test "$show" = : && exit 0