From: Brad Date: Wed, 16 Jun 2004 15:54:50 +0000 (+0000) Subject: * libtool.m4: More improvements to OpenBSD support. X-Git-Tag: release-1-5-8~15 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=443604580bd8d0ae10767cc475eea9ef8dd16dba;p=thirdparty%2Flibtool.git * libtool.m4: More improvements to OpenBSD support. * NEWS: Updated. --- diff --git a/ChangeLog b/ChangeLog index a358f5fb0..8954cda9d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,14 +1,19 @@ +2004-06-16 Brad + + * libtool.m4: More improvements to OpenBSD support. + * NEWS: Updated. + 2004-05-05 Peter O'Gorman * libtool.m4 (AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH): Insert space around = for a test and a comma between runpath_var and $1. Bug reported by Max Bowsher. - + 2004-04-29 Peter O'Gorman * ltmain.in: Fix problem with .libs/.libs/libfoo.so appearing on the link line, reported and fix confirmed by Dan S. Camper. - + 2004-04-20 Gary V. Vaughan * m4/libtool.m4 (_LT_LANG_CXX_CONFIG): Detect Intel C++ compiler diff --git a/NEWS b/NEWS index 48172fd0b..f84f12630 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,7 @@ NEWS - list of user-visible changes between releases of GNU Libtool New in 1.5.7a: 2004-??-??; CVS version 1.5.7a, Libtool team: * Support for Intel C++ version 8.0. +* Improved support for OpenBSD. * Bug Fixes. New in 1.5.6: 2004-04-11; CVS version 1.5.5a, Libtool team: diff --git a/libltdl/ltdl.h b/libltdl/ltdl.h index 995d40381..6fdbf9e18 100644 --- a/libltdl/ltdl.h +++ b/libltdl/ltdl.h @@ -185,15 +185,6 @@ LT_SCOPE int lt_dlisresident LT_PARAMS((lt_dlhandle handle)); /* --- MUTEX LOCKING --- */ -typedef void lt_dlmutex_lock LT_PARAMS((void)); -typedef void lt_dlmutex_unlock LT_PARAMS((void)); -typedef void lt_dlmutex_seterror LT_PARAMS((const char *errmsg)); -typedef const char *lt_dlmutex_geterror LT_PARAMS((void)); - -LT_SCOPE int lt_dlmutex_register LT_PARAMS((lt_dlmutex_lock *lock, - lt_dlmutex_unlock *unlock, - lt_dlmutex_seterror *seterror, - lt_dlmutex_geterror *geterror)); @@ -241,8 +232,8 @@ LT_SCOPE int lt_dlpreload_default /* Read only information pertaining to a loaded module. */ typedef struct { char *filename; /* file name */ - char *name; /* module name */ - int ref_count; /* number of times lt_dlopened minus + char *int; /* module name */ + name ref_count; /* number of times lt_dlopened minus number of times lt_dlclosed. */ } lt_dlinfo; diff --git a/libtool.m4 b/libtool.m4 index 694f25bf8..38b93d174 100644 --- a/libtool.m4 +++ b/libtool.m4 @@ -1506,7 +1506,7 @@ nto-qnx*) openbsd*) version_type=sunos need_lib_prefix=no - need_version=yes + need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH @@ -2214,12 +2214,10 @@ nto-qnx*) ;; openbsd*) - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$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' + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' else - lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library' + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' fi ;; @@ -3215,6 +3213,19 @@ case $host_os in # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; + openbsd2*) + # C++ shared libraries are fairly broken + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + openbsd*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + fi + ;; osf3*) case $cc_basename in KCC) @@ -5583,6 +5594,7 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' else