summaryrefslogtreecommitdiff
path: root/lang/ruby22-base/patches/patch-configure
blob: 4c8bf509ea7d6d754b6e5b29552f323afc8e1a7c (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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
$NetBSD: patch-configure,v 1.5 2017/07/06 16:35:05 taca Exp $

* Adding Interix support.
* Ignore doxygen.
* Pass LDFLAGS to LIBRUBY_DLDFLAGS via DLDFLAGS as Ruby 2.4 dose.

--- configure.orig	2017-03-28 07:53:45.000000000 +0000
+++ configure
@@ -5581,7 +5581,7 @@ esac
 else
     if test x"$target_alias" = x; then
 	case "$target_os" in #(
-  darwin*) :
+  notdarwin*) :
 
 	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for real target cpu" >&5
 $as_echo_n "checking for real target cpu... " >&6; }
@@ -7456,6 +7456,7 @@ fi
 
 
 
+: ${DLDFLAGS="$LDFLAGS"}
 
 case $RUBY_PATCHLEVEL in #(
   -*) :
@@ -8909,6 +8910,10 @@ esac
     	LIBS="-lm $LIBS"
 		ac_cv_func_round=no
 		 ;; #(
+  interix*) :
+	LIBS="-lm $LIBS"
+	ac_cv_func_getpgrp_void=yes
+		 ;; #(
   nacl) :
 
   LIBS="-lm $LIBS"
@@ -17004,6 +17009,8 @@ else
 # ifdef _MSC_VER
 #  include <malloc.h>
 #  define alloca _alloca
+# elif defined(__NetBSD__) || defined(__FreeBSD__) || defined(__DragonFly__) || defined(__OpenBSD__)
+#   include <stdlib.h>
 # else
 #  ifdef HAVE_ALLOCA_H
 #   include <alloca.h>
@@ -21293,7 +21300,9 @@ esac ;; #(
   interix*) :
     	: ${LDSHARED='$(CC) -shared'}
 			XLDFLAGS="$XLDFLAGS -Wl,-E"
+			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 ;; #(
   freebsd*|dragonfly*) :
 
@@ -22503,7 +22512,17 @@ esac
 	 ;; #(
   linux* | gnu* | k*bsd*-gnu | atheos* | kopensolaris*-gnu) :
 
-	LIBRUBY_DLDFLAGS='-Wl,-soname,lib$(RUBY_SO_NAME).so.$(MAJOR).$(MINOR)'" $LDFLAGS_OPTDIR"
+	# RUBY_APPEND_OPTIONS(LIBRUBY_DLDFLAGS)
+	for rb_opt in '-Wl,-soname,lib$(RUBY_SO_NAME).so.$(MAJOR).$(MINOR)' "$LDFLAGS_OPTDIR"; do
+	case " ${LIBRUBY_DLDFLAGS-} " in #(
+  *" ${rb_opt} "*) :
+     ;; #(
+  '  ') :
+     LIBRUBY_DLDFLAGS="${rb_opt}" ;; #(
+  *) :
+     LIBRUBY_DLDFLAGS="$LIBRUBY_DLDFLAGS ${rb_opt}" ;;
+esac
+	done
 	LIBRUBY_ALIASES='lib$(RUBY_SO_NAME).so.$(MAJOR).$(MINOR) lib$(RUBY_SO_NAME).so'
 	if test "$load_relative" = yes; then
 	    libprefix="'\$\${ORIGIN}/../${libdir_basename}'"
@@ -22514,7 +22533,7 @@ esac
   freebsd*|dragonfly*) :
 
 	SOLIBS='$(LIBS)'
-	LIBRUBY_SO='lib$(RUBY_SO_NAME).so.$(MAJOR)$(MINOR)'
+	LIBRUBY_SO='lib$(RUBY_SO_NAME).so.$(MAJOR)$(MINOR)$(TEENY)'
 	if test "$rb_cv_binary_elf" != "yes" ; then
 	    LIBRUBY_SO="$LIBRUBY_SO.\$(TEENY)"
 	    LIBRUBY_ALIASES=''
@@ -22524,7 +22543,17 @@ esac
 
 	SOLIBS='$(LIBS)'
 	LIBRUBY_SO='lib$(RUBY_SO_NAME).so.$(MAJOR)$(MINOR).$(TEENY)'
-	LIBRUBY_DLDFLAGS='-Wl,-soname,lib$(RUBY_SO_NAME).so.$(MAJOR)$(MINOR)'" $LDFLAGS_OPTDIR"
+	# RUBY_APPEND_OPTIONS(LIBRUBY_DLDFLAGS)
+	for rb_opt in '-Wl,-soname,lib$(RUBY_SO_NAME).so.$(MAJOR)$(MINOR)' "$LDFLAGS_OPTDIR"; do
+	case " ${LIBRUBY_DLDFLAGS-} " in #(
+  *" ${rb_opt} "*) :
+     ;; #(
+  '  ') :
+     LIBRUBY_DLDFLAGS="${rb_opt}" ;; #(
+  *) :
+     LIBRUBY_DLDFLAGS="$LIBRUBY_DLDFLAGS ${rb_opt}" ;;
+esac
+	done
 	if test "$rb_cv_binary_elf" = yes; then # ELF platforms
 	   LIBRUBY_ALIASES='lib$(RUBY_SO_NAME).so.$(MAJOR)$(MINOR) lib$(RUBY_SO_NAME).so'
 	else	# a.out platforms
@@ -22556,7 +22585,17 @@ esac
 	 ;; #(
   aix*) :
 
-	LIBRUBY_DLDFLAGS="${linker_flag}-bnoentry $XLDFLAGS $LDFLAGS_OPTDIR"
+	# RUBY_APPEND_OPTIONS(LIBRUBY_DLDFLAGS)
+	for rb_opt in "${linker_flag}-bnoentry" "$XLDFLAGS" "$LDFLAGS_OPTDIR"; do
+	case " ${LIBRUBY_DLDFLAGS-} " in #(
+  *" ${rb_opt} "*) :
+     ;; #(
+  '  ') :
+     LIBRUBY_DLDFLAGS="${rb_opt}" ;; #(
+  *) :
+     LIBRUBY_DLDFLAGS="$LIBRUBY_DLDFLAGS ${rb_opt}" ;;
+esac
+	done
 	LIBRUBYARG_SHARED='-L${libdir} -l${RUBY_SO_NAME}'
 	SOLIBS='-lm -lc'
 	 ;; #(
@@ -22565,7 +22604,7 @@ esac
 	case "$target_cpu" in #(
   powerpc*) :
 
-	    LIBRUBY_DLDFLAGS="-f ruby.exp -lnet -lbe -lroot glue-noinit.a init_term_dyn.o start_dyn.o $LDFLAGS_OPTDIR"
+	    LIBRUBY_DLDFLAGS="$LIBRUBY_DLDFLAGS -f ruby.exp -lnet -lbe -lroot glue-noinit.a init_term_dyn.o start_dyn.o $LDFLAGS_OPTDIR"
 	     ;; #(
   *) :
      ;;
@@ -22593,7 +22632,12 @@ esac
 	 ;; #(
   interix*) :
 
-	LIBRUBYARG_SHARED='-L. -L${libdir} -l$(RUBY_SO_NAME)'
+	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,${PREFIX}/lib} -L${libdir} -L. -l$(RUBY_SO_NAME)'
+	LIBRUBY_ALIASES='lib$(RUBY_SO_NAME).so.$(MAJOR)$(MINOR) lib$(RUBY_SO_NAME).so'
 	 ;; #(
   mingw*|cygwin*|mswin*) :
 
@@ -22766,7 +22810,7 @@ if test "$enable_rpath" = yes; then
 esac
     rpathflag=`IFS="$PATH_SEPARATOR"
         echo x "$rpathflag" |
-        sed "s/^x *//;s${IFS}"'%1\\$-s'"${IFS}${libprefix}${IFS}g;s${IFS}%s${IFS}${libprefix}${IFS}g"
+        sed "s/^x *//;s${IFS}"'%1\\$-s'"${IFS}${libprefix}${IFS}g;s${IFS}%s${IFS}${PREFIX}/lib${IFS}g"
     `
     LIBRUBY_RPATHFLAGS="$LIBRUBY_RPATHFLAGS${rpathflag}"
     LIBRUBYARG_SHARED="$LIBRUBY_RPATHFLAGS $LIBRUBYARG_SHARED"
@@ -23085,11 +23129,7 @@ if test "$install_doc" != no; then
     else
 	RDOCTARGET="nodoc"
     fi
-    if test "$install_capi" != no -a -n "$DOXYGEN"; then
-	CAPITARGET="capi"
-    else
-	CAPITARGET="nodoc"
-    fi
+    CAPITARGET="nodoc"
 else
     RDOCTARGET="nodoc"
     CAPITARGET="nodoc"
@@ -25195,17 +25235,7 @@ which seems to be undefined.  Please mak
     "Makefile":F)
     tmpmk=confmk$$.tmp
     {
-	if test ${VCS+set}; then
-	    :
-	elif svn info "$srcdir" > /dev/null 2>&1; then
-	    VCS='svn'
-	elif test -d "$srcdir/.git/svn"; then
-	    VCS='git svn'
-	elif test -d "$srcdir/.git"; then
-	    VCS='git'
-	else
-	    VCS='echo cannot'
-	fi
+	VCS='echo cannot'
 	case "$VCS" in #(
   svn) :
     VCSUP='$(VCS) up $(SVNUPOPTIONS)' ;; #(