openbsd-ports/devel/ORBit/patches/patch-ltconfig

82 lines
2.3 KiB
Plaintext
Raw Normal View History

2002-02-24 17:43:59 -05:00
$OpenBSD: patch-ltconfig,v 1.5 2002/02/24 22:43:59 brad Exp $
--- ltconfig.orig Mon Jan 7 04:09:54 2002
+++ ltconfig Sun Feb 24 16:56:18 2002
@@ -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.
2002-02-24 17:43:59 -05:00
@@ -1105,7 +1112,9 @@ cygwin* | mingw*)
2001-02-20 16:06:07 -05:00
with_gnu_ld=no
fi
;;
-
2001-02-20 16:06:07 -05:00
+openbsd*)
+ with_gnu_ld=no
+ ;;
esac
ld_shlibs=yes
2002-02-24 17:43:59 -05:00
@@ -1402,10 +1411,21 @@ else
2001-02-20 16:06:07 -05:00
;;
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
+ openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts'
+ hardcode_libdir_flag_spec='-R$libdir'
2001-02-20 16:06:07 -05:00
+ ;;
+ *)
+ 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
2001-02-20 16:06:07 -05:00
+ ;;
+ esac
;;
os2*)
2002-02-24 17:43:59 -05:00
@@ -2021,9 +2041,23 @@ netbsd*)
2001-02-20 16:06:07 -05:00
openbsd*)
version_type=sunos
- if test "$with_gnu_ld" = yes; then
- need_lib_prefix=no
- need_version=no
+ 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
2000-08-21 08:20:20 -04:00
library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'