summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-12-31 10:53:14 +0000
committerknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-12-31 10:53:14 +0000
commit969bb67169be00b51533884b30376f7bcebefbf1 (patch)
treed2244b6c6a8ed4f60bc3fbc483fa0bbaa4d93112
parent653b0c120fb2ef2f1efe9df3c68c3e5cdb4afe09 (diff)
* configure.in: Improve OpenBSD support. [obtained from: OpenBSD
ports] * dln.c (FUNCNAME_PATTERN): Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3252 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog7
-rw-r--r--configure.in10
-rw-r--r--dln.c2
3 files changed, 15 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 032034ac71..8ec02aeb4a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Tue Dec 31 19:48:21 2002 Akinori MUSHA <knu@iDaemons.org>
+
+ * configure.in: Improve OpenBSD support. [obtained from: OpenBSD
+ ports]
+
+ * dln.c (FUNCNAME_PATTERN): Ditto.
+
Tue Dec 31 19:21:02 2002 Akinori MUSHA <knu@iDaemons.org>
* array.c (rb_ary_transpose): Properly declare ary as a VALUE.
diff --git a/configure.in b/configure.in
index 63587211e1..7feac258b4 100644
--- a/configure.in
+++ b/configure.in
@@ -662,7 +662,7 @@ linux*)
else
LDFLAGS="-rdynamic"
fi;;
-netbsd*)
+netbsd*|openbsd*)
if [[ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]]
then
netbsd_elf=yes
@@ -758,7 +758,10 @@ if test "$with_dln_a_out" != yes; then
LIBPATHFLAG=' -L%1$-s -Wl,-R%1$-s'
fi
rb_cv_dlopen=yes ;;
- openbsd*) LDSHARED="ld -Bforcearchive -Bshareable"
+ openbsd*) LDSHARED="\$(CC) -shared ${CCDLFLAGS}"
+ if test "$rb_cv_binary_elf" = yes; then
+ LDFLAGS="-Wl,-E"
+ fi
rb_cv_dlopen=yes ;;
bsdi3*) case "$CC" in
*shlicc*) LDSHARED="$CC -r"
@@ -1056,7 +1059,8 @@ if test "$enable_shared" = 'yes'; then
;;
openbsd*)
SOLIBS='$(LIBS)'
- ;;
+ LIBRUBY_SO='lib$(RUBY_INSTALL_NAME).so.$(MAJOR).'`expr ${MINOR} \* 10 + ${TEENY}`
+ ;;
solaris*)
XLDFLAGS='-R${libdir}'
;;
diff --git a/dln.c b/dln.c
index af87a2e727..cf8295fc50 100644
--- a/dln.c
+++ b/dln.c
@@ -97,7 +97,7 @@ int eaccess();
#endif
#ifndef FUNCNAME_PATTERN
-# if defined(__hp9000s300) || (defined(__NetBSD__) && !defined(__ELF__)) || defined(__BORLANDC__) || (defined(__FreeBSD__) && !defined(__ELF__)) || defined(__OpenBSD__) || defined(NeXT) || defined(__WATCOMC__) || defined(__APPLE__)
+# if defined(__hp9000s300) || (defined(__NetBSD__) && !defined(__ELF__)) || defined(__BORLANDC__) || (defined(__FreeBSD__) && !defined(__ELF__)) || (defined(__OpenBSD__) && !defined(__ELF__)) || defined(NeXT) || defined(__WATCOMC__) || defined(__APPLE__)
# define FUNCNAME_PATTERN "_Init_%s"
# else
# define FUNCNAME_PATTERN "Init_%s"