- sync libtool patches

- build modules as modules
This commit is contained in:
naddy 2001-09-18 17:47:33 +00:00
parent f1860e698a
commit dc02c22979
5 changed files with 157 additions and 58 deletions

View File

@ -1,17 +1,34 @@
$OpenBSD: patch-ltconfig,v 1.2 2001/09/18 15:18:52 naddy Exp $
$OpenBSD: patch-ltconfig,v 1.3 2001/09/18 17:47:33 naddy Exp $
--- ltconfig.orig Tue May 8 01:12:25 2001
+++ ltconfig Thu Aug 30 16:05:18 2001
@@ -1105,6 +1105,9 @@ cygwin* | mingw*)
+++ ltconfig Tue Sep 18 18:29:12 2001
@@ -501,7 +501,14 @@ fi
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
# Set sane defaults for `DLLTOOL', `OBJDUMP', and `AS', used on cygwin.
@@ -1105,7 +1112,9 @@ cygwin* | mingw*)
with_gnu_ld=no
fi
;;
-
+openbsd*)
+ with_gnu_ld=no
+ ;;
esac
@@ -1402,10 +1405,21 @@ else
ld_shlibs=yes
@@ -1402,10 +1411,21 @@ else
;;
openbsd*)
@ -21,32 +38,44 @@ $OpenBSD: patch-ltconfig,v 1.2 2001/09/18 15:18:52 naddy Exp $
hardcode_shlibpath_var=no
+ case "$host_os" in
+ openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts'
+ hardcode_libdir_flag_spec='-R$libdir'
+ 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'
+ if [ "`/usr/bin/file /usr/lib/libc.so.* | grep ELF`" != "" ]; then
+ export_dynamic_flag_spec='${wl}-E'
+ fi
+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linkopts'
+ 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
;;
os2*)
@@ -2021,13 +2035,10 @@ netbsd*)
@@ -2021,9 +2041,23 @@ netbsd*)
openbsd*)
version_type=sunos
- if test "$with_gnu_ld" = yes; then
- need_lib_prefix=no
- need_version=no
- fi
+ 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'
+ 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'
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
shlibpath_var=LD_LIBRARY_PATH
+ deplibs_check_method='pass_all'
;;
os2*)

View File

@ -1,46 +1,45 @@
$OpenBSD: patch-ltmain.sh,v 1.2 2001/09/18 15:18:52 naddy Exp $
$OpenBSD: patch-ltmain.sh,v 1.3 2001/09/18 17:47:33 naddy Exp $
--- ltmain.sh.orig Tue May 8 01:12:25 2001
+++ ltmain.sh Thu Aug 30 16:05:18 2001
@@ -1079,7 +1079,18 @@ compiler."
+++ ltmain.sh Tue Sep 18 18:29:19 2001
@@ -1079,6 +1079,17 @@ compiler."
# These systems don't actually have c library (as such)
continue
;;
+ *-*-openbsd*)
+ # Do not include libc due to us having libc/libc_r.
+ continue
+ ;;
+ *-*-openbsd*)
+ # Do not include libc due to us having libc/libc_r.
+ continue
+ ;;
+ esac
+ elif test "$arg" = "-lc_r"; then
+ case "$host" in
+ *-*-openbsd*)
+ # Do not include libc_r directly, use -pthread flag.
+ continue
+ ;;
esac
+ elif test "$arg" = "-lc_r"; then
+ case "$host" in
+ *-*-openbsd*)
+ # Do not include libc_r directly, use -pthread flag.
+ continue
+ ;;
+ esac
elif test "$arg" = "-lm"; then
case "$host" in
*-*-cygwin* | *-*-beos*)
@@ -1091,6 +1102,10 @@ compiler."
deplibs="$deplibs $arg"
;;
+ -?thread)
+ deplibs="$deplibs $arg"
+ ;;
+ deplibs="$deplibs $arg"
+ ;;
+
-module)
module=yes
continue
@@ -1799,6 +1814,9 @@ compiler."
@@ -1795,6 +1810,9 @@ compiler."
*-*-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.
+ ;;
*-*-rhapsody*)
# 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 +3589,6 @@ libdir='$install_libdir'\
# Exit here if they wanted silent mode.
test "$show" = : && exit 0

View File

@ -0,0 +1,28 @@
$OpenBSD: patch-modules_Makefile_am,v 1.1 2001/09/18 17:47:33 naddy Exp $
--- modules/Makefile.am.orig Mon May 7 23:55:46 2001
+++ modules/Makefile.am Tue Sep 18 19:33:47 2001
@@ -29,7 +29,7 @@ else
CDDA_LTLIBS =
endif
-module_flags = -export_dynamic -avoid-version
+module_flags = -module -export_dynamic -avoid-version
modulesdir = $(libdir)/vfs/modules
modules_LTLIBRARIES = \
@@ -83,6 +83,7 @@ libfile_la_LDFLAGS = $(module_flags)
libvfs_test_la_SOURCES = \
test-method.c
+libvfs_test_la_LDFLAGS = $(module_flags)
libvfs_test_la_LIBADD = $(XML_LIBS)
### `gzip' method
@@ -106,6 +107,7 @@ libbzip2_la_LIBADD = -lbz2
libftp_la_SOURCES = \
ftp-method.c \
ftp-method.h
+libftp_la_LDFLAGS = $(module_flags)
### `gconf' method

View File

@ -0,0 +1,44 @@
$OpenBSD: patch-modules_Makefile_in,v 1.1 2001/09/18 17:47:33 naddy Exp $
--- modules/Makefile.in.orig Tue May 8 01:12:52 2001
+++ modules/Makefile.in Tue Sep 18 19:34:43 2001
@@ -181,7 +181,7 @@ EXTRA_DIST = default-modules.conf c
@HAVE_CDDA_TRUE@CDDA_LTLIBS = libcdda.la
@HAVE_CDDA_FALSE@CDDA_LTLIBS =
-module_flags = -export_dynamic -avoid-version
+module_flags = -module -export_dynamic -avoid-version
modulesdir = $(libdir)/vfs/modules
modules_LTLIBRARIES = $(CDDA_LTLIBS) libextfs.la libfile.la libvfs-test.la libhttp.la libbzip2.la libgzip.la libftp.la libvfs-pipe.la libvfs-translate.la $(NULL)
@@ -217,6 +217,7 @@ libfile_la_LDFLAGS = $(module_flags)
libvfs_test_la_SOURCES = test-method.c
+libvfs_test_la_LDFLAGS = $(module_flags)
libvfs_test_la_LIBADD = $(XML_LIBS)
### `gzip' method
@@ -237,6 +238,7 @@ libbzip2_la_LIBADD = -lbz2
libftp_la_SOURCES = ftp-method.c ftp-method.h
+libftp_la_LDFLAGS = $(module_flags)
### `gconf' method
@@ -291,7 +293,6 @@ libextfs_la_LIBADD =
libextfs_la_OBJECTS = extfs-method.lo
libfile_la_LIBADD =
libfile_la_OBJECTS = file-method.lo
-libvfs_test_la_LDFLAGS =
libvfs_test_la_DEPENDENCIES =
libvfs_test_la_OBJECTS = test-method.lo
libhttp_la_DEPENDENCIES =
@@ -300,7 +301,6 @@ libbzip2_la_DEPENDENCIES =
libbzip2_la_OBJECTS = bzip2-method.lo
libgzip_la_DEPENDENCIES =
libgzip_la_OBJECTS = gzip-method.lo
-libftp_la_LDFLAGS =
libftp_la_LIBADD =
libftp_la_OBJECTS = ftp-method.lo
libvfs_pipe_la_DEPENDENCIES =

View File

@ -1,16 +1,15 @@
@comment $OpenBSD: PFRAG.shared,v 1.1.1.1 2001/09/13 21:25:11 todd Exp $
@comment $OpenBSD: PFRAG.shared,v 1.2 2001/09/18 17:47:33 naddy Exp $
lib/libgnomevfs-pthread.so.0.0
lib/libgnomevfs.so.0.0
lib/vfs/modules/libbzip2.so.0.0
lib/vfs/modules/libcdda.so.0.0
lib/vfs/modules/libextfs.so.0.0
lib/vfs/modules/libfile.so.0.0
lib/vfs/modules/libftp.so.0.0
lib/vfs/modules/libgconf.so.0.0
lib/vfs/modules/libgzip.so.0.0
lib/vfs/modules/libhttp.so.0.0
lib/vfs/modules/libvfs-pipe.so.0.0
lib/vfs/modules/libvfs-test.so.0.0
lib/vfs/modules/libvfs-translate.so.0.0
DYNLIBDIR(%D/lib)
NEWDYNLIBDIR(%D/lib/vfs/modules)
DYNLIBDIR(%B)
lib/vfs/modules/libbzip2.so
lib/vfs/modules/libcdda.so
lib/vfs/modules/libextfs.so
lib/vfs/modules/libfile.so
lib/vfs/modules/libftp.so
lib/vfs/modules/libgconf.so
lib/vfs/modules/libgzip.so
lib/vfs/modules/libhttp.so
lib/vfs/modules/libvfs-pipe.so
lib/vfs/modules/libvfs-test.so
lib/vfs/modules/libvfs-translate.so