Gentoo Archives: gentoo-commits

From: "Alexis Ballier (aballier)" <aballier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-lang/ocaml/files: ocaml-3.11.0_beta1-call-ld-with-proper-ldflags.patch ocaml-3.11.0_beta1-configure.patch ocaml-3.11.0_beta1-exec-stack-fixes.patch
Date: Wed, 15 Oct 2008 16:09:02
Message-Id: E1Kq8vg-0006B3-Tg@stork.gentoo.org
1 aballier 08/10/15 16:08:56
2
3 Added:
4 ocaml-3.11.0_beta1-call-ld-with-proper-ldflags.patch
5 ocaml-3.11.0_beta1-configure.patch
6 ocaml-3.11.0_beta1-exec-stack-fixes.patch
7 Log:
8 New upstream beta release
9 (Portage version: 2.2_rc12/cvs/Linux 2.6.26.6 x86_64)
10
11 Revision Changes Path
12 1.1 dev-lang/ocaml/files/ocaml-3.11.0_beta1-call-ld-with-proper-ldflags.patch
13
14 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-lang/ocaml/files/ocaml-3.11.0_beta1-call-ld-with-proper-ldflags.patch?rev=1.1&view=markup
15 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-lang/ocaml/files/ocaml-3.11.0_beta1-call-ld-with-proper-ldflags.patch?rev=1.1&content-type=text/plain
16
17 Index: ocaml-3.11.0_beta1-call-ld-with-proper-ldflags.patch
18 ===================================================================
19 As we now support LDFLAGS in NATIVECCLINKOPTS
20 it can happen that -Wl,--foo,--bar option is in that variable
21 As ocaml happens to call ld with NATIVECCLINKOPTS
22 we have to "translate" it so that ld doesn't bail out with unrecognized option
23 Initial patch from Julien Cristau : http://caml.inria.fr/mantis/view.php?id=4142
24 Modified a bit to catch comma separated options
25 Index: ocaml-3.11.0+beta1/configure
26 ===================================================================
27 --- ocaml-3.11.0+beta1.orig/configure
28 +++ ocaml-3.11.0+beta1/configure
29 @@ -1503,6 +1503,7 @@ fi
30 bytecccompopts="$CFLAGS $bytecccompopts"
31 bytecclinkopts="$LDFLAGS $bytecclinkopts"
32 natdynlinkopts="$LDFLAGS $natdynlinkopts"
33 +nativeccrawlinkopts="$RAW_LDFLAGS $nativecclinkopts"
34 nativecclinkopts="$LDFLAGS $nativecclinkopts"
35 nativecccompopts="$CFLAGS $nativecccompopts"
36 nativeccprofopts="$nativecccompopts"
37 @@ -1553,7 +1554,7 @@ echo "DEBUGGER=$debugger" >> Makefile
38 echo "CC_PROFILE=$cc_profile" >> Makefile
39 echo "SYSTHREAD_SUPPORT=$systhread_support" >> Makefile
40 echo "PARTIALLD=$partialld" >> Makefile
41 -echo "PACKLD=\$(PARTIALLD) \$(NATIVECCLINKOPTS) -o " >> Makefile
42 +echo "PACKLD=\$(PARTIALLD) $nativeccrawlinkopts -o " >> Makefile
43 echo "DLLCCCOMPOPTS=$dllccompopts" >> Makefile
44 echo "IFLEXDIR=$iflexdir" >> Makefile
45 echo "O=o" >> Makefile
46
47
48
49 1.1 dev-lang/ocaml/files/ocaml-3.11.0_beta1-configure.patch
50
51 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-lang/ocaml/files/ocaml-3.11.0_beta1-configure.patch?rev=1.1&view=markup
52 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-lang/ocaml/files/ocaml-3.11.0_beta1-configure.patch?rev=1.1&content-type=text/plain
53
54 Index: ocaml-3.11.0_beta1-configure.patch
55 ===================================================================
56 Index: ocaml-3.11.0+beta1/configure
57 ===================================================================
58 --- ocaml-3.11.0+beta1.orig/configure
59 +++ ocaml-3.11.0+beta1/configure
60 @@ -1494,6 +1494,11 @@ fi
61
62 # Final twiddling of compiler options to work around known bugs
63
64 +bytecccompopts="$CFLAGS $bytecccompopts"
65 +bytecclinkopts="$LDFLAGS $bytecclinkopts"
66 +natdynlinkopts="$LDFLAGS $natdynlinkopts"
67 +nativecclinkopts="$LDFLAGS $nativecclinkopts"
68 +nativecccompopts="$CFLAGS $nativecccompopts"
69 nativeccprofopts="$nativecccompopts"
70 case "$buggycc" in
71 gcc.2.96)
72
73
74
75 1.1 dev-lang/ocaml/files/ocaml-3.11.0_beta1-exec-stack-fixes.patch
76
77 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-lang/ocaml/files/ocaml-3.11.0_beta1-exec-stack-fixes.patch?rev=1.1&view=markup
78 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-lang/ocaml/files/ocaml-3.11.0_beta1-exec-stack-fixes.patch?rev=1.1&content-type=text/plain
79
80 Index: ocaml-3.11.0_beta1-exec-stack-fixes.patch
81 ===================================================================
82 Index: ocaml-3.10.0/asmcomp/alpha/emit.mlp
83 ===================================================================
84 --- ocaml-3.10.0.orig/asmcomp/alpha/emit.mlp
85 +++ ocaml-3.10.0/asmcomp/alpha/emit.mlp
86 @@ -811,6 +811,11 @@ let data l =
87 ` .data\n`;
88 List.iter emit_item l
89
90 +(* Mark stack as non executable *)
91 +let nx_stack() =
92 + if Config.system = "linux" then
93 + ` .section .note.GNU-stack,\"\",%progbits\n`
94 +
95 (* Beginning / end of an assembly file *)
96
97 let begin_assembly() =
98 @@ -843,6 +848,7 @@ let begin_assembly() =
99 `{emit_symbol lbl_begin}:\n`
100
101 let end_assembly () =
102 + nx_stack();
103 let lbl_end = Compilenv.make_symbol (Some "code_end") in
104 ` .text\n`;
105 ` .globl {emit_symbol lbl_end}\n`;
106 Index: ocaml-3.10.0/asmrun/alpha.S
107 ===================================================================
108 --- ocaml-3.10.0.orig/asmrun/alpha.S
109 +++ ocaml-3.10.0/asmrun/alpha.S
110 @@ -438,3 +438,7 @@ caml_system__frametable:
111 .word -1 /* negative frame size => use callback link */
112 .word 0 /* no roots here */
113 .align 3
114 +
115 +#ifdef __ELF__
116 +.section .note.GNU-stack,"",%progbits
117 +#endif
118 Index: ocaml-3.10.0/asmrun/arm.S
119 ===================================================================
120 --- ocaml-3.10.0.orig/asmrun/arm.S
121 +++ ocaml-3.10.0/asmrun/arm.S
122 @@ -337,3 +337,7 @@ caml_system__frametable:
123 .short -1 /* negative frame size => use callback link */
124 .short 0 /* no roots */
125 .align 2
126 +
127 +#ifdef __ELF__
128 +.section .note.GNU-stack,"",%progbits
129 +#endif
130 Index: ocaml-3.10.0/asmrun/hppa.S
131 ===================================================================
132 --- ocaml-3.10.0.orig/asmrun/hppa.S
133 +++ ocaml-3.10.0/asmrun/hppa.S
134 @@ -532,3 +532,8 @@ G(caml_system__frametable):
135 .long L104 + 3 /* return address into callback */
136 .short -1 /* negative frame size => use callback link */
137 .short 0 /* no roots */
138 +
139 +#ifdef __ELF__
140 +.section .note.GNU-stack,"",%progbits
141 +#endif
142 +
143 Index: ocaml-3.10.0/asmrun/ia64.S
144 ===================================================================
145 --- ocaml-3.10.0.orig/asmrun/ia64.S
146 +++ ocaml-3.10.0/asmrun/ia64.S
147 @@ -528,3 +528,8 @@ caml_system__frametable:
148
149 .common caml_saved_bsp#, 8, 8
150 .common caml_saved_rnat#, 8, 8
151 +
152 +#ifdef __ELF__
153 +.section .note.GNU-stack,"",%progbits
154 +#endif
155 +
156 Index: ocaml-3.10.0/asmrun/m68k.S
157 ===================================================================
158 --- ocaml-3.10.0.orig/asmrun/m68k.S
159 +++ ocaml-3.10.0/asmrun/m68k.S
160 @@ -242,3 +242,8 @@ _caml_system__frametable:
161 .long L107 | return address into callback
162 .word -1 | negative frame size => use callback link
163 .word 0 | no roots here
164 +
165 +#ifdef __ELF__
166 +.section .note.GNU-stack,"",%progbits
167 +#endif
168 +
169 Index: ocaml-3.10.0/asmrun/power-elf.S
170 ===================================================================
171 --- ocaml-3.10.0.orig/asmrun/power-elf.S
172 +++ ocaml-3.10.0/asmrun/power-elf.S
173 @@ -419,3 +419,7 @@ caml_system__frametable:
174 .short -1 /* negative size count => use callback link */
175 .short 0 /* no roots here */
176
177 +#ifdef __ELF__
178 +.section .note.GNU-stack,"",%progbits
179 +#endif
180 +
181 Index: ocaml-3.10.0/asmrun/sparc.S
182 ===================================================================
183 --- ocaml-3.10.0.orig/asmrun/sparc.S
184 +++ ocaml-3.10.0/asmrun/sparc.S
185 @@ -405,3 +405,8 @@ Caml_system__frametable:
186 .type Caml_raise_exception, #function
187 .type Caml_system__frametable, #object
188 #endif
189 +
190 +#ifdef __ELF__
191 +.section .note.GNU-stack,"",%progbits
192 +#endif
193 +
194 Index: ocaml-3.10.0/asmcomp/arm/emit.mlp
195 ===================================================================
196 --- ocaml-3.10.0.orig/asmcomp/arm/emit.mlp
197 +++ ocaml-3.10.0/asmcomp/arm/emit.mlp
198 @@ -642,6 +642,13 @@ let data l =
199 ` .data\n`;
200 List.iter emit_item l
201
202 +(* Mark stack as non executable *)
203 +let nx_stack() =
204 + if Config.system = "linux" then
205 + ` .section .note.GNU-stack,\"\",%progbits\n`
206 +
207 +
208 +
209 (* Beginning / end of an assembly file *)
210
211 let begin_assembly() =
212 @@ -661,6 +668,7 @@ let begin_assembly() =
213 `{emit_symbol lbl_begin}:\n`
214
215 let end_assembly () =
216 + nx_stack();
217 let lbl_end = Compilenv.make_symbol (Some "code_end") in
218 ` .text\n`;
219 ` .global {emit_symbol lbl_end}\n`;
220 Index: ocaml-3.10.0/asmcomp/hppa/emit.mlp
221 ===================================================================
222 --- ocaml-3.10.0.orig/asmcomp/hppa/emit.mlp
223 +++ ocaml-3.10.0/asmcomp/hppa/emit.mlp
224 @@ -994,6 +994,12 @@ let data l =
225 ` .data\n`;
226 List.iter emit_item l
227
228 +(* Mark stack as non executable *)
229 +let nx_stack() =
230 + if Config.system = "linux" then
231 + ` .section .note.GNU-stack,\"\",%progbits\n`
232 +
233 +
234 (* Beginning / end of an assembly file *)
235
236 let begin_assembly() =
237 @@ -1022,6 +1028,7 @@ let begin_assembly() =
238
239
240 let end_assembly() =
241 + nx_stack();
242 ` .code\n`;
243 let lbl_end = Compilenv.make_symbol (Some "code_end") in
244 declare_global lbl_end;
245 Index: ocaml-3.10.0/asmcomp/ia64/emit.mlp
246 ===================================================================
247 --- ocaml-3.10.0.orig/asmcomp/ia64/emit.mlp
248 +++ ocaml-3.10.0/asmcomp/ia64/emit.mlp
249 @@ -1306,6 +1306,11 @@ let data l =
250 ` .align 8\n`;
251 List.iter emit_item l
252
253 +(* Mark stack as non executable *)
254 +let nx_stack() =
255 + if Config.system = "linux" then
256 + ` .section .note.GNU-stack,\"\",%progbits\n`
257 +
258 (* Beginning / end of an assembly file *)
259
260 let begin_assembly() =
261 @@ -1315,6 +1320,7 @@ let begin_assembly() =
262 emit_define_symbol (Compilenv.make_symbol (Some "code_begin"))
263
264 let end_assembly () =
265 + nx_stack();
266 ` .data\n`;
267 emit_define_symbol (Compilenv.make_symbol (Some "data_end"));
268 ` .text\n`;
269 Index: ocaml-3.10.0/asmcomp/power/emit.mlp
270 ===================================================================
271 --- ocaml-3.10.0.orig/asmcomp/power/emit.mlp
272 +++ ocaml-3.10.0/asmcomp/power/emit.mlp
273 @@ -916,6 +916,12 @@ let data l =
274 emit_string data_space;
275 List.iter emit_item l
276
277 +(* Mark stack as non executable *)
278 +let nx_stack() =
279 + if Config.system = "elf" then
280 + ` .section .note.GNU-stack,\"\",%progbits\n`
281 +
282 +
283 (* Beginning / end of an assembly file *)
284
285 let begin_assembly() =
286 @@ -932,6 +938,7 @@ let begin_assembly() =
287 `{emit_symbol lbl_begin}:\n`
288
289 let end_assembly() =
290 + nx_stack();
291 if pic_externals then
292 (* Emit the pointers to external functions *)
293 StringSet.iter emit_external !external_functions;
294 Index: ocaml-3.10.0/asmcomp/sparc/emit.mlp
295 ===================================================================
296 --- ocaml-3.10.0.orig/asmcomp/sparc/emit.mlp
297 +++ ocaml-3.10.0/asmcomp/sparc/emit.mlp
298 @@ -741,6 +741,12 @@ let data l =
299 ` .data\n`;
300 List.iter emit_item l
301
302 +(* Mark stack as non executable *)
303 +let nx_stack() =
304 + if Config.system = "linux" then
305 + ` .section .note.GNU-stack,\"\",%progbits\n`
306 +
307 +
308 (* Beginning / end of an assembly file *)
309
310 let begin_assembly() =
311 @@ -754,6 +760,7 @@ let begin_assembly() =
312 `{emit_symbol lbl_begin}:\n`
313
314 let end_assembly() =
315 + nx_stack();
316 ` .text\n`;
317 let lbl_end = Compilenv.make_symbol (Some "code_end") in
318 ` .global {emit_symbol lbl_end}\n`;