build: link nums only when BT is enabled (ref #27)
[mldonkey.git] / patches / ocaml-3.11.0.patch
blobfa7664cecc98d7d5d97ee6d8fb035c2e229bff57
1 From: Stephane Glondu <steph@glondu.net>
2 Date: Tue, 8 Mar 2011 21:17:40 +0100
3 Subject: [PATCH] Fix ocamlopt w.r.t. binutils 2.21
4 MIME-Version: 1.0
5 Content-Type: text/plain; charset=UTF-8
6 Content-Transfer-Encoding: 8bit
8 Bug: http://caml.inria.fr/mantis/view.php?id=5237
9 Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=617404
10 Authors: Eric Cooper, spiralvoice
11 Reviewed-by: Stéphane Glondu <steph@glondu.net>
12 ---
13 asmcomp/amd64/emit.mlp | 13 +++++++------
14 asmcomp/i386/emit.mlp | 6 +++---
15 2 files changed, 10 insertions(+), 9 deletions(-)
17 diff --git a/asmcomp/amd64/emit.mlp b/asmcomp/amd64/emit.mlp
18 index 4a3f844..525c6e6 100644
19 --- a/asmcomp/amd64/emit.mlp
20 +++ b/asmcomp/amd64/emit.mlp
21 @@ -679,17 +679,18 @@ let fundecl fundecl =
22 emit_all true fundecl.fun_body;
23 List.iter emit_call_gc !call_gc_sites;
24 emit_call_bound_errors ();
25 + begin match Config.system with
26 + "linux" | "gnu" ->
27 + ` .type {emit_symbol fundecl.fun_name},@function\n`;
28 + ` .size {emit_symbol fundecl.fun_name},.-{emit_symbol fundecl.fun_name}\n`
29 + | _ -> ()
30 + end;
31 if !float_constants <> [] then begin
32 if macosx
33 then ` .literal8\n`
34 else ` .section .rodata.cst8,\"a\",@progbits\n`;
35 List.iter emit_float_constant !float_constants
36 - end;
37 - match Config.system with
38 - "linux" | "gnu" ->
39 - ` .type {emit_symbol fundecl.fun_name},@function\n`;
40 - ` .size {emit_symbol fundecl.fun_name},.-{emit_symbol fundecl.fun_name}\n`
41 - | _ -> ()
42 + end
44 (* Emission of data *)
46 diff --git a/asmcomp/i386/emit.mlp b/asmcomp/i386/emit.mlp
47 index 2992f29..0b1252c 100644
48 --- a/asmcomp/i386/emit.mlp
49 +++ b/asmcomp/i386/emit.mlp
50 @@ -905,12 +905,12 @@ let fundecl fundecl =
51 emit_all true fundecl.fun_body;
52 List.iter emit_call_gc !call_gc_sites;
53 emit_call_bound_errors ();
54 - List.iter emit_float_constant !float_constants;
55 - match Config.system with
56 + begin match Config.system with
57 "linux_elf" | "bsd_elf" | "gnu" ->
58 ` .type {emit_symbol fundecl.fun_name},@function\n`;
59 ` .size {emit_symbol fundecl.fun_name},.-{emit_symbol fundecl.fun_name}\n`
60 - | _ -> ()
61 + | _ -> () end;
62 + List.iter emit_float_constant !float_constants
65 (* Emission of data *)
66 --