From: Brad Date: Wed, 16 Jun 2004 15:44:44 +0000 (+0000) Subject: * m4/libtool.m4: More improvements to OpenBSD support. X-Git-Tag: release-1-9b~70 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fa497f68e784b3b39be68d632578802ee063b343;p=thirdparty%2Flibtool.git * m4/libtool.m4: More improvements to OpenBSD support. * NEWS: Updated. --- diff --git a/ChangeLog b/ChangeLog index da4e3bfde..2002ebf6a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2004-06-16 Brad + + * m4/libtool.m4: More improvements to OpenBSD support. + * NEWS: Updated. + 2004-06-16 Gary V. Vaughan Automake 1.9 won't have the AC_PROG_EGREP bug (aclocal used to diff --git a/NEWS b/NEWS index 2a82c389d..bf4ab10c9 100644 --- a/NEWS +++ b/NEWS @@ -53,6 +53,7 @@ New in 1.5b: 2004-??-??; CVS version 1.5a, Libtool team: latest files. * Extracting symbols from an import library on cygwin and win32 now works. * Initial support for amigaos-ppc. +* Improved support for OpenBSD. * Support for Intel C++ version 8.0. * New support for IBM's xlc and xlc++ on Mac OS X. * Finished support for QNX RTOS. diff --git a/m4/libtool.m4 b/m4/libtool.m4 index 0228f69c8..e42700c46 100644 --- a/m4/libtool.m4 +++ b/m4/libtool.m4 @@ -1996,7 +1996,7 @@ newsos6) 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 @@ -2496,12 +2496,10 @@ newos6*) ;; 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 ;; @@ -4048,6 +4046,7 @@ _LT_EOF _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 @@ -5101,6 +5100,19 @@ if test -n "$compiler"; then *nto* | *qnx*) _LT_AC_TAGVAR(ld_shlibs, $1)=yes ;; + 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)