diff --git a/0001-riscv-Emit-debug-info.patch b/0001-riscv-Emit-debug-info.patch new file mode 100644 index 0000000..9e516c6 --- /dev/null +++ b/0001-riscv-Emit-debug-info.patch @@ -0,0 +1,40 @@ +From 0bd8c61e6d6f020f06792adbd5ed91448974e561 Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Tue, 5 Jun 2018 19:48:08 +0000 +Subject: [PATCH] riscv: Emit debug info. + +--- + asmcomp/riscv/emit.mlp | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/asmcomp/riscv/emit.mlp b/asmcomp/riscv/emit.mlp +index 718dca080..e42ee9770 100644 +--- a/asmcomp/riscv/emit.mlp ++++ b/asmcomp/riscv/emit.mlp +@@ -261,6 +261,7 @@ let tailrec_entry_point = ref 0 + (* Output the assembly code for an instruction *) + + let emit_instr i = ++ emit_debug_info i.dbg; + match i.desc with + Lend -> () + | Lop(Imove | Ispill | Ireload) -> +@@ -560,6 +561,7 @@ let fundecl fundecl = + emit_stack_adjustment (-n); + if !contains_calls then store_ra n; + `{emit_label !tailrec_entry_point}:\n`; ++ emit_debug_info fundecl.fun_dbg; + emit_all fundecl.fun_body; + List.iter emit_call_gc !call_gc_sites; + List.iter emit_call_bound_error !bound_error_sites; +@@ -619,6 +621,7 @@ let data l = + + let begin_assembly() = + ` .file \"\"\n`; (* PR#7073 *) ++ reset_debug_info (); + (* Emit the beginning of the segments *) + let lbl_begin = Compilenv.make_symbol (Some "data_begin") in + ` {emit_string data_space}\n`; +-- +2.16.2 + diff --git a/ocaml.spec b/ocaml.spec index 06fcfc2..b63101a 100644 --- a/ocaml.spec +++ b/ocaml.spec @@ -27,7 +27,7 @@ Name: ocaml Version: 4.06.0 -Release: 5%{?dist} +Release: 5.0.riscv64%{?dist} Summary: OCaml compiler and programming environment @@ -63,6 +63,7 @@ Patch0003: 0003-configure-Allow-user-defined-C-compiler-flags.patch Patch0004: 0004-Add-RISC-V-backend.patch Patch0005: 0005-Copyright-untabify.patch Patch0006: 0006-fix-caml_c_call-reload-caml_young_limit.patch +Patch0007: 0001-riscv-Emit-debug-info.patch BuildRequires: gcc BuildRequires: binutils-devel @@ -424,6 +425,9 @@ find $RPM_BUILD_ROOT \( -name '*.cmt' -o -name '*.cmti' \) -a -delete %changelog +* Tue Jun 26 2018 David Abdurachmanov - 4.06.0-5.0.riscv64 +- Add RISC-V patch to add more debuginfo. + * Sun Feb 25 2018 Richard W.M. Jones - 4.06.0-5 - Add another couple of RISC-V patches from nojb branch.