summaryrefslogtreecommitdiff
path: root/lang/ruby18/patches/patch-aa
blob: ec13d083ee854be4dc591f88b7abec6557660201 (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
48
49
50
51
52
$NetBSD: patch-aa,v 1.5 2005/01/23 17:33:19 taca Exp $

--- configure.in.orig	2004-12-23 00:16:55.000000000 +0900
+++ configure.in
@@ -321,6 +321,9 @@ msdosdjgpp*)	LIBS="-lm $LIBS"
 		ac_cv_func_getpgrp_void=yes
 		ac_cv_func_setitimer=no
 		;;
+interix3*)	LIBS="-lm $LIBS"
+		ac_cv_func_getpgrp_void=yes
+		;;
 freebsd*)	LIBS="-lm $LIBS"
 		AC_CACHE_CHECK([whether -lxpg4 has to be linked],
 		  rb_cv_lib_xpg4_needed,
@@ -813,7 +816,7 @@ if test "$with_dln_a_out" != yes; then
     openstep*)	CCDLFLAGS="$CCDLFLAGS -fno-common";;
     rhapsody*)	CCDLFLAGS="$CCDLFLAGS -fno-common";;
     darwin*)	CCDLFLAGS="$CCDLFLAGS -fno-common";;
-    human*|bsdi*|beos*|cygwin*|mingw*|aix*|interix*) ;;
+    human*|interix3*|bsdi*|beos*|cygwin*|mingw*|aix*|interix*) ;;
     *) CCDLFLAGS="$CCDLFLAGS -fPIC";;
     esac
   else
@@ -875,6 +878,13 @@ if test "$with_dln_a_out" != yes; then
 			  test "$GCC" = yes && test "$rb_cv_prog_gnu_ld" = yes || LDSHARED="ld -Bshareable"
 			fi
 			rb_cv_dlopen=yes ;;
+	interix3*)	: ${LDSHARED='${CC} -shared'}
+			LDFLAGS="$LDFLAGS -Wl,-E"
+			# use special random-slot linkage in 0x[56]XXXXXXX
+			DLDFLAGS="$DLDFLAGS "'-Wl,-h,$(.TARGET) -Wl,--image-base,$$(($$RANDOM %4096/2*262144+1342177280))'
+			LIBPATHFLAG=' -L%1$-s'
+			RPATHFLAG=' -Wl,-R%1$-s'
+			rb_cv_dlopen=yes ;;
 	openbsd*) 	: ${LDSHARED="\$(CC) -shared ${CCDLFLAGS}"}
 			if test "$rb_cv_binary_elf" = yes; then
 			    LDFLAGS="$LDFLAGS -Wl,-E"
@@ -1172,6 +1182,14 @@ if test "$enable_shared" = 'yes'; then
 	   LIBRUBY_ALIASES=""
 	fi
  	;;
+    interix3*)
+	SOLIBS='$(LIBS)'
+	LIBRUBY_SO='lib$(RUBY_SO_NAME).so.$(MAJOR)$(MINOR).$(TEENY)'
+	# link explicitly to 0x48000000
+	LIBRUBY_DLDFLAGS='-Wl,-h,lib$(RUBY_SO_NAME).so.$(MAJOR)$(MINOR) -Wl,--image-base,1207959552'
+	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'
+ 	;;
     openbsd*)
 	SOLIBS='$(LIBS)'
 	LIBRUBY_SO='lib$(RUBY_INSTALL_NAME).so.$(MAJOR).'`expr ${MINOR} \* 10 + ${TEENY}`