From: Gary V. Vaughan Date: Wed, 27 Jun 2001 18:44:03 +0000 (+0000) Subject: From brad@openbsd.org: X-Git-Tag: release-1-4-1~27 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9d4b2304b924652a469f47b41b92e68cd070b607;p=thirdparty%2Flibtool.git From brad@openbsd.org: * NEWS: Updated. * libtool.m4 (_LT_AC_LTCONFIG_HACK) [openbsd]: Improved support for various openbsd platforms. * ltmain.in: Ditto, --- diff --git a/ChangeLog b/ChangeLog index 0ead64691..a7eef7318 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2001-06-27 Gary V. Vaughan + + From brad@openbsd.org: + * NEWS: Updated. + * libtool.m4 (_LT_AC_LTCONFIG_HACK) [openbsd]: Improved support + for various openbsd platforms. + * ltmain.in: Ditto, + 2001-05-20 Peter Eisentraut * libtool.m4 (_LT_AC_LTCONFIG_HACK): Fix typo in variable name. diff --git a/NEWS b/NEWS index a7c575c48..4ca29a982 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,7 @@ NEWS - list of user-visible changes between releases of GNU Libtool New in 1.4.1: 2001-??-??; CVS version 1.4.0a, Libtool team: * Don't leave here-doc files behind. +* Improved support for OpenBSD. New in 1.4: 2001-04-25; CVS version 1.3e, Libtool team: * Support for aix5*. diff --git a/libtool.m4 b/libtool.m4 index a02dfb683..d6702737b 100644 --- a/libtool.m4 +++ b/libtool.m4 @@ -1180,7 +1180,7 @@ exclude_expsyms="_GLOBAL_OFFSET_TABLE_" extract_expsyms_cmds= case $host_os in -cygwin* | mingw* | pw32* ) +cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. @@ -1188,7 +1188,9 @@ cygwin* | mingw* | pw32* ) with_gnu_ld=no fi ;; - +openbsd*) + with_gnu_ld=no + ;; esac ld_shlibs=yes @@ -1592,10 +1594,21 @@ else ;; openbsd*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no + case "$host_os" in + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-R$libdir' + ;; + *) + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + if [ "`echo __ELF__ | $CC -E - | grep __ELF__`" = "" -o "$host_os-$host_cpu" = "openbsd2.8-powerpc" ]; then + export_dynamic_flag_spec='${wl}-E' + fi + ;; + esac ;; os2*) @@ -2081,9 +2094,12 @@ newsos6) openbsd*) version_type=sunos - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - need_version=no + file_magic_cmd=/usr/bin/file + file_magic_test_file=`echo /usr/lib/libc.so.*` + if [ "`echo __ELF__ | $CC -E - | grep __ELF__`" = "" -o "$host_os-$host_cpu" = "openbsd2.8-powerpc" ]; then + deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object' + else + deplibs_check_method='file_magic OpenBSD.* shared library' fi library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' diff --git a/ltmain.in b/ltmain.in index e386f659a..7e2f09538 100644 --- a/ltmain.in +++ b/ltmain.in @@ -1036,6 +1036,18 @@ compiler." # These systems don't actually have a C library (as such) test "X$arg" = "X-lc" && continue ;; + *-*-openbsd*) + # Do not include libc due to us having libc/libc_r. + continue + ;; + esac + fi + if test "X$arg" = "X-lc_r"; then + case $host in + *-*-openbsd*) + # Do not include libc_r directly, use -pthread flag. + continue + ;; esac fi deplibs="$deplibs $arg" @@ -2413,6 +2425,9 @@ compiler." *-*-netbsd*) # Don't link with libc until the a.out ld.so is fixed. ;; + *-*-openbsd*) + # Do not include libc due to us having libc/libc_r. + ;; *) # Add libc to deplibs on all other systems if necessary. if test $build_libtool_need_lc = "yes"; then