$OpenBSD: patch-ltconfig,v 1.1.1.1 2001/07/13 15:16:21 avsm Exp $ --- ltconfig.orig Fri Jul 13 15:58:55 2001 +++ ltconfig Fri Jul 13 16:00:02 2001 @@ -1031,6 +1031,10 @@ freebsd2* | sunos4*) exclude_expsyms="_GLOBAL_OFFSET_TABLE_" ;; +openbsd*) + with_gnu_ld=no + ;; + esac ld_shlibs=yes @@ -1262,10 +1266,21 @@ else ;; 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' + ;; + *) + 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 + ;; + esac ;; os2*)