summaryrefslogtreecommitdiff
path: root/lang/ruby18/patches/patch-aa
blob: 85cdf4f3c3f5c3260a41815f9854fc7dbe2721c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
$NetBSD: patch-aa,v 1.2 2004/11/29 08:20:06 taca Exp $

--- configure.in.orig	2003-12-25 04:19:12.000000000 +0900
+++ configure.in
@@ -864,6 +864,12 @@ if test "$with_dln_a_out" != yes; then
 	osf*) 		: ${LDSHARED="ld -shared -expect_unresolved \"*\""}
 			rb_cv_dlopen=yes ;;
 	linux*) 	: ${LDSHARED="$CC -shared"}
+			if test "$rb_cv_binary_elf" = yes; then
+			    LDFLAGS="$LDFLAGS -Wl,-export-dynamic"
+			    DLDFLAGS="$DLDFLAGS "'-Wl,-soname,$(.TARGET)'
+			    LIBPATHFLAG=' -L%1$-s'
+			    RPATHFLAG=' -Wl,-R%1$-s'
+			fi
 			rb_cv_dlopen=yes ;;
 	gnu*)   	: ${LDSHARED="$CC -shared"}
 			rb_cv_dlopen=yes
@@ -879,6 +885,7 @@ if test "$with_dln_a_out" != yes; then
 	netbsd*)	: ${LDSHARED='${CC} -shared'}
 			if test "$rb_cv_binary_elf" = yes; then
 			    LDFLAGS="$LDFLAGS -Wl,-export-dynamic"
+			    DLDFLAGS="$DLDFLAGS "'-Wl,-soname,$(.TARGET)'
 			    LIBPATHFLAG=' -L%1$-s'
 			    RPATHFLAG=' -Wl,-R%1$-s'
 			fi
@@ -1157,6 +1164,7 @@ if test "$enable_shared" = 'yes'; then
 	;;
     linux*)
 	LIBRUBY_DLDFLAGS='-Wl,-soname,lib$(RUBY_SO_NAME).so.$(MAJOR).$(MINOR)'
+	LIBRUBYARG_SHARED='-Wl,-R -Wl,${libdir} -L${libdir} -L. -l$(RUBY_SO_NAME)'
 	LIBRUBY_ALIASES='lib$(RUBY_SO_NAME).so.$(MAJOR).$(MINOR) lib$(RUBY_SO_NAME).so'
 	;;
     gnu*)
@@ -1187,6 +1195,13 @@ if test "$enable_shared" = 'yes'; then
 	LIBRUBY_SO='lib$(RUBY_INSTALL_NAME).so.$(MAJOR).'`expr ${MINOR} \* 10 + ${TEENY}`
 	;;
     solaris*)
+	SOLIBS='$(LIBS)'
+	LIBRUBY_SO='lib$(RUBY_SO_NAME).so.$(MAJOR)'
+	LIBRUBY_ALIASES='lib$(RUBY_SO_NAME).so.$(MAJOR).$(MINOR).$(TEENY) lib$(RUBY_SO_NAME).so'
+	if test "$GCC" = yes; then
+	    LIBRUBY_DLDFLAGS="$DLDFLAGS "'-Wl,-h,$(.TARGET)'
+	    LIBRUBYARG_SHARED='-Wl,-R -Wl,${libdir} -L${libdir} -L. -l$(RUBY_SO_NAME)'
+	fi
 	XLDFLAGS="$XLDFLAGS "'-R${libdir}'
  	;;
     hpux*)