- do not link shared libraries with libc.

- use "cc -shared" to create shared libraries.
This commit is contained in:
brad 2000-11-21 16:04:34 +00:00
parent d176915fb5
commit 023fab349b
2 changed files with 54 additions and 6 deletions

View File

@ -1,6 +1,16 @@
--- ltmain.sh.orig Wed Jan 19 18:09:52 2000
+++ ltmain.sh Wed Jan 19 18:10:50 2000
@@ -3522,40 +3522,6 @@
--- ltmain.sh.orig Thu Jul 15 20:56:06 1999
+++ ltmain.sh Sat Nov 11 21:26:30 2000
@@ -1789,6 +1789,9 @@
*-*-cygwin* | *-*-mingw* | *-*-os2* | *-*-beos*)
# these systems don't actually have a c library (as such)!
;;
+ *-*-openbsd*)
+ # do not include libc due to us having libc/libc_r.
+ ;;
*)
# Add libc to deplibs on all other systems.
deplibs="$deplibs -lc"
@@ -3522,40 +3525,6 @@
# Exit here if they wanted silent mode.
test "$show" = : && exit 0

View File

@ -1,6 +1,44 @@
--- ltconfig.orig Mon Jun 12 12:11:31 2000
+++ ltconfig Mon Jun 12 12:11:56 2000
@@ -1962,6 +1962,7 @@
--- ltconfig.orig Thu Jul 15 20:56:06 1999
+++ ltconfig Sat Nov 11 21:26:28 2000
@@ -1105,6 +1105,9 @@
with_gnu_ld=no
fi
;;
+openbsd*)
+ with_gnu_ld=no
+ ;;
esac
@@ -1391,10 +1394,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*)
@@ -1955,13 +1966,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