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.12.0: 010_all_execstacks.patch 020_all_configure.patch 030_all_automagic.patch 040_all_yaccldflags.patch 050_all_objinfoldflags.patch 060_all_linkorder.patch series
Date: Sun, 27 Feb 2011 13:05:49
Message-Id: 20110227130539.6C1E820054@flycatcher.gentoo.org
1 aballier 11/02/27 13:05:39
2
3 Modified: 010_all_execstacks.patch 020_all_configure.patch
4 030_all_automagic.patch 040_all_yaccldflags.patch
5 050_all_objinfoldflags.patch series
6 Added: 060_all_linkorder.patch
7 Log:
8 refresh the patchset and add a patch to pass libs as last argument to the linker when linking, fixes our as-needed problems: bug #331377 and bug #331075
9
10 Revision Changes Path
11 1.2 src/patchsets/ocaml/3.12.0/010_all_execstacks.patch
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/ocaml/3.12.0/010_all_execstacks.patch?rev=1.2&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/ocaml/3.12.0/010_all_execstacks.patch?rev=1.2&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/ocaml/3.12.0/010_all_execstacks.patch?r1=1.1&r2=1.2
16
17 Index: 010_all_execstacks.patch
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo/src/patchsets/ocaml/3.12.0/010_all_execstacks.patch,v
20 retrieving revision 1.1
21 retrieving revision 1.2
22 diff -u -r1.1 -r1.2
23 --- 010_all_execstacks.patch 17 Jun 2010 08:19:42 -0000 1.1
24 +++ 010_all_execstacks.patch 27 Feb 2011 13:05:39 -0000 1.2
25 @@ -1,9 +1,9 @@
26 Fix the EXEC_STACK in ocaml compiled binaries (#153382)
27
28 -Index: ocaml-3.12.0+beta1/asmcomp/alpha/emit.mlp
29 +Index: ocaml-3.12.0/asmcomp/alpha/emit.mlp
30 ===================================================================
31 ---- ocaml-3.12.0+beta1.orig/asmcomp/alpha/emit.mlp
32 -+++ ocaml-3.12.0+beta1/asmcomp/alpha/emit.mlp
33 +--- ocaml-3.12.0.orig/asmcomp/alpha/emit.mlp
34 ++++ ocaml-3.12.0/asmcomp/alpha/emit.mlp
35 @@ -811,6 +811,11 @@ let data l =
36 ` .data\n`;
37 List.iter emit_item l
38 @@ -24,10 +24,10 @@
39 let lbl_end = Compilenv.make_symbol (Some "code_end") in
40 ` .text\n`;
41 ` .globl {emit_symbol lbl_end}\n`;
42 -Index: ocaml-3.12.0+beta1/asmrun/alpha.S
43 +Index: ocaml-3.12.0/asmrun/alpha.S
44 ===================================================================
45 ---- ocaml-3.12.0+beta1.orig/asmrun/alpha.S
46 -+++ ocaml-3.12.0+beta1/asmrun/alpha.S
47 +--- ocaml-3.12.0.orig/asmrun/alpha.S
48 ++++ ocaml-3.12.0/asmrun/alpha.S
49 @@ -438,3 +438,7 @@ caml_system__frametable:
50 .word -1 /* negative frame size => use callback link */
51 .word 0 /* no roots here */
52 @@ -36,10 +36,10 @@
53 +#ifdef __ELF__
54 +.section .note.GNU-stack,"",%progbits
55 +#endif
56 -Index: ocaml-3.12.0+beta1/asmrun/arm.S
57 +Index: ocaml-3.12.0/asmrun/arm.S
58 ===================================================================
59 ---- ocaml-3.12.0+beta1.orig/asmrun/arm.S
60 -+++ ocaml-3.12.0+beta1/asmrun/arm.S
61 +--- ocaml-3.12.0.orig/asmrun/arm.S
62 ++++ ocaml-3.12.0/asmrun/arm.S
63 @@ -316,3 +316,7 @@ caml_system__frametable:
64 .short -1 /* negative frame size => use callback link */
65 .short 0 /* no roots */
66 @@ -48,10 +48,10 @@
67 +#ifdef __ELF__
68 +.section .note.GNU-stack,"",%progbits
69 +#endif
70 -Index: ocaml-3.12.0+beta1/asmrun/hppa.S
71 +Index: ocaml-3.12.0/asmrun/hppa.S
72 ===================================================================
73 ---- ocaml-3.12.0+beta1.orig/asmrun/hppa.S
74 -+++ ocaml-3.12.0+beta1/asmrun/hppa.S
75 +--- ocaml-3.12.0.orig/asmrun/hppa.S
76 ++++ ocaml-3.12.0/asmrun/hppa.S
77 @@ -532,3 +532,8 @@ G(caml_system__frametable):
78 .long L104 + 3 /* return address into callback */
79 .short -1 /* negative frame size => use callback link */
80 @@ -61,10 +61,10 @@
81 +.section .note.GNU-stack,"",%progbits
82 +#endif
83 +
84 -Index: ocaml-3.12.0+beta1/asmrun/ia64.S
85 +Index: ocaml-3.12.0/asmrun/ia64.S
86 ===================================================================
87 ---- ocaml-3.12.0+beta1.orig/asmrun/ia64.S
88 -+++ ocaml-3.12.0+beta1/asmrun/ia64.S
89 +--- ocaml-3.12.0.orig/asmrun/ia64.S
90 ++++ ocaml-3.12.0/asmrun/ia64.S
91 @@ -521,3 +521,8 @@ caml_system__frametable:
92
93 .common caml_saved_bsp#, 8, 8
94 @@ -74,10 +74,10 @@
95 +.section .note.GNU-stack,"",%progbits
96 +#endif
97 +
98 -Index: ocaml-3.12.0+beta1/asmrun/m68k.S
99 +Index: ocaml-3.12.0/asmrun/m68k.S
100 ===================================================================
101 ---- ocaml-3.12.0+beta1.orig/asmrun/m68k.S
102 -+++ ocaml-3.12.0+beta1/asmrun/m68k.S
103 +--- ocaml-3.12.0.orig/asmrun/m68k.S
104 ++++ ocaml-3.12.0/asmrun/m68k.S
105 @@ -242,3 +242,8 @@ _caml_system__frametable:
106 .long L107 | return address into callback
107 .word -1 | negative frame size => use callback link
108 @@ -87,10 +87,10 @@
109 +.section .note.GNU-stack,"",%progbits
110 +#endif
111 +
112 -Index: ocaml-3.12.0+beta1/asmrun/sparc.S
113 +Index: ocaml-3.12.0/asmrun/sparc.S
114 ===================================================================
115 ---- ocaml-3.12.0+beta1.orig/asmrun/sparc.S
116 -+++ ocaml-3.12.0+beta1/asmrun/sparc.S
117 +--- ocaml-3.12.0.orig/asmrun/sparc.S
118 ++++ ocaml-3.12.0/asmrun/sparc.S
119 @@ -405,3 +405,8 @@ Caml_system__frametable:
120 .type Caml_raise_exception, #function
121 .type Caml_system__frametable, #object
122 @@ -100,10 +100,10 @@
123 +.section .note.GNU-stack,"",%progbits
124 +#endif
125 +
126 -Index: ocaml-3.12.0+beta1/asmcomp/arm/emit.mlp
127 +Index: ocaml-3.12.0/asmcomp/arm/emit.mlp
128 ===================================================================
129 ---- ocaml-3.12.0+beta1.orig/asmcomp/arm/emit.mlp
130 -+++ ocaml-3.12.0+beta1/asmcomp/arm/emit.mlp
131 +--- ocaml-3.12.0.orig/asmcomp/arm/emit.mlp
132 ++++ ocaml-3.12.0/asmcomp/arm/emit.mlp
133 @@ -601,6 +601,13 @@ let data l =
134 ` .data\n`;
135 List.iter emit_item l
136 @@ -126,10 +126,10 @@
137 let lbl_end = Compilenv.make_symbol (Some "code_end") in
138 ` .text\n`;
139 ` .global {emit_symbol lbl_end}\n`;
140 -Index: ocaml-3.12.0+beta1/asmcomp/hppa/emit.mlp
141 +Index: ocaml-3.12.0/asmcomp/hppa/emit.mlp
142 ===================================================================
143 ---- ocaml-3.12.0+beta1.orig/asmcomp/hppa/emit.mlp
144 -+++ ocaml-3.12.0+beta1/asmcomp/hppa/emit.mlp
145 +--- ocaml-3.12.0.orig/asmcomp/hppa/emit.mlp
146 ++++ ocaml-3.12.0/asmcomp/hppa/emit.mlp
147 @@ -996,6 +996,12 @@ let data l =
148 ` .data\n`;
149 List.iter emit_item l
150 @@ -151,10 +151,10 @@
151 ` .code\n`;
152 let lbl_end = Compilenv.make_symbol (Some "code_end") in
153 declare_global lbl_end;
154 -Index: ocaml-3.12.0+beta1/asmcomp/ia64/emit.mlp
155 +Index: ocaml-3.12.0/asmcomp/ia64/emit.mlp
156 ===================================================================
157 ---- ocaml-3.12.0+beta1.orig/asmcomp/ia64/emit.mlp
158 -+++ ocaml-3.12.0+beta1/asmcomp/ia64/emit.mlp
159 +--- ocaml-3.12.0.orig/asmcomp/ia64/emit.mlp
160 ++++ ocaml-3.12.0/asmcomp/ia64/emit.mlp
161 @@ -1306,6 +1306,11 @@ let data l =
162 ` .align 8\n`;
163 List.iter emit_item l
164 @@ -175,10 +175,10 @@
165 ` .data\n`;
166 emit_define_symbol (Compilenv.make_symbol (Some "data_end"));
167 ` .text\n`;
168 -Index: ocaml-3.12.0+beta1/asmcomp/power/emit.mlp
169 +Index: ocaml-3.12.0/asmcomp/power/emit.mlp
170 ===================================================================
171 ---- ocaml-3.12.0+beta1.orig/asmcomp/power/emit.mlp
172 -+++ ocaml-3.12.0+beta1/asmcomp/power/emit.mlp
173 +--- ocaml-3.12.0.orig/asmcomp/power/emit.mlp
174 ++++ ocaml-3.12.0/asmcomp/power/emit.mlp
175 @@ -927,6 +927,12 @@ let data l =
176 emit_string data_space;
177 List.iter emit_item l
178 @@ -200,10 +200,10 @@
179 if pic_externals then
180 (* Emit the pointers to external functions *)
181 StringSet.iter emit_external !external_functions;
182 -Index: ocaml-3.12.0+beta1/asmcomp/sparc/emit.mlp
183 +Index: ocaml-3.12.0/asmcomp/sparc/emit.mlp
184 ===================================================================
185 ---- ocaml-3.12.0+beta1.orig/asmcomp/sparc/emit.mlp
186 -+++ ocaml-3.12.0+beta1/asmcomp/sparc/emit.mlp
187 +--- ocaml-3.12.0.orig/asmcomp/sparc/emit.mlp
188 ++++ ocaml-3.12.0/asmcomp/sparc/emit.mlp
189 @@ -742,6 +742,12 @@ let data l =
190 ` .data\n`;
191 List.iter emit_item l
192 @@ -225,10 +225,10 @@
193 ` .text\n`;
194 let lbl_end = Compilenv.make_symbol (Some "code_end") in
195 ` .global {emit_symbol lbl_end}\n`;
196 -Index: ocaml-3.12.0+beta1/asmrun/power-elf.S
197 +Index: ocaml-3.12.0/asmrun/power-elf.S
198 ===================================================================
199 ---- ocaml-3.12.0+beta1.orig/asmrun/power-elf.S
200 -+++ ocaml-3.12.0+beta1/asmrun/power-elf.S
201 +--- ocaml-3.12.0.orig/asmrun/power-elf.S
202 ++++ ocaml-3.12.0/asmrun/power-elf.S
203 @@ -418,3 +418,8 @@ caml_system__frametable:
204 .long .L105 + 4 /* return address into callback */
205 .short -1 /* negative size count => use callback link */
206
207
208
209 1.2 src/patchsets/ocaml/3.12.0/020_all_configure.patch
210
211 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/ocaml/3.12.0/020_all_configure.patch?rev=1.2&view=markup
212 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/ocaml/3.12.0/020_all_configure.patch?rev=1.2&content-type=text/plain
213 diff : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/ocaml/3.12.0/020_all_configure.patch?r1=1.1&r2=1.2
214
215 Index: 020_all_configure.patch
216 ===================================================================
217 RCS file: /var/cvsroot/gentoo/src/patchsets/ocaml/3.12.0/020_all_configure.patch,v
218 retrieving revision 1.1
219 retrieving revision 1.2
220 diff -u -r1.1 -r1.2
221 --- 020_all_configure.patch 17 Jun 2010 08:19:42 -0000 1.1
222 +++ 020_all_configure.patch 27 Feb 2011 13:05:39 -0000 1.2
223 @@ -2,10 +2,10 @@
224 overwriting previous declarations of bytecccompopts, bytecclinkopts,
225 nativecccompopts and nativecclinkopts. Reported upstream as issue 0004267.
226
227 -Index: ocaml-3.12.0+beta1/configure
228 +Index: ocaml-3.12.0/configure
229 ===================================================================
230 ---- ocaml-3.12.0+beta1.orig/configure
231 -+++ ocaml-3.12.0+beta1/configure
232 +--- ocaml-3.12.0.orig/configure
233 ++++ ocaml-3.12.0/configure
234 @@ -241,7 +241,7 @@ esac
235 # Configure the bytecode compiler
236
237
238
239
240 1.2 src/patchsets/ocaml/3.12.0/030_all_automagic.patch
241
242 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/ocaml/3.12.0/030_all_automagic.patch?rev=1.2&view=markup
243 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/ocaml/3.12.0/030_all_automagic.patch?rev=1.2&content-type=text/plain
244 diff : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/ocaml/3.12.0/030_all_automagic.patch?r1=1.1&r2=1.2
245
246 Index: 030_all_automagic.patch
247 ===================================================================
248 RCS file: /var/cvsroot/gentoo/src/patchsets/ocaml/3.12.0/030_all_automagic.patch,v
249 retrieving revision 1.1
250 retrieving revision 1.2
251 diff -u -r1.1 -r1.2
252 --- 030_all_automagic.patch 17 Jun 2010 08:19:42 -0000 1.1
253 +++ 030_all_automagic.patch 27 Feb 2011 13:05:39 -0000 1.2
254 @@ -1,10 +1,10 @@
255 ocaml has automagics on libX11 and gdbm
256 http://caml.inria.fr/mantis/view.php?id=4278
257
258 -Index: ocaml-3.12.0+beta1/configure
259 +Index: ocaml-3.12.0/configure
260 ===================================================================
261 ---- ocaml-3.12.0+beta1.orig/configure
262 -+++ ocaml-3.12.0+beta1/configure
263 +--- ocaml-3.12.0.orig/configure
264 ++++ ocaml-3.12.0/configure
265 @@ -33,6 +33,8 @@ x11_include_dir=''
266 x11_lib_dir=''
267 tk_wanted=yes
268 @@ -25,7 +25,7 @@
269 -no-tk|--no-tk)
270 tk_wanted=no;;
271 -partialld|--partialld)
272 -@@ -1373,7 +1379,7 @@ do
273 +@@ -1372,7 +1378,7 @@ do
274 done
275
276
277 @@ -34,7 +34,7 @@
278 then
279 echo "X11 not found, the \"graph\" library will not be supported."
280 x11_include=""
281 -@@ -1421,7 +1427,7 @@ for dir in /usr/include /usr/include/db1
282 +@@ -1420,7 +1426,7 @@ for dir in /usr/include /usr/include/db1
283 break
284 fi
285 done
286
287
288
289 1.2 src/patchsets/ocaml/3.12.0/040_all_yaccldflags.patch
290
291 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/ocaml/3.12.0/040_all_yaccldflags.patch?rev=1.2&view=markup
292 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/ocaml/3.12.0/040_all_yaccldflags.patch?rev=1.2&content-type=text/plain
293 diff : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/ocaml/3.12.0/040_all_yaccldflags.patch?r1=1.1&r2=1.2
294
295 Index: 040_all_yaccldflags.patch
296 ===================================================================
297 RCS file: /var/cvsroot/gentoo/src/patchsets/ocaml/3.12.0/040_all_yaccldflags.patch,v
298 retrieving revision 1.1
299 retrieving revision 1.2
300 diff -u -r1.1 -r1.2
301 --- 040_all_yaccldflags.patch 17 Jun 2010 08:19:42 -0000 1.1
302 +++ 040_all_yaccldflags.patch 27 Feb 2011 13:05:39 -0000 1.2
303 @@ -2,10 +2,10 @@
304
305 http://caml.inria.fr/mantis/view.php?id=4698
306
307 -Index: ocaml-3.12.0+beta1/yacc/Makefile
308 +Index: ocaml-3.12.0/yacc/Makefile
309 ===================================================================
310 ---- ocaml-3.12.0+beta1.orig/yacc/Makefile
311 -+++ ocaml-3.12.0+beta1/yacc/Makefile
312 +--- ocaml-3.12.0.orig/yacc/Makefile
313 ++++ ocaml-3.12.0/yacc/Makefile
314 @@ -25,7 +25,7 @@ OBJS= closure.o error.o lalr.o lr0.o mai
315 all: ocamlyacc$(EXE)
316
317
318
319
320 1.2 src/patchsets/ocaml/3.12.0/050_all_objinfoldflags.patch
321
322 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/ocaml/3.12.0/050_all_objinfoldflags.patch?rev=1.2&view=markup
323 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/ocaml/3.12.0/050_all_objinfoldflags.patch?rev=1.2&content-type=text/plain
324 diff : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/ocaml/3.12.0/050_all_objinfoldflags.patch?r1=1.1&r2=1.2
325
326 Index: 050_all_objinfoldflags.patch
327 ===================================================================
328 RCS file: /var/cvsroot/gentoo/src/patchsets/ocaml/3.12.0/050_all_objinfoldflags.patch,v
329 retrieving revision 1.1
330 retrieving revision 1.2
331 diff -u -r1.1 -r1.2
332 --- 050_all_objinfoldflags.patch 17 Jun 2010 08:40:17 -0000 1.1
333 +++ 050_all_objinfoldflags.patch 27 Feb 2011 13:05:39 -0000 1.2
334 @@ -1,7 +1,7 @@
335 -Index: ocaml-3.12.0+beta1/tools/Makefile.shared
336 +Index: ocaml-3.12.0/tools/Makefile.shared
337 ===================================================================
338 ---- ocaml-3.12.0+beta1.orig/tools/Makefile.shared
339 -+++ ocaml-3.12.0+beta1/tools/Makefile.shared
340 +--- ocaml-3.12.0.orig/tools/Makefile.shared
341 ++++ ocaml-3.12.0/tools/Makefile.shared
342 @@ -229,7 +229,7 @@ beforedepend:: opnames.ml
343 # Display info on compiled files
344
345
346
347
348 1.3 src/patchsets/ocaml/3.12.0/series
349
350 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/ocaml/3.12.0/series?rev=1.3&view=markup
351 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/ocaml/3.12.0/series?rev=1.3&content-type=text/plain
352 diff : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/ocaml/3.12.0/series?r1=1.2&r2=1.3
353
354 Index: series
355 ===================================================================
356 RCS file: /var/cvsroot/gentoo/src/patchsets/ocaml/3.12.0/series,v
357 retrieving revision 1.2
358 retrieving revision 1.3
359 diff -u -r1.2 -r1.3
360 --- series 17 Jun 2010 08:40:17 -0000 1.2
361 +++ series 27 Feb 2011 13:05:39 -0000 1.3
362 @@ -3,3 +3,4 @@
363 030_all_automagic.patch
364 040_all_yaccldflags.patch
365 050_all_objinfoldflags.patch
366 +060_all_linkorder.patch
367
368
369
370 1.1 src/patchsets/ocaml/3.12.0/060_all_linkorder.patch
371
372 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/ocaml/3.12.0/060_all_linkorder.patch?rev=1.1&view=markup
373 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/ocaml/3.12.0/060_all_linkorder.patch?rev=1.1&content-type=text/plain
374
375 Index: 060_all_linkorder.patch
376 ===================================================================
377 Always pass the libraries to link as last argument to the linker.
378 Should fix build failures with as-needed such as:
379 https://bugs.gentoo.org/show_bug.cgi?id=331075
380 https://bugs.gentoo.org/show_bug.cgi?id=331377
381
382 Index: ocaml-3.12.0/utils/ccomp.ml
383 ===================================================================
384 --- ocaml-3.12.0.orig/utils/ccomp.ml
385 +++ ocaml-3.12.0/utils/ccomp.ml
386 @@ -98,8 +98,18 @@ type link_mode =
387 | MainDll
388 | Partial
389
390 +let is_lib name = String.length name >= 2 && String.sub name 0 2 = "-l"
391 +
392 +let rec link_order init libs = function
393 + [] -> List.rev_append init (List.rev libs)
394 + | t::q -> if is_lib t then link_order init (t::libs) q else link_order (t::init) libs q
395 +
396 +let rec split_libs libs others = function
397 + [] -> (libs, others)
398 + | t::q -> if is_lib t then split_libs (t::libs) others q else split_libs libs (t::others) q
399 +
400 let call_linker mode output_name files extra =
401 - let files = quote_files files in
402 + let files = quote_files (link_order [] [] files) in
403 let cmd =
404 if mode = Partial then
405 Printf.sprintf "%s%s %s %s"
406 @@ -108,7 +118,8 @@ let call_linker mode output_name files e
407 files
408 extra
409 else
410 - Printf.sprintf "%s -o %s %s %s %s %s %s %s"
411 + let (cclibs,ccopts) = split_libs [] [] !Clflags.ccopts in
412 + Printf.sprintf "%s -o %s %s %s %s %s %s %s %s"
413 (match !Clflags.c_compiler, mode with
414 | Some cc, _ -> cc
415 | None, Exe -> Config.mkexe
416 @@ -120,8 +131,9 @@ let call_linker mode output_name files e
417 (if !Clflags.gprofile then Config.cc_profile else "")
418 "" (*(Clflags.std_include_flag "-I")*)
419 (quote_prefixed "-L" !Config.load_path)
420 - (String.concat " " (List.rev !Clflags.ccopts))
421 + (String.concat " " ccopts)
422 files
423 + (String.concat " " cclibs)
424 extra
425 in
426 command cmd = 0