Gentoo Archives: gentoo-commits

From: "Alexis Ballier (aballier)" <aballier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo commit in src/patchsets/ocaml/3.11.1: 010_all_execstacks.patch 020_all_configure.patch 030_all_automagic.patch 040_all_yaccldflags.patch series
Date: Sat, 20 Jun 2009 14:47:14
Message-Id: E1MI1qV-0005XN-Gj@stork.gentoo.org
1 aballier 09/06/20 14:47:07
2
3 Added: 010_all_execstacks.patch 020_all_configure.patch
4 030_all_automagic.patch 040_all_yaccldflags.patch
5 series
6 Log:
7 make ocaml patches a tarball, host them in cvs
8
9 Revision Changes Path
10 1.1 src/patchsets/ocaml/3.11.1/010_all_execstacks.patch
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/ocaml/3.11.1/010_all_execstacks.patch?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/ocaml/3.11.1/010_all_execstacks.patch?rev=1.1&content-type=text/plain
14
15 Index: 010_all_execstacks.patch
16 ===================================================================
17 Fix the EXEC_STACK in ocaml compiled binaries (#153382)
18
19 Index: ocaml-3.11.1/asmcomp/alpha/emit.mlp
20 ===================================================================
21 --- ocaml-3.11.1.orig/asmcomp/alpha/emit.mlp
22 +++ ocaml-3.11.1/asmcomp/alpha/emit.mlp
23 @@ -811,6 +811,11 @@ let data l =
24 ` .data\n`;
25 List.iter emit_item l
26
27 +(* Mark stack as non executable *)
28 +let nx_stack() =
29 + if Config.system = "linux" then
30 + ` .section .note.GNU-stack,\"\",%progbits\n`
31 +
32 (* Beginning / end of an assembly file *)
33
34 let begin_assembly() =
35 @@ -843,6 +848,7 @@ let begin_assembly() =
36 `{emit_symbol lbl_begin}:\n`
37
38 let end_assembly () =
39 + nx_stack();
40 let lbl_end = Compilenv.make_symbol (Some "code_end") in
41 ` .text\n`;
42 ` .globl {emit_symbol lbl_end}\n`;
43 Index: ocaml-3.11.1/asmrun/alpha.S
44 ===================================================================
45 --- ocaml-3.11.1.orig/asmrun/alpha.S
46 +++ ocaml-3.11.1/asmrun/alpha.S
47 @@ -438,3 +438,7 @@ caml_system__frametable:
48 .word -1 /* negative frame size => use callback link */
49 .word 0 /* no roots here */
50 .align 3
51 +
52 +#ifdef __ELF__
53 +.section .note.GNU-stack,"",%progbits
54 +#endif
55 Index: ocaml-3.11.1/asmrun/arm.S
56 ===================================================================
57 --- ocaml-3.11.1.orig/asmrun/arm.S
58 +++ ocaml-3.11.1/asmrun/arm.S
59 @@ -342,3 +342,7 @@ caml_system__frametable:
60 .short -1 /* negative frame size => use callback link */
61 .short 0 /* no roots */
62 .align 2
63 +
64 +#ifdef __ELF__
65 +.section .note.GNU-stack,"",%progbits
66 +#endif
67 Index: ocaml-3.11.1/asmrun/hppa.S
68 ===================================================================
69 --- ocaml-3.11.1.orig/asmrun/hppa.S
70 +++ ocaml-3.11.1/asmrun/hppa.S
71 @@ -532,3 +532,8 @@ G(caml_system__frametable):
72 .long L104 + 3 /* return address into callback */
73 .short -1 /* negative frame size => use callback link */
74 .short 0 /* no roots */
75 +
76 +#ifdef __ELF__
77 +.section .note.GNU-stack,"",%progbits
78 +#endif
79 +
80 Index: ocaml-3.11.1/asmrun/ia64.S
81 ===================================================================
82 --- ocaml-3.11.1.orig/asmrun/ia64.S
83 +++ ocaml-3.11.1/asmrun/ia64.S
84 @@ -528,3 +528,8 @@ caml_system__frametable:
85
86 .common caml_saved_bsp#, 8, 8
87 .common caml_saved_rnat#, 8, 8
88 +
89 +#ifdef __ELF__
90 +.section .note.GNU-stack,"",%progbits
91 +#endif
92 +
93 Index: ocaml-3.11.1/asmrun/m68k.S
94 ===================================================================
95 --- ocaml-3.11.1.orig/asmrun/m68k.S
96 +++ ocaml-3.11.1/asmrun/m68k.S
97 @@ -242,3 +242,8 @@ _caml_system__frametable:
98 .long L107 | return address into callback
99 .word -1 | negative frame size => use callback link
100 .word 0 | no roots here
101 +
102 +#ifdef __ELF__
103 +.section .note.GNU-stack,"",%progbits
104 +#endif
105 +
106 Index: ocaml-3.11.1/asmrun/power-elf.S
107 ===================================================================
108 --- ocaml-3.11.1.orig/asmrun/power-elf.S
109 +++ ocaml-3.11.1/asmrun/power-elf.S
110 @@ -419,3 +419,7 @@ caml_system__frametable:
111 .short -1 /* negative size count => use callback link */
112 .short 0 /* no roots here */
113
114 +#ifdef __ELF__
115 +.section .note.GNU-stack,"",%progbits
116 +#endif
117 +
118 Index: ocaml-3.11.1/asmrun/sparc.S
119 ===================================================================
120 --- ocaml-3.11.1.orig/asmrun/sparc.S
121 +++ ocaml-3.11.1/asmrun/sparc.S
122 @@ -405,3 +405,8 @@ Caml_system__frametable:
123 .type Caml_raise_exception, #function
124 .type Caml_system__frametable, #object
125 #endif
126 +
127 +#ifdef __ELF__
128 +.section .note.GNU-stack,"",%progbits
129 +#endif
130 +
131 Index: ocaml-3.11.1/asmcomp/arm/emit.mlp
132 ===================================================================
133 --- ocaml-3.11.1.orig/asmcomp/arm/emit.mlp
134 +++ ocaml-3.11.1/asmcomp/arm/emit.mlp
135 @@ -642,6 +642,13 @@ let data l =
136 ` .data\n`;
137 List.iter emit_item l
138
139 +(* Mark stack as non executable *)
140 +let nx_stack() =
141 + if Config.system = "linux" then
142 + ` .section .note.GNU-stack,\"\",%progbits\n`
143 +
144 +
145 +
146 (* Beginning / end of an assembly file *)
147
148 let begin_assembly() =
149 @@ -658,6 +665,7 @@ let begin_assembly() =
150 `{emit_symbol lbl_begin}:\n`
151
152 let end_assembly () =
153 + nx_stack();
154 let lbl_end = Compilenv.make_symbol (Some "code_end") in
155 ` .text\n`;
156 ` .global {emit_symbol lbl_end}\n`;
157 Index: ocaml-3.11.1/asmcomp/hppa/emit.mlp
158 ===================================================================
159 --- ocaml-3.11.1.orig/asmcomp/hppa/emit.mlp
160 +++ ocaml-3.11.1/asmcomp/hppa/emit.mlp
161 @@ -994,6 +994,12 @@ let data l =
162 ` .data\n`;
163 List.iter emit_item l
164
165 +(* Mark stack as non executable *)
166 +let nx_stack() =
167 + if Config.system = "linux" then
168 + ` .section .note.GNU-stack,\"\",%progbits\n`
169 +
170 +
171 (* Beginning / end of an assembly file *)
172
173 let begin_assembly() =
174 @@ -1022,6 +1028,7 @@ let begin_assembly() =
175
176
177 let end_assembly() =
178 + nx_stack();
179 ` .code\n`;
180 let lbl_end = Compilenv.make_symbol (Some "code_end") in
181 declare_global lbl_end;
182 Index: ocaml-3.11.1/asmcomp/ia64/emit.mlp
183 ===================================================================
184 --- ocaml-3.11.1.orig/asmcomp/ia64/emit.mlp
185 +++ ocaml-3.11.1/asmcomp/ia64/emit.mlp
186 @@ -1306,6 +1306,11 @@ let data l =
187 ` .align 8\n`;
188 List.iter emit_item l
189
190 +(* Mark stack as non executable *)
191 +let nx_stack() =
192 + if Config.system = "linux" then
193 + ` .section .note.GNU-stack,\"\",%progbits\n`
194 +
195 (* Beginning / end of an assembly file *)
196
197 let begin_assembly() =
198 @@ -1315,6 +1320,7 @@ let begin_assembly() =
199 emit_define_symbol (Compilenv.make_symbol (Some "code_begin"))
200
201 let end_assembly () =
202 + nx_stack();
203 ` .data\n`;
204 emit_define_symbol (Compilenv.make_symbol (Some "data_end"));
205 ` .text\n`;
206 Index: ocaml-3.11.1/asmcomp/power/emit.mlp
207 ===================================================================
208 --- ocaml-3.11.1.orig/asmcomp/power/emit.mlp
209 +++ ocaml-3.11.1/asmcomp/power/emit.mlp
210 @@ -920,6 +920,12 @@ let data l =
211 emit_string data_space;
212 List.iter emit_item l
213
214 +(* Mark stack as non executable *)
215 +let nx_stack() =
216 + if Config.system = "elf" then
217 + ` .section .note.GNU-stack,\"\",%progbits\n`
218 +
219 +
220 (* Beginning / end of an assembly file *)
221
222 let begin_assembly() =
223 @@ -936,6 +942,7 @@ let begin_assembly() =
224 `{emit_symbol lbl_begin}:\n`
225
226 let end_assembly() =
227 + nx_stack();
228 if pic_externals then
229 (* Emit the pointers to external functions *)
230 StringSet.iter emit_external !external_functions;
231 Index: ocaml-3.11.1/asmcomp/sparc/emit.mlp
232 ===================================================================
233 --- ocaml-3.11.1.orig/asmcomp/sparc/emit.mlp
234 +++ ocaml-3.11.1/asmcomp/sparc/emit.mlp
235 @@ -741,6 +741,12 @@ let data l =
236 ` .data\n`;
237 List.iter emit_item l
238
239 +(* Mark stack as non executable *)
240 +let nx_stack() =
241 + if Config.system = "linux" then
242 + ` .section .note.GNU-stack,\"\",%progbits\n`
243 +
244 +
245 (* Beginning / end of an assembly file *)
246
247 let begin_assembly() =
248 @@ -754,6 +760,7 @@ let begin_assembly() =
249 `{emit_symbol lbl_begin}:\n`
250
251 let end_assembly() =
252 + nx_stack();
253 ` .text\n`;
254 let lbl_end = Compilenv.make_symbol (Some "code_end") in
255 ` .global {emit_symbol lbl_end}\n`;
256
257
258
259 1.1 src/patchsets/ocaml/3.11.1/020_all_configure.patch
260
261 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/ocaml/3.11.1/020_all_configure.patch?rev=1.1&view=markup
262 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/ocaml/3.11.1/020_all_configure.patch?rev=1.1&content-type=text/plain
263
264 Index: 020_all_configure.patch
265 ===================================================================
266 The configure script doesn't inherit previous defined variables,
267 overwriting previous declarations of bytecccompopts, bytecclinkopts,
268 nativecccompopts and nativecclinkopts. Reported upstream as issue 0004267.
269
270 Index: ocaml-3.11.1/configure
271 ===================================================================
272 --- ocaml-3.11.1.orig/configure
273 +++ ocaml-3.11.1/configure
274 @@ -239,7 +239,7 @@ esac
275 # Configure the bytecode compiler
276
277 bytecc="$cc"
278 -mkexe="\$(BYTECC)"
279 +mkexe="\$(BYTECC) \$(BYTECCLINKOPTS)"
280 bytecccompopts=""
281 bytecclinkopts=""
282 dllccompopts=""
283 @@ -1516,7 +1516,15 @@ fi
284
285 # Final twiddling of compiler options to work around known bugs
286
287 +bytecccompopts="$CFLAGS $bytecccompopts"
288 +bytecclinkopts="$LDFLAGS $bytecclinkopts"
289 +natdynlinkopts="$LDFLAGS $natdynlinkopts"
290 +nativeccrawlinkopts="$RAW_LDFLAGS $nativecclinkopts"
291 +nativecclinkopts="$LDFLAGS $nativecclinkopts"
292 +nativecccompopts="$CFLAGS $nativecccompopts"
293 nativeccprofopts="$nativecccompopts"
294 +mksharedlib="$mksharedlib $LDFLAGS"
295 +mkmaindll="$mkmaindll $LDFLAGS"
296 case "$buggycc" in
297 gcc.2.96)
298 bytecccompopts="$bytecccompopts -fomit-frame-pointer"
299 @@ -1564,7 +1572,7 @@ echo "DEBUGGER=$debugger" >> Makefile
300 echo "CC_PROFILE=$cc_profile" >> Makefile
301 echo "SYSTHREAD_SUPPORT=$systhread_support" >> Makefile
302 echo "PARTIALLD=$partialld" >> Makefile
303 -echo "PACKLD=\$(PARTIALLD) \$(NATIVECCLINKOPTS) -o " >> Makefile
304 +echo "PACKLD=\$(PARTIALLD) $nativeccrawlinkopts -o " >> Makefile
305 echo "DLLCCCOMPOPTS=$dllccompopts" >> Makefile
306 echo "IFLEXDIR=$iflexdir" >> Makefile
307 echo "O=o" >> Makefile
308
309
310
311 1.1 src/patchsets/ocaml/3.11.1/030_all_automagic.patch
312
313 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/ocaml/3.11.1/030_all_automagic.patch?rev=1.1&view=markup
314 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/ocaml/3.11.1/030_all_automagic.patch?rev=1.1&content-type=text/plain
315
316 Index: 030_all_automagic.patch
317 ===================================================================
318 ocaml has automagics on libX11 and gdbm
319 http://caml.inria.fr/mantis/view.php?id=4278
320
321 Index: ocaml-3.11.1/configure
322 ===================================================================
323 --- ocaml-3.11.1.orig/configure
324 +++ ocaml-3.11.1/configure
325 @@ -33,6 +33,8 @@ x11_include_dir=''
326 x11_lib_dir=''
327 tk_wanted=yes
328 pthread_wanted=yes
329 +graph_wanted=yes
330 +dbm_wanted=yes
331 tk_defs=''
332 tk_libs=''
333 tk_x11=yes
334 @@ -93,6 +95,10 @@ while : ; do
335 ;; # Ignored for backward compatibility
336 -no-pthread*|--no-pthread*)
337 pthread_wanted=no;;
338 + -no-dbm|--no-dbm)
339 + dbm_wanted=no;;
340 + -no-graph|--no-graph)
341 + graph_wanted=no;;
342 -no-tk|--no-tk)
343 tk_wanted=no;;
344 -tkdefs*|--tkdefs*)
345 @@ -1318,7 +1324,7 @@ do
346 done
347
348
349 -if test "$x11_include" = "not found" || test "$x11_link" = "not found"
350 +if test "$x11_include" = "not found" || test "$x11_link" = "not found" || test "$graph_wanted" = "no"
351 then
352 echo "X11 not found, the \"graph\" library will not be supported."
353 x11_include=""
354 @@ -1366,7 +1372,7 @@ for dir in /usr/include /usr/include/db1
355 break
356 fi
357 done
358 -if test "$dbm_include" = "not found" || test "$dbm_link" = "not found"; then
359 +if test "$dbm_include" = "not found" || test "$dbm_link" = "not found" || test "$dbm_wanted" = "no"; then
360 echo "NDBM not found, the \"dbm\" library will not be supported."
361 else
362 echo "NDBM found (in $dbm_include)"
363 @@ -1652,7 +1658,7 @@ echo " $otherlibraries"
364 echo "Configuration for the \"num\" library:"
365 echo " target architecture ...... $bng_arch (asm level $bng_asm_level)"
366
367 -if test "$x11_include" != "not found" && test "$x11_lib" != "not found"; then
368 +if test "$x11_include" != "not found" && test "$x11_lib" != "not found" && test "$graph_wanted" != "no"; then
369 echo "Configuration for the \"graph\" library:"
370 echo " options for compiling .... $x11_include"
371 echo " options for linking ...... $x11_link"
372
373
374
375 1.1 src/patchsets/ocaml/3.11.1/040_all_yaccldflags.patch
376
377 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/ocaml/3.11.1/040_all_yaccldflags.patch?rev=1.1&view=markup
378 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/ocaml/3.11.1/040_all_yaccldflags.patch?rev=1.1&content-type=text/plain
379
380 Index: 040_all_yaccldflags.patch
381 ===================================================================
382 Respect LDFLAGS for ocamlyacc
383
384 http://caml.inria.fr/mantis/view.php?id=4698
385
386 Index: ocaml-3.11.1/yacc/Makefile
387 ===================================================================
388 --- ocaml-3.11.1.orig/yacc/Makefile
389 +++ ocaml-3.11.1/yacc/Makefile
390 @@ -25,7 +25,7 @@ OBJS= closure.o error.o lalr.o lr0.o mai
391 all: ocamlyacc$(EXE)
392
393 ocamlyacc$(EXE): $(OBJS)
394 - $(CC) $(CFLAGS) $(CCLINKFLAGS) -o ocamlyacc $(OBJS)
395 + $(CC) $(LDFLAGS) $(CFLAGS) $(CCLINKFLAGS) -o ocamlyacc $(OBJS)
396
397 version.h : ../VERSION
398 echo "#define OCAML_VERSION \"`head -1 ../VERSION`\"" >version.h
399
400
401
402 1.1 src/patchsets/ocaml/3.11.1/series
403
404 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/ocaml/3.11.1/series?rev=1.1&view=markup
405 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/ocaml/3.11.1/series?rev=1.1&content-type=text/plain
406
407 Index: series
408 ===================================================================
409 010_all_execstacks.patch
410 020_all_configure.patch
411 030_all_automagic.patch
412 040_all_yaccldflags.patch