Fix for invalid assembler generation (RHBZ#691896).
This commit is contained in:
parent
f83ef8ee6d
commit
170eee21d4
66
0007-Fix-ocamlopt-w.r.t.-binutils-2.21.patch
Normal file
66
0007-Fix-ocamlopt-w.r.t.-binutils-2.21.patch
Normal file
@ -0,0 +1,66 @@
|
||||
From: Stephane Glondu <steph@glondu.net>
|
||||
Date: Tue, 8 Mar 2011 21:17:40 +0100
|
||||
Subject: [PATCH] Fix ocamlopt w.r.t. binutils 2.21
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Bug: http://caml.inria.fr/mantis/view.php?id=5237
|
||||
Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=617404
|
||||
Authors: Eric Cooper, spiralvoice
|
||||
Reviewed-by: Stéphane Glondu <steph@glondu.net>
|
||||
---
|
||||
asmcomp/amd64/emit.mlp | 13 +++++++------
|
||||
asmcomp/i386/emit.mlp | 6 +++---
|
||||
2 files changed, 10 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/asmcomp/amd64/emit.mlp b/asmcomp/amd64/emit.mlp
|
||||
index 4a3f844..525c6e6 100644
|
||||
--- a/asmcomp/amd64/emit.mlp
|
||||
+++ b/asmcomp/amd64/emit.mlp
|
||||
@@ -679,17 +679,18 @@ let fundecl fundecl =
|
||||
emit_all true fundecl.fun_body;
|
||||
List.iter emit_call_gc !call_gc_sites;
|
||||
emit_call_bound_errors ();
|
||||
+ begin match Config.system with
|
||||
+ "linux" | "gnu" ->
|
||||
+ ` .type {emit_symbol fundecl.fun_name},@function\n`;
|
||||
+ ` .size {emit_symbol fundecl.fun_name},.-{emit_symbol fundecl.fun_name}\n`
|
||||
+ | _ -> ()
|
||||
+ end;
|
||||
if !float_constants <> [] then begin
|
||||
if macosx
|
||||
then ` .literal8\n`
|
||||
else ` .section .rodata.cst8,\"a\",@progbits\n`;
|
||||
List.iter emit_float_constant !float_constants
|
||||
- end;
|
||||
- match Config.system with
|
||||
- "linux" | "gnu" ->
|
||||
- ` .type {emit_symbol fundecl.fun_name},@function\n`;
|
||||
- ` .size {emit_symbol fundecl.fun_name},.-{emit_symbol fundecl.fun_name}\n`
|
||||
- | _ -> ()
|
||||
+ end
|
||||
|
||||
(* Emission of data *)
|
||||
|
||||
diff --git a/asmcomp/i386/emit.mlp b/asmcomp/i386/emit.mlp
|
||||
index 2992f29..0b1252c 100644
|
||||
--- a/asmcomp/i386/emit.mlp
|
||||
+++ b/asmcomp/i386/emit.mlp
|
||||
@@ -905,12 +905,12 @@ let fundecl fundecl =
|
||||
emit_all true fundecl.fun_body;
|
||||
List.iter emit_call_gc !call_gc_sites;
|
||||
emit_call_bound_errors ();
|
||||
- List.iter emit_float_constant !float_constants;
|
||||
- match Config.system with
|
||||
+ begin match Config.system with
|
||||
"linux_elf" | "bsd_elf" | "gnu" ->
|
||||
` .type {emit_symbol fundecl.fun_name},@function\n`;
|
||||
` .size {emit_symbol fundecl.fun_name},.-{emit_symbol fundecl.fun_name}\n`
|
||||
- | _ -> ()
|
||||
+ | _ -> () end;
|
||||
+ List.iter emit_float_constant !float_constants
|
||||
|
||||
|
||||
(* Emission of data *)
|
||||
--
|
@ -2,7 +2,7 @@
|
||||
|
||||
Name: ocaml
|
||||
Version: 3.12.0
|
||||
Release: 4%{?dist}
|
||||
Release: 5%{?dist}
|
||||
|
||||
Summary: Objective Caml compiler and programming environment
|
||||
|
||||
@ -24,6 +24,9 @@ Source6: ocamlbyteinfo.ml
|
||||
Patch0: ocaml-3.12.0-rpath.patch
|
||||
Patch1: ocaml-user-cflags.patch
|
||||
|
||||
# Fix for RHBZ#691896. This is upstream in 3.12.1.
|
||||
Patch2: 0007-Fix-ocamlopt-w.r.t.-binutils-2.21.patch
|
||||
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
|
||||
# Depend on previous version of OCaml so that ocamlobjinfo
|
||||
@ -200,6 +203,7 @@ man pages and info files.
|
||||
%setup -q -T -D -a 3 -n %{name}-%{version}
|
||||
%patch0 -p1 -b .rpath
|
||||
%patch1 -p1 -b .cflags
|
||||
%patch2 -p1 -b .rhbz691896
|
||||
|
||||
cp %{SOURCE2} refman.pdf
|
||||
|
||||
@ -442,6 +446,9 @@ fi
|
||||
|
||||
|
||||
%changelog
|
||||
* Wed Mar 30 2011 Richard W.M. Jones <rjones@redhat.com> - 3.12.0-5
|
||||
- Fix for invalid assembler generation (RHBZ#691896).
|
||||
|
||||
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.12.0-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user