resolve some libtool/other magic to make this at least build on ELF

regress tests are not working, ian is supposed to look at that
some help from naddy; ok maintainer ian
This commit is contained in:
pvalchev 2003-05-23 05:03:46 +00:00
parent 04b39f8fcf
commit d4b9842a04
5 changed files with 173 additions and 8 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.21 2002/12/29 20:41:07 fgsch Exp $
# $OpenBSD: Makefile,v 1.22 2003/05/23 05:03:46 pvalchev Exp $
#
# If you are getting compile errors like these:
# Undefined symbol `_postOutOfMemory' referenced from text segment
@ -39,7 +39,7 @@ PERMIT_DISTFILES_FTP= Yes
# build/configuration variables
CONFIGURE_STYLE=gnu
CONFIGURE_ARGS+=${CONFIGURE_SHARED}
CONFIGURE_ARGS+=${CONFIGURE_SHARED} --enable-static
CONFIGURE_ENV= CFLAGS="${CFLAGS} -I${LOCALBASE}/include" \
CPPFLAGS="${CPPFLAGS} -I${LOCALBASE}/include" \
LDFLAGS="${LDFLAGS} -L${LOCALBASE}/lib"

View File

@ -1,6 +0,0 @@
*** /dev/null Thu Nov 4 11:02:02 1999
--- config/i386/openbsd2/jit3-md.h Thu Nov 4 12:10:20 1999
***************
*** 0 ****
--- 1 ----
+ #include "i386/openbsd2/jit-md.h"

View File

@ -0,0 +1,5 @@
$OpenBSD: patch-config_i386_openbsd2_jit3-md_h,v 1.1 2003/05/23 05:03:46 pvalchev Exp $
--- config/i386/openbsd2/jit3-md.h.orig Sat May 17 09:40:57 2003
+++ config/i386/openbsd2/jit3-md.h Sat May 17 09:40:57 2003
@@ -0,0 +1 @@
+#include "i386/openbsd2/jit-md.h"

View File

@ -0,0 +1,76 @@
$OpenBSD: patch-ltconfig,v 1.1 2003/05/23 05:03:46 pvalchev Exp $
--- ltconfig.orig Thu Feb 24 19:28:35 2000
+++ ltconfig Mon May 19 19:19:34 2003
@@ -962,7 +962,9 @@ cygwin* | mingw*)
with_gnu_ld=no
fi
;;
-
+openbsd*)
+ with_gnu_ld=no
+ ;;
esac
ld_shlibs=yes
@@ -1292,10 +1294,28 @@ 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*)
+ archive_cmds="$archive_cmds~\$RANLIB -t \$lib"
+ postinstall_cmds='$RANLIB -t $lib'
+ ;;
+ *)
+ archive_cmds="$archive_cmds~\$RANLIB \$lib"
+ postinstall_cmds='$RANLIB $lib'
+ ;;
+ esac
+ case "$host_cpu" in
+ m88k|hppa|vax)
+ ld_shlibs=no
+ ;;
+ *)
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linkopts'
+ hardcode_libdir_flag_spec='${wl}-R$libdir'
+ export_dynamic_flag_spec='${wl}-E'
+ ;;
+ esac
;;
os2*)
@@ -1684,9 +1704,25 @@ netbsd*)
openbsd*)
version_type=sunos
- if test "$with_gnu_ld" = yes; then
- need_lib_prefix=no
- need_version=no
+ need_lib_prefix=no
+ need_version=yes
+ sys_lib_search_path_spec="/usr/lib"
+ sys_lib_dlsearch_path_spec="/usr/lib /usr/local/lib"
+ 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
library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'

View File

@ -0,0 +1,90 @@
$OpenBSD: patch-ltmain_sh,v 1.1 2003/05/23 05:03:46 pvalchev Exp $
--- ltmain.sh.orig Thu Feb 24 19:28:35 2000
+++ ltmain.sh Mon May 19 16:23:11 2003
@@ -999,6 +999,17 @@ compiler."
# These systems don't actually have c library (as such)
continue
;;
+ *-*-openbsd*)
+ # Do not include libc due to us having libc/libc_r.
+ continue
+ ;;
+ esac
+ elif test "$arg" = "-lc_r"; then
+ case "$host" in
+ *-*-openbsd*)
+ # Do not include libc_r directly, use -pthread flag.
+ continue
+ ;;
esac
elif test "$arg" = "-lm"; then
case "$host" in
@@ -1012,6 +1023,17 @@ compiler."
continue
;;
+ -pthread)
+ case $host in
+ *-*-openbsd*)
+ deplibs="$deplibs $arg"
+ ;;
+ *)
+ continue
+ ;;
+ esac
+ ;;
+
-module)
module=yes
continue
@@ -1031,6 +1053,9 @@ compiler."
$echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2
fast_install=no
;;
+ *-*-openbsd*)
+ # Do not include libc due to us having libc/libc_r.
+ ;;
*)
no_install=yes
;;
@@ -4200,40 +4225,6 @@ relink_command=\"$relink_command\""
# Exit here if they wanted silent mode.
test "$show" = : && exit 0
- echo "----------------------------------------------------------------------"
- echo "Libraries have been installed in:"
- for libdir in $libdirs; do
- echo " $libdir"
- done
- echo
- echo "If you ever happen to want to link against installed libraries"
- echo "in a given directory, LIBDIR, you must either use libtool, and"
- echo "specify the full pathname of the library, or use \`-LLIBDIR'"
- echo "flag during linking and do at least one of the following:"
- if test -n "$shlibpath_var"; then
- echo " - add LIBDIR to the \`$shlibpath_var' environment variable"
- echo " during execution"
- fi
- if test -n "$runpath_var"; then
- echo " - add LIBDIR to the \`$runpath_var' environment variable"
- echo " during linking"
- fi
- if test -n "$hardcode_libdir_flag_spec"; then
- libdir=LIBDIR
- eval flag=\"$hardcode_libdir_flag_spec\"
-
- echo " - use the \`$flag' linker flag"
- fi
- if test -n "$admincmds"; then
- echo " - have your system administrator run these commands:$admincmds"
- fi
- if test -f /etc/ld.so.conf; then
- echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
- fi
- echo
- echo "See any operating system documentation about shared libraries for"
- echo "more information, such as the ld(1) and ld.so(8) manual pages."
- echo "----------------------------------------------------------------------"
exit 0
;;