summaryrefslogtreecommitdiff
path: root/lang/ruby18-base/patches/patch-aa
blob: ff3968357efb3b048fc36e01d0defe6b5a9f71dd (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
53
54
$NetBSD: patch-aa,v 1.8 2007/03/15 16:41:30 taca Exp $

--- configure.in.orig	2007-02-28 22:23:42.000000000 +0900
+++ configure.in
@@ -416,6 +416,9 @@ msdosdjgpp*)	LIBS="-lm $LIBS"
 		;;
 bsdi*)          LIBS="-lm $LIBS"
                 ac_cv_sizeof_rlim_t=8;;
+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,
@@ -1021,6 +1024,13 @@ if test "$with_dln_a_out" != yes; then
 			    LDFLAGS="$LDFLAGS -Wl,-export-dynamic"
 			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 ;;
 	interix*) 	: ${LDSHARED="$CC -shared"}
 			XLDFLAGS="$XLDFLAGS -Wl,-E"
 			LIBPATHFLAG=" -L'%1\$-s'"
@@ -1383,6 +1393,14 @@ if test "$enable_shared" = 'yes'; then
 	LIBRUBY_DLDFLAGS='-install_name $(libdir)/lib$(RUBY_SO_NAME).dylib -current_version $(MAJOR).$(MINOR).$(TEENY) -compatibility_version $(MAJOR).$(MINOR)'
 	LIBRUBY_ALIASES='lib$(RUBY_SO_NAME).$(MAJOR).$(MINOR).dylib lib$(RUBY_SO_NAME).dylib'
 	;;
+    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'
+ 	;;
     interix*)
 	LIBRUBYARG_SHARED='-L${libdir} -L. -l$(RUBY_SO_NAME)'
 	;;
@@ -1393,8 +1411,10 @@ fi
 if test "$enable_rpath" = yes; then
     if test "$GCC" = yes; then
        LIBRUBYARG_SHARED='-Wl,-R -Wl,$(libdir) -L$(libdir) -L. '"$LIBRUBYARG_SHARED"
+       LIBRUBY_DLDFLAGS='-Wl,-R -Wl,$(libdir) -L$(libdir) -L. '"$LIBRUBY_DLDFLAGS"
     else
        LIBRUBYARG_SHARED='-R $(libdir) -L$(libdir) -L. '"$LIBRUBYARG_SHARED"
+       LIBRUBY_DLDFLAGS='-R $(libdir) -L$(libdir) -L. '"$LIBRUBY_DLDFLAGS"
     fi
 fi