Compare commits
No commits in common. "77bcef6197e982b76fe49e730c42160c382a5517" and "0c1300311f0dacda28e19fbb5b6c9af1c3992303" have entirely different histories.
77bcef6197
...
0c1300311f
@ -1,27 +1,27 @@
|
||||
From 9378a6a792cd1e2f6861483a2a73122b8c5296dd Mon Sep 17 00:00:00 2001
|
||||
From b53eed0544eaa4ac264e405bd73a43ca3fb574d8 Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Tue, 24 Jun 2014 10:00:15 +0100
|
||||
Subject: [PATCH 4/9] Don't add rpaths to libraries.
|
||||
Subject: [PATCH 1/7] Don't add rpaths to libraries.
|
||||
|
||||
---
|
||||
tools/Makefile | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/tools/Makefile b/tools/Makefile
|
||||
index ee0e0be4c..7c96b6405 100644
|
||||
index 78d2a1068..fbec019ed 100644
|
||||
--- a/tools/Makefile
|
||||
+++ b/tools/Makefile
|
||||
@@ -153,8 +153,8 @@ $(call byte_and_opt,ocamlmklib,ocamlmklibconfig.cmo config.cmo \
|
||||
ocamlmklibconfig.ml: $(ROOTDIR)/Makefile.config Makefile
|
||||
@@ -157,8 +157,8 @@ $(call byte_and_opt,ocamlmklib,ocamlmklibconfig.cmo config.cmo misc.cmo \
|
||||
ocamlmklibconfig.ml: ../config/Makefile Makefile
|
||||
(echo 'let bindir = "$(BINDIR)"'; \
|
||||
echo 'let supports_shared_libraries = $(SUPPORTS_SHARED_LIBRARIES)';\
|
||||
- echo 'let default_rpath = "$(RPATH)"'; \
|
||||
- echo 'let mksharedlibrpath = "$(MKSHAREDLIBRPATH)"'; \
|
||||
+ echo 'let default_rpath = ""'; \
|
||||
+ echo 'let mksharedlibrpath = ""'; \
|
||||
echo 'let toolpref = "$(TOOLPREF)"';) \
|
||||
echo 'let toolpref = "$(TOOLPREF)"'; \
|
||||
sed -n -e 's/^#ml //p' ../config/Makefile) \
|
||||
> ocamlmklibconfig.ml
|
||||
|
||||
--
|
||||
2.22.0.rc3
|
||||
2.16.2
|
||||
|
@ -1,141 +0,0 @@
|
||||
From 92c1042e5ba899fca8eed351a7bc210879cdc9d7 Mon Sep 17 00:00:00 2001
|
||||
From: Florian Angeletti <florian.angeletti@inria.fr>
|
||||
Date: Wed, 24 Jul 2019 14:25:14 +0200
|
||||
Subject: [PATCH 1/9] increment version number after tagging 4.08.1+rc2
|
||||
|
||||
---
|
||||
VERSION | 2 +-
|
||||
configure | 26 +++++++++++++-------------
|
||||
ocaml-variants.opam | 2 +-
|
||||
3 files changed, 15 insertions(+), 15 deletions(-)
|
||||
|
||||
diff --git a/VERSION b/VERSION
|
||||
index 9bbc45c85..6be2f109a 100644
|
||||
--- a/VERSION
|
||||
+++ b/VERSION
|
||||
@@ -1,4 +1,4 @@
|
||||
-4.08.1+rc2
|
||||
+4.08.1+dev4-2019-07-24
|
||||
|
||||
# The version string is the first line of this file.
|
||||
# It must be in the format described in stdlib/sys.mli
|
||||
diff --git a/configure b/configure
|
||||
index 450374d2d..0de9771d3 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -1,6 +1,6 @@
|
||||
#! /bin/sh
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
-# Generated by GNU Autoconf 2.69 for OCaml 4.08.1+rc2.
|
||||
+# Generated by GNU Autoconf 2.69 for OCaml 4.08.1+dev4-2019-07-24.
|
||||
#
|
||||
# Report bugs to <caml-list@inria.fr>.
|
||||
#
|
||||
@@ -590,8 +590,8 @@ MAKEFLAGS=
|
||||
# Identity of this package.
|
||||
PACKAGE_NAME='OCaml'
|
||||
PACKAGE_TARNAME='ocaml'
|
||||
-PACKAGE_VERSION='4.08.1+rc2'
|
||||
-PACKAGE_STRING='OCaml 4.08.1+rc2'
|
||||
+PACKAGE_VERSION='4.08.1+dev4-2019-07-24'
|
||||
+PACKAGE_STRING='OCaml 4.08.1+dev4-2019-07-24'
|
||||
PACKAGE_BUGREPORT='caml-list@inria.fr'
|
||||
PACKAGE_URL='http://www.ocaml.org'
|
||||
|
||||
@@ -1430,7 +1430,7 @@ if test "$ac_init_help" = "long"; then
|
||||
# Omit some internal or obsolete options to make the list less imposing.
|
||||
# This message is too long to be a string in the A/UX 3.1 sh.
|
||||
cat <<_ACEOF
|
||||
-\`configure' configures OCaml 4.08.1+rc2 to adapt to many kinds of systems.
|
||||
+\`configure' configures OCaml 4.08.1+dev4-2019-07-24 to adapt to many kinds of systems.
|
||||
|
||||
Usage: $0 [OPTION]... [VAR=VALUE]...
|
||||
|
||||
@@ -1501,7 +1501,7 @@ fi
|
||||
|
||||
if test -n "$ac_init_help"; then
|
||||
case $ac_init_help in
|
||||
- short | recursive ) echo "Configuration of OCaml 4.08.1+rc2:";;
|
||||
+ short | recursive ) echo "Configuration of OCaml 4.08.1+dev4-2019-07-24:";;
|
||||
esac
|
||||
cat <<\_ACEOF
|
||||
|
||||
@@ -1657,7 +1657,7 @@ fi
|
||||
test -n "$ac_init_help" && exit $ac_status
|
||||
if $ac_init_version; then
|
||||
cat <<\_ACEOF
|
||||
-OCaml configure 4.08.1+rc2
|
||||
+OCaml configure 4.08.1+dev4-2019-07-24
|
||||
generated by GNU Autoconf 2.69
|
||||
|
||||
Copyright (C) 2012 Free Software Foundation, Inc.
|
||||
@@ -2320,7 +2320,7 @@ cat >config.log <<_ACEOF
|
||||
This file contains any messages produced by compilers while
|
||||
running configure, to aid debugging if configure makes a mistake.
|
||||
|
||||
-It was created by OCaml $as_me 4.08.1+rc2, which was
|
||||
+It was created by OCaml $as_me 4.08.1+dev4-2019-07-24, which was
|
||||
generated by GNU Autoconf 2.69. Invocation command line was
|
||||
|
||||
$ $0 $@
|
||||
@@ -2669,8 +2669,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
|
||||
|
||||
|
||||
|
||||
-{ $as_echo "$as_me:${as_lineno-$LINENO}: Configuring OCaml version 4.08.1+rc2" >&5
|
||||
-$as_echo "$as_me: Configuring OCaml version 4.08.1+rc2" >&6;}
|
||||
+{ $as_echo "$as_me:${as_lineno-$LINENO}: Configuring OCaml version 4.08.1+dev4-2019-07-24" >&5
|
||||
+$as_echo "$as_me: Configuring OCaml version 4.08.1+dev4-2019-07-24" >&6;}
|
||||
|
||||
# Configuration variables
|
||||
|
||||
@@ -2745,7 +2745,7 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
|
||||
## Output variables
|
||||
|
||||
|
||||
-VERSION=4.08.1+rc2
|
||||
+VERSION=4.08.1+dev4-2019-07-24
|
||||
|
||||
|
||||
# Note: This is present for the flexdll bootstrap where it exposed as the old
|
||||
@@ -12365,7 +12365,7 @@ case $ocaml_cv_cc_vendor in #(
|
||||
msvc-*) :
|
||||
outputobj=-Fo; CPP="cl -nologo -EP"; gcc_warnings="" ;; #(
|
||||
*) :
|
||||
- outputobj='-o $(EMPTY)'; case 4.08.1+rc2 in #(
|
||||
+ outputobj='-o $(EMPTY)'; case 4.08.1+dev4-2019-07-24 in #(
|
||||
*+dev*) :
|
||||
gcc_warnings="-Wall -Werror" ;; #(
|
||||
*) :
|
||||
@@ -17560,7 +17560,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
|
||||
# report actual input values of CONFIG_FILES etc. instead of their
|
||||
# values after options handling.
|
||||
ac_log="
|
||||
-This file was extended by OCaml $as_me 4.08.1+rc2, which was
|
||||
+This file was extended by OCaml $as_me 4.08.1+dev4-2019-07-24, which was
|
||||
generated by GNU Autoconf 2.69. Invocation command line was
|
||||
|
||||
CONFIG_FILES = $CONFIG_FILES
|
||||
@@ -17627,7 +17627,7 @@ _ACEOF
|
||||
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
||||
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
|
||||
ac_cs_version="\\
|
||||
-OCaml config.status 4.08.1+rc2
|
||||
+OCaml config.status 4.08.1+dev4-2019-07-24
|
||||
configured by $0, generated by GNU Autoconf 2.69,
|
||||
with options \\"\$ac_cs_config\\"
|
||||
|
||||
diff --git a/ocaml-variants.opam b/ocaml-variants.opam
|
||||
index dcadf49f8..69b727f5c 100644
|
||||
--- a/ocaml-variants.opam
|
||||
+++ b/ocaml-variants.opam
|
||||
@@ -1,5 +1,5 @@
|
||||
opam-version: "2.0"
|
||||
-version: "4.08.1+rc2"
|
||||
+version: "4.08.1+trunk"
|
||||
synopsis: "OCaml development version"
|
||||
depends: [
|
||||
"ocaml" {= "4.08.1" & post}
|
||||
--
|
||||
2.22.0.rc3
|
||||
|
@ -1,172 +0,0 @@
|
||||
From 44306329db8a86a2362b6345bdde69deea4935dc Mon Sep 17 00:00:00 2001
|
||||
From: David Allsopp <david.allsopp@metastack.com>
|
||||
Date: Wed, 24 Jul 2019 14:45:33 +0100
|
||||
Subject: [PATCH 2/9] Fix spelling errors reported by Lintian
|
||||
|
||||
No change entry needed
|
||||
---
|
||||
asmcomp/cmmgen.ml | 4 ++--
|
||||
manual/manual/library/compilerlibs.etex | 2 +-
|
||||
middle_end/inlining_transforms.ml | 2 +-
|
||||
otherlibs/systhreads/event.mli | 4 ++--
|
||||
parsing/ast_iterator.mli | 2 +-
|
||||
parsing/ast_mapper.mli | 2 +-
|
||||
stdlib/bigarray.mli | 2 +-
|
||||
stdlib/filename.mli | 4 ++--
|
||||
stdlib/format.ml | 2 +-
|
||||
testsuite/tests/parsetree/source.ml | 2 +-
|
||||
testsuite/tests/typing-implicit_unpack/implicit_unpack.ml | 2 +-
|
||||
11 files changed, 14 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/asmcomp/cmmgen.ml b/asmcomp/cmmgen.ml
|
||||
index d0490998c..68e36d0d9 100644
|
||||
--- a/asmcomp/cmmgen.ml
|
||||
+++ b/asmcomp/cmmgen.ml
|
||||
@@ -1528,8 +1528,8 @@ end
|
||||
phases, we only share exits *)
|
||||
(* Some specific patterns can lead to switches where several cases
|
||||
point to the same action, but this action is not an exit (see GPR#1370).
|
||||
- The addition of the index in the action array as context allows to
|
||||
- share them correctly without duplication. *)
|
||||
+ The addition of the index in the action array as context allows
|
||||
+ sharing them correctly without duplication. *)
|
||||
module StoreExpForSwitch =
|
||||
Switch.CtxStore
|
||||
(struct
|
||||
diff --git a/manual/manual/library/compilerlibs.etex b/manual/manual/library/compilerlibs.etex
|
||||
index 88abbb823..d49193767 100644
|
||||
--- a/manual/manual/library/compilerlibs.etex
|
||||
+++ b/manual/manual/library/compilerlibs.etex
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
This chapter describes the OCaml front-end, which declares the abstract
|
||||
syntax tree used by the compiler, provides a way to parse, print
|
||||
-and pretty-print OCaml code, and ultimately allows to write abstract
|
||||
+and pretty-print OCaml code, and ultimately allows one to write abstract
|
||||
syntax tree preprocessors invoked via the {\tt -ppx} flag (see chapters~\ref{c:camlc}
|
||||
and~\ref{c:nativecomp}) and plugins invoked via the {\tt -plugin} flag
|
||||
(see chapter~\ref{c:plugins}).
|
||||
diff --git a/middle_end/inlining_transforms.ml b/middle_end/inlining_transforms.ml
|
||||
index b08e62bb0..c46a6cbe6 100755
|
||||
--- a/middle_end/inlining_transforms.ml
|
||||
+++ b/middle_end/inlining_transforms.ml
|
||||
@@ -118,7 +118,7 @@ let inline_by_copying_function_body ~env ~r
|
||||
&& ((not default_inline) || (not default_specialise)) then
|
||||
(* When the function inlined function is a stub, the annotation
|
||||
is reported to the function applications inside the stub.
|
||||
- This allows to report the annotation to the application the
|
||||
+ This allows reporting the annotation to the application the
|
||||
original programmer really intended: the stub is not visible
|
||||
in the source. *)
|
||||
set_inline_attribute_on_all_apply body
|
||||
diff --git a/otherlibs/systhreads/event.mli b/otherlibs/systhreads/event.mli
|
||||
index 83dbe9a17..fd452652c 100644
|
||||
--- a/otherlibs/systhreads/event.mli
|
||||
+++ b/otherlibs/systhreads/event.mli
|
||||
@@ -59,8 +59,8 @@ val wrap_abort : 'a event -> (unit -> unit) -> 'a event
|
||||
|
||||
val guard : (unit -> 'a event) -> 'a event
|
||||
(** [guard fn] returns the event that, when synchronized, computes
|
||||
- [fn()] and behaves as the resulting event. This allows to
|
||||
- compute events with side-effects at the time of the synchronization
|
||||
+ [fn()] and behaves as the resulting event. This enables
|
||||
+ computing events with side-effects at the time of the synchronization
|
||||
operation. *)
|
||||
|
||||
val sync : 'a event -> 'a
|
||||
diff --git a/parsing/ast_iterator.mli b/parsing/ast_iterator.mli
|
||||
index 5dc1c0ec5..26308d20d 100755
|
||||
--- a/parsing/ast_iterator.mli
|
||||
+++ b/parsing/ast_iterator.mli
|
||||
@@ -13,7 +13,7 @@
|
||||
(* *)
|
||||
(**************************************************************************)
|
||||
|
||||
-(** {!iterator} allows to implement AST inspection using open recursion. A
|
||||
+(** {!iterator} enables AST inspection using open recursion. A
|
||||
typical mapper would be based on {!default_iterator}, a trivial iterator,
|
||||
and will fall back on it for handling the syntax it does not modify.
|
||||
|
||||
diff --git a/parsing/ast_mapper.mli b/parsing/ast_mapper.mli
|
||||
index b342ca8a9..80d70fcca 100644
|
||||
--- a/parsing/ast_mapper.mli
|
||||
+++ b/parsing/ast_mapper.mli
|
||||
@@ -21,7 +21,7 @@
|
||||
the -ppx rewriters, handling such details as the serialization format,
|
||||
forwarding of command-line flags, and storing state.
|
||||
|
||||
- {!mapper} allows to implement AST rewriting using open recursion.
|
||||
+ {!mapper} enables AST rewriting using open recursion.
|
||||
A typical mapper would be based on {!default_mapper}, a deep
|
||||
identity mapper, and will fall back on it for handling the syntax it
|
||||
does not modify. For example:
|
||||
diff --git a/stdlib/bigarray.mli b/stdlib/bigarray.mli
|
||||
index 2c1261212..ea26f66f5 100644
|
||||
--- a/stdlib/bigarray.mli
|
||||
+++ b/stdlib/bigarray.mli
|
||||
@@ -133,7 +133,7 @@ type ('a, 'b) kind =
|
||||
of OCaml types with element kinds, and are re-exported below for
|
||||
backward-compatibility reasons.
|
||||
|
||||
- Using a generalized algebraic datatype (GADT) here allows to write
|
||||
+ Using a generalized algebraic datatype (GADT) here allows writing
|
||||
well-typed polymorphic functions whose return type depend on the
|
||||
argument type, such as:
|
||||
|
||||
diff --git a/stdlib/filename.mli b/stdlib/filename.mli
|
||||
index b05ad0d2e..9221c9ef5 100644
|
||||
--- a/stdlib/filename.mli
|
||||
+++ b/stdlib/filename.mli
|
||||
@@ -52,8 +52,8 @@ val check_suffix : string -> string -> bool
|
||||
val chop_suffix : string -> string -> string
|
||||
(** [chop_suffix name suff] removes the suffix [suff] from
|
||||
the filename [name]. The behavior is undefined if [name] does not
|
||||
- end with the suffix [suff]. It is thus recommmended to use
|
||||
- [chop_suffix_opt] instead.
|
||||
+ end with the suffix [suff]. [chop_suffix_opt] is thus recommended
|
||||
+ instead.
|
||||
*)
|
||||
|
||||
val chop_suffix_opt: suffix:string -> string -> string option
|
||||
diff --git a/stdlib/format.ml b/stdlib/format.ml
|
||||
index ae1f3c647..369c50c36 100644
|
||||
--- a/stdlib/format.ml
|
||||
+++ b/stdlib/format.ml
|
||||
@@ -687,7 +687,7 @@ let pp_print_if_newline state () =
|
||||
{ size = Size.zero; token = Pp_if_newline; length = 0 }
|
||||
|
||||
|
||||
-(* Generalized break hint that allows to print strings before/after
|
||||
+(* Generalized break hint that allows printing strings before/after
|
||||
same-line offset (width) or new-line offset *)
|
||||
let pp_print_custom_break state ~fits ~breaks =
|
||||
let before, width, after = fits in
|
||||
diff --git a/testsuite/tests/parsetree/source.ml b/testsuite/tests/parsetree/source.ml
|
||||
index c67012e18..a183f4482 100644
|
||||
--- a/testsuite/tests/parsetree/source.ml
|
||||
+++ b/testsuite/tests/parsetree/source.ml
|
||||
@@ -3072,7 +3072,7 @@ Error: Types marked with the immediate attribute must be
|
||||
non-pointer types like int or bool
|
||||
|}];;
|
||||
(*
|
||||
- Implicit unpack allows to omit the signature in (val ...) expressions.
|
||||
+ Implicit unpack allows the signature in (val ...) expressions to be omitted.
|
||||
|
||||
It also adds (module M : S) and (module M) patterns, relying on
|
||||
implicit (val ...) for the implementation. Such patterns can only
|
||||
diff --git a/testsuite/tests/typing-implicit_unpack/implicit_unpack.ml b/testsuite/tests/typing-implicit_unpack/implicit_unpack.ml
|
||||
index a6b4d697c..e503ee736 100644
|
||||
--- a/testsuite/tests/typing-implicit_unpack/implicit_unpack.ml
|
||||
+++ b/testsuite/tests/typing-implicit_unpack/implicit_unpack.ml
|
||||
@@ -3,7 +3,7 @@
|
||||
*)
|
||||
|
||||
(*
|
||||
- Implicit unpack allows to omit the signature in (val ...) expressions.
|
||||
+ Implicit unpack allows the signature in (val ...) expressions to be omitted.
|
||||
|
||||
It also adds (module M : S) and (module M) patterns, relying on
|
||||
implicit (val ...) for the implementation. Such patterns can only
|
||||
--
|
||||
2.22.0.rc3
|
||||
|
240
0002-ocamlbyteinfo-ocamlplugininfo-Useful-utilities-from-.patch
Normal file
240
0002-ocamlbyteinfo-ocamlplugininfo-Useful-utilities-from-.patch
Normal file
@ -0,0 +1,240 @@
|
||||
From 010f13a4bc64e3d37aaea3b4fee56295672b91ff Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Tue, 29 May 2012 20:40:36 +0100
|
||||
Subject: [PATCH 2/7] ocamlbyteinfo, ocamlplugininfo: Useful utilities from
|
||||
Debian, sent upstream.
|
||||
|
||||
See:
|
||||
http://git.debian.org/?p=pkg-ocaml-maint/packages/ocaml.git;a=tree;f=debian/ocamlbyteinfo;hb=HEAD
|
||||
---
|
||||
ocamlbyteinfo.ml | 101 +++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
ocamlplugininfo.ml | 109 +++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
2 files changed, 210 insertions(+)
|
||||
create mode 100644 ocamlbyteinfo.ml
|
||||
create mode 100644 ocamlplugininfo.ml
|
||||
|
||||
diff --git a/ocamlbyteinfo.ml b/ocamlbyteinfo.ml
|
||||
new file mode 100644
|
||||
index 000000000..0a537e4d5
|
||||
--- /dev/null
|
||||
+++ b/ocamlbyteinfo.ml
|
||||
@@ -0,0 +1,101 @@
|
||||
+(***********************************************************************)
|
||||
+(* *)
|
||||
+(* Objective Caml *)
|
||||
+(* *)
|
||||
+(* Xavier Leroy, projet Gallium, INRIA Rocquencourt *)
|
||||
+(* *)
|
||||
+(* Copyright 2009 Institut National de Recherche en Informatique et *)
|
||||
+(* en Automatique. All rights reserved. This file is distributed *)
|
||||
+(* under the terms of the GNU Library General Public License, with *)
|
||||
+(* the special exception on linking described in file ../../LICENSE. *)
|
||||
+(* *)
|
||||
+(***********************************************************************)
|
||||
+
|
||||
+(* $Id$ *)
|
||||
+
|
||||
+(* Dumps a bytecode binary file *)
|
||||
+
|
||||
+open Sys
|
||||
+open Dynlinkaux
|
||||
+
|
||||
+let input_stringlist ic len =
|
||||
+ let get_string_list sect len =
|
||||
+ let rec fold s e acc =
|
||||
+ if e != len then
|
||||
+ if sect.[e] = '\000' then
|
||||
+ fold (e+1) (e+1) (String.sub sect s (e-s) :: acc)
|
||||
+ else fold s (e+1) acc
|
||||
+ else acc
|
||||
+ in fold 0 0 []
|
||||
+ in
|
||||
+ let sect = Bytes.create len in
|
||||
+ let _ = really_input ic sect 0 len in
|
||||
+ get_string_list (Bytes.to_string sect) len
|
||||
+
|
||||
+let print = Printf.printf
|
||||
+let perr s =
|
||||
+ Printf.eprintf "%s\n" s;
|
||||
+ exit(1)
|
||||
+let p_title title = print "%s:\n" title
|
||||
+
|
||||
+let p_section title format pdata = function
|
||||
+ | [] -> ()
|
||||
+ | l ->
|
||||
+ p_title title;
|
||||
+ List.iter
|
||||
+ (fun (name, data) -> print format (pdata data) name)
|
||||
+ l
|
||||
+
|
||||
+let p_list title format = function
|
||||
+ | [] -> ()
|
||||
+ | l ->
|
||||
+ p_title title;
|
||||
+ List.iter
|
||||
+ (fun name -> print format name)
|
||||
+ l
|
||||
+
|
||||
+let _ =
|
||||
+ try
|
||||
+ let input_name = Sys.argv.(1) in
|
||||
+ let ic = open_in_bin input_name in
|
||||
+ Bytesections.read_toc ic;
|
||||
+ List.iter
|
||||
+ (fun section ->
|
||||
+ try
|
||||
+ let len = Bytesections.seek_section ic section in
|
||||
+ if len > 0 then match section with
|
||||
+ | "CRCS" ->
|
||||
+ p_section
|
||||
+ "Imported Units"
|
||||
+ "\t%s\t%s\n"
|
||||
+ Digest.to_hex
|
||||
+ (input_value ic : (string * Digest.t) list)
|
||||
+ | "DLLS" ->
|
||||
+ p_list
|
||||
+ "Used Dlls" "\t%s\n"
|
||||
+ (input_stringlist ic len)
|
||||
+ | "DLPT" ->
|
||||
+ p_list
|
||||
+ "Additional Dll paths"
|
||||
+ "\t%s\n"
|
||||
+ (input_stringlist ic len)
|
||||
+ | "PRIM" ->
|
||||
+ let prims = (input_stringlist ic len) in
|
||||
+ print "Uses unsafe features: ";
|
||||
+ begin match prims with
|
||||
+ [] -> print "no\n"
|
||||
+ | l -> print "YES\n";
|
||||
+ p_list "Primitives declared in this module"
|
||||
+ "\t%s\n"
|
||||
+ l
|
||||
+ end
|
||||
+ | _ -> ()
|
||||
+ with Not_found | Failure _ | Invalid_argument _ -> ()
|
||||
+ )
|
||||
+ ["CRCS"; "DLLS"; "DLPT"; "PRIM"];
|
||||
+ close_in ic
|
||||
+ with
|
||||
+ | Sys_error msg ->
|
||||
+ perr msg
|
||||
+ | Invalid_argument("index out of bounds") ->
|
||||
+ perr (Printf.sprintf "Usage: %s filename" Sys.argv.(0))
|
||||
diff --git a/ocamlplugininfo.ml b/ocamlplugininfo.ml
|
||||
new file mode 100644
|
||||
index 000000000..e28800f31
|
||||
--- /dev/null
|
||||
+++ b/ocamlplugininfo.ml
|
||||
@@ -0,0 +1,109 @@
|
||||
+(***********************************************************************)
|
||||
+(* *)
|
||||
+(* Objective Caml *)
|
||||
+(* *)
|
||||
+(* Xavier Leroy, projet Gallium, INRIA Rocquencourt *)
|
||||
+(* *)
|
||||
+(* Copyright 2009 Institut National de Recherche en Informatique et *)
|
||||
+(* en Automatique. All rights reserved. This file is distributed *)
|
||||
+(* under the terms of the GNU Library General Public License, with *)
|
||||
+(* the special exception on linking described in file ../../LICENSE. *)
|
||||
+(* *)
|
||||
+(***********************************************************************)
|
||||
+
|
||||
+(* $Id$ *)
|
||||
+
|
||||
+(* Dumps a .cmxs file *)
|
||||
+
|
||||
+open Natdynlink
|
||||
+open Format
|
||||
+
|
||||
+let file =
|
||||
+ try
|
||||
+ Sys.argv.(1)
|
||||
+ with _ -> begin
|
||||
+ Printf.eprintf "Usage: %s file.cmxs\n" Sys.argv.(0);
|
||||
+ exit(1)
|
||||
+ end
|
||||
+
|
||||
+exception Abnormal_exit
|
||||
+
|
||||
+let error s e =
|
||||
+ let eprint = Printf.eprintf in
|
||||
+ let print_exc s = function
|
||||
+ | End_of_file ->
|
||||
+ eprint "%s: %s\n" s file
|
||||
+ | Abnormal_exit ->
|
||||
+ eprint "%s\n" s
|
||||
+ | e -> eprint "%s\n" (Printexc.to_string e)
|
||||
+ in
|
||||
+ print_exc s e;
|
||||
+ exit(1)
|
||||
+
|
||||
+let read_in command =
|
||||
+ let cmd = Printf.sprintf command file in
|
||||
+ let ic = Unix.open_process_in cmd in
|
||||
+ try
|
||||
+ let line = input_line ic in
|
||||
+ begin match (Unix.close_process_in ic) with
|
||||
+ | Unix.WEXITED 0 -> Str.split (Str.regexp "[ ]+") line
|
||||
+ | Unix.WEXITED _ | Unix.WSIGNALED _ | Unix.WSTOPPED _ ->
|
||||
+ error
|
||||
+ (Printf.sprintf
|
||||
+ "Command \"%s\" exited abnormally"
|
||||
+ cmd
|
||||
+ )
|
||||
+ Abnormal_exit
|
||||
+ end
|
||||
+ with e -> error "File is empty" e
|
||||
+
|
||||
+let get_offset adr_off adr_sec =
|
||||
+ try
|
||||
+ let adr = List.nth adr_off 4 in
|
||||
+ let off = List.nth adr_off 5 in
|
||||
+ let sec = List.hd adr_sec in
|
||||
+
|
||||
+ let (!) x = Int64.of_string ("0x" ^ x) in
|
||||
+ let (+) = Int64.add in
|
||||
+ let (-) = Int64.sub in
|
||||
+
|
||||
+ Int64.to_int (!off + !sec - !adr)
|
||||
+
|
||||
+ with Failure _ | Invalid_argument _ ->
|
||||
+ error
|
||||
+ "Command output doesn't have the expected format"
|
||||
+ Abnormal_exit
|
||||
+
|
||||
+let print_infos name crc defines cmi cmx =
|
||||
+ let print_name_crc (name, crc) =
|
||||
+ printf "@ %s (%s)" name (Digest.to_hex crc)
|
||||
+ in
|
||||
+ let pr_imports ppf imps = List.iter print_name_crc imps in
|
||||
+ printf "Name: %s@." name;
|
||||
+ printf "CRC of implementation: %s@." (Digest.to_hex crc);
|
||||
+ printf "@[<hov 2>Globals defined:";
|
||||
+ List.iter (fun s -> printf "@ %s" s) defines;
|
||||
+ printf "@]@.";
|
||||
+ printf "@[<v 2>Interfaces imported:%a@]@." pr_imports cmi;
|
||||
+ printf "@[<v 2>Implementations imported:%a@]@." pr_imports cmx
|
||||
+
|
||||
+let _ =
|
||||
+ let adr_off = read_in "objdump -h %s | grep ' .data '" in
|
||||
+ let adr_sec = read_in "objdump -T %s | grep ' caml_plugin_header$'" in
|
||||
+
|
||||
+ let ic = open_in file in
|
||||
+ let _ = seek_in ic (get_offset adr_off adr_sec) in
|
||||
+ let header = (input_value ic : Natdynlink.dynheader) in
|
||||
+ if header.magic <> Natdynlink.dyn_magic_number then
|
||||
+ raise(Error(Natdynlink.Not_a_bytecode_file file))
|
||||
+ else begin
|
||||
+ List.iter
|
||||
+ (fun ui ->
|
||||
+ print_infos
|
||||
+ ui.name
|
||||
+ ui.crc
|
||||
+ ui.defines
|
||||
+ ui.imports_cmi
|
||||
+ ui.imports_cmx)
|
||||
+ header.units
|
||||
+ end
|
||||
--
|
||||
2.16.2
|
||||
|
@ -1,40 +0,0 @@
|
||||
From 655519a3653a8e5b90e0fd862f9c5e20465ab7d0 Mon Sep 17 00:00:00 2001
|
||||
From: Stephane Glondu <steph@glondu.net>
|
||||
Date: Thu, 25 Jul 2019 09:08:03 +0200
|
||||
Subject: [PATCH 3/9] Fix language of some error messages in ocamldoc
|
||||
|
||||
No change entry needed
|
||||
---
|
||||
ocamldoc/odoc_sig.ml | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/ocamldoc/odoc_sig.ml b/ocamldoc/odoc_sig.ml
|
||||
index fb2eac671..e413c11a6 100644
|
||||
--- a/ocamldoc/odoc_sig.ml
|
||||
+++ b/ocamldoc/odoc_sig.ml
|
||||
@@ -1740,11 +1740,11 @@ module Analyser =
|
||||
)
|
||||
else
|
||||
(
|
||||
- raise (Failure "Parsetree.Pcty_arrow (parse_label, _, pclass_type), labels differents")
|
||||
+ raise (Failure "Parsetree.Pcty_arrow (parse_label, _, pclass_type), different labels")
|
||||
)
|
||||
|
||||
| _ ->
|
||||
- raise (Failure "analyse_class_kind pas de correspondance dans le match")
|
||||
+ raise (Failure "analyse_class_kind: match failure")
|
||||
|
||||
(** Analyse of a Parsetree.class_type and a Types.class_type to return a class_type_kind.*)
|
||||
and analyse_class_type_kind env current_class_name last_pos parse_class_type sig_class_type =
|
||||
@@ -1799,7 +1799,7 @@ module Analyser =
|
||||
([], k)
|
||||
*)
|
||||
| _ ->
|
||||
- raise (Failure "analyse_class_type_kind pas de correspondance dans le match")
|
||||
+ raise (Failure "analyse_class_type_kind: match failure")
|
||||
|
||||
let analyse_signature source_file input_file
|
||||
(ast : Parsetree.signature) (signat : Types.signature) =
|
||||
--
|
||||
2.22.0.rc3
|
||||
|
27
0003-configure-Allow-user-defined-C-compiler-flags.patch
Normal file
27
0003-configure-Allow-user-defined-C-compiler-flags.patch
Normal file
@ -0,0 +1,27 @@
|
||||
From 19dbb0c6b73513dddef2702daedcb68bba375af1 Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Tue, 29 May 2012 20:44:18 +0100
|
||||
Subject: [PATCH 3/7] configure: Allow user defined C compiler flags.
|
||||
|
||||
---
|
||||
configure | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/configure b/configure
|
||||
index 1316b3c1e..53f45f85b 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -2050,6 +2050,10 @@ if $flat_float_array; then
|
||||
echo "#define FLAT_FLOAT_ARRAY" >> m.h
|
||||
fi
|
||||
|
||||
+# Allow user defined C Compiler flags
|
||||
+bytecccompopts="$bytecccompopts $CFLAGS"
|
||||
+nativecccompopts="$nativecccompopts $CFLAGS"
|
||||
+
|
||||
# Finish generated files
|
||||
|
||||
cclibs="$cclibs $mathlib"
|
||||
--
|
||||
2.16.2
|
||||
|
1768
0004-Add-RISC-V-backend.patch
Normal file
1768
0004-Add-RISC-V-backend.patch
Normal file
File diff suppressed because it is too large
Load Diff
717
0005-Copyright-untabify.patch
Normal file
717
0005-Copyright-untabify.patch
Normal file
@ -0,0 +1,717 @@
|
||||
From 58821468995b2dbe18cb1c7259fc5447e2c417ca Mon Sep 17 00:00:00 2001
|
||||
From: Nicolas Ojeda Bar <n.oje.bar@gmail.com>
|
||||
Date: Fri, 1 Dec 2017 14:39:46 +0100
|
||||
Subject: [PATCH 5/7] Copyright, untabify
|
||||
|
||||
---
|
||||
asmrun/riscv.S | 608 ++++++++++++++++++++++++++++-----------------------------
|
||||
1 file changed, 304 insertions(+), 304 deletions(-)
|
||||
|
||||
diff --git a/asmrun/riscv.S b/asmrun/riscv.S
|
||||
index a82048efc..88d7ab924 100644
|
||||
--- a/asmrun/riscv.S
|
||||
+++ b/asmrun/riscv.S
|
||||
@@ -4,7 +4,7 @@
|
||||
/* */
|
||||
/* Nicolas Ojeda Bar <n.oje.bar@gmail.com> */
|
||||
/* */
|
||||
-/* Copyright 1996 Institut National de Recherche en Informatique et */
|
||||
+/* Copyright 2017 Institut National de Recherche en Informatique et */
|
||||
/* en Automatique. All rights reserved. This file is distributed */
|
||||
/* under the terms of the GNU Library General Public License, with */
|
||||
/* the special exception on linking described in file ../LICENSE. */
|
||||
@@ -37,388 +37,388 @@
|
||||
.option nopic
|
||||
#endif
|
||||
|
||||
- .section .text
|
||||
+ .section .text
|
||||
/* Invoke the garbage collector. */
|
||||
|
||||
- .globl caml_system__code_begin
|
||||
+ .globl caml_system__code_begin
|
||||
caml_system__code_begin:
|
||||
|
||||
- .align 2
|
||||
- .globl caml_call_gc
|
||||
- .type caml_call_gc, @function
|
||||
+ .align 2
|
||||
+ .globl caml_call_gc
|
||||
+ .type caml_call_gc, @function
|
||||
caml_call_gc:
|
||||
/* Record return address */
|
||||
- store ra, caml_last_return_address, TMP0
|
||||
+ store ra, caml_last_return_address, TMP0
|
||||
/* Record lowest stack address */
|
||||
- mv TMP1, sp
|
||||
- store sp, caml_bottom_of_stack, TMP0
|
||||
+ mv TMP1, sp
|
||||
+ store sp, caml_bottom_of_stack, TMP0
|
||||
.Lcaml_call_gc:
|
||||
- /* Set up stack space, saving return address */
|
||||
+ /* Set up stack space, saving return address */
|
||||
/* (1 reg for RA, 1 reg for FP, 21 allocatable int regs, 20 caller-save float regs) * 8 */
|
||||
/* + 1 for alignment */
|
||||
- addi sp, sp, -0x160
|
||||
- mv s0, sp
|
||||
- store ra, 0x8(sp)
|
||||
- store s0, 0x0(sp)
|
||||
+ addi sp, sp, -0x160
|
||||
+ mv s0, sp
|
||||
+ store ra, 0x8(sp)
|
||||
+ store s0, 0x0(sp)
|
||||
/* Save allocatable integer registers on the stack,
|
||||
in the order given in proc.ml */
|
||||
- store a0, 0x10(sp)
|
||||
- store a1, 0x18(sp)
|
||||
- store a2, 0x20(sp)
|
||||
- store a3, 0x28(sp)
|
||||
- store a4, 0x30(sp)
|
||||
- store a5, 0x38(sp)
|
||||
- store a6, 0x40(sp)
|
||||
- store a7, 0x48(sp)
|
||||
- store s2, 0x50(sp)
|
||||
- store s3, 0x58(sp)
|
||||
- store s4, 0x60(sp)
|
||||
- store s5, 0x68(sp)
|
||||
- store s6, 0x70(sp)
|
||||
- store s7, 0x78(sp)
|
||||
- store s8, 0x80(sp)
|
||||
- store s9, 0x88(sp)
|
||||
- store t2, 0x90(sp)
|
||||
- store t3, 0x98(sp)
|
||||
- store t4, 0xa0(sp)
|
||||
- store t5, 0xa8(sp)
|
||||
- store t6, 0xb0(sp)
|
||||
+ store a0, 0x10(sp)
|
||||
+ store a1, 0x18(sp)
|
||||
+ store a2, 0x20(sp)
|
||||
+ store a3, 0x28(sp)
|
||||
+ store a4, 0x30(sp)
|
||||
+ store a5, 0x38(sp)
|
||||
+ store a6, 0x40(sp)
|
||||
+ store a7, 0x48(sp)
|
||||
+ store s2, 0x50(sp)
|
||||
+ store s3, 0x58(sp)
|
||||
+ store s4, 0x60(sp)
|
||||
+ store s5, 0x68(sp)
|
||||
+ store s6, 0x70(sp)
|
||||
+ store s7, 0x78(sp)
|
||||
+ store s8, 0x80(sp)
|
||||
+ store s9, 0x88(sp)
|
||||
+ store t2, 0x90(sp)
|
||||
+ store t3, 0x98(sp)
|
||||
+ store t4, 0xa0(sp)
|
||||
+ store t5, 0xa8(sp)
|
||||
+ store t6, 0xb0(sp)
|
||||
/* Save caller-save floating-point registers on the stack
|
||||
(callee-saves are preserved by caml_garbage_collection) */
|
||||
- fsd ft0, 0xb8(sp)
|
||||
- fsd ft1, 0xc0(sp)
|
||||
- fsd ft2, 0xc8(sp)
|
||||
- fsd ft3, 0xd0(sp)
|
||||
- fsd ft4, 0xd8(sp)
|
||||
- fsd ft5, 0xe0(sp)
|
||||
- fsd ft6, 0xe8(sp)
|
||||
- fsd ft7, 0xf0(sp)
|
||||
- fsd fa0, 0xf8(sp)
|
||||
- fsd fa1, 0x100(sp)
|
||||
- fsd fa2, 0x108(sp)
|
||||
- fsd fa3, 0x110(sp)
|
||||
- fsd fa4, 0x118(sp)
|
||||
- fsd fa5, 0x120(sp)
|
||||
- fsd fa6, 0x128(sp)
|
||||
- fsd fa7, 0x130(sp)
|
||||
- fsd ft8, 0x138(sp)
|
||||
- fsd ft9, 0x140(sp)
|
||||
- fsd ft9, 0x148(sp)
|
||||
- fsd ft10, 0x150(sp)
|
||||
- fsd ft11, 0x158(sp)
|
||||
+ fsd ft0, 0xb8(sp)
|
||||
+ fsd ft1, 0xc0(sp)
|
||||
+ fsd ft2, 0xc8(sp)
|
||||
+ fsd ft3, 0xd0(sp)
|
||||
+ fsd ft4, 0xd8(sp)
|
||||
+ fsd ft5, 0xe0(sp)
|
||||
+ fsd ft6, 0xe8(sp)
|
||||
+ fsd ft7, 0xf0(sp)
|
||||
+ fsd fa0, 0xf8(sp)
|
||||
+ fsd fa1, 0x100(sp)
|
||||
+ fsd fa2, 0x108(sp)
|
||||
+ fsd fa3, 0x110(sp)
|
||||
+ fsd fa4, 0x118(sp)
|
||||
+ fsd fa5, 0x120(sp)
|
||||
+ fsd fa6, 0x128(sp)
|
||||
+ fsd fa7, 0x130(sp)
|
||||
+ fsd ft8, 0x138(sp)
|
||||
+ fsd ft9, 0x140(sp)
|
||||
+ fsd ft9, 0x148(sp)
|
||||
+ fsd ft10, 0x150(sp)
|
||||
+ fsd ft11, 0x158(sp)
|
||||
/* Store pointer to saved integer registers in caml_gc_regs */
|
||||
- addi TMP1, sp, 16
|
||||
- store TMP1, caml_gc_regs, TMP0
|
||||
+ addi TMP1, sp, 16
|
||||
+ store TMP1, caml_gc_regs, TMP0
|
||||
/* Save current allocation pointer for debugging purposes */
|
||||
- store ALLOC_PTR, caml_young_ptr, TMP0
|
||||
+ store ALLOC_PTR, caml_young_ptr, TMP0
|
||||
/* Save trap pointer in case an exception is raised during GC */
|
||||
- store TRAP_PTR, caml_exception_pointer, TMP0
|
||||
+ store TRAP_PTR, caml_exception_pointer, TMP0
|
||||
/* Call the garbage collector */
|
||||
- call caml_garbage_collection
|
||||
+ call caml_garbage_collection
|
||||
/* Restore registers */
|
||||
- load a0, 0x10(sp)
|
||||
- load a1, 0x18(sp)
|
||||
- load a2, 0x20(sp)
|
||||
- load a3, 0x28(sp)
|
||||
- load a4, 0x30(sp)
|
||||
- load a5, 0x38(sp)
|
||||
- load a6, 0x40(sp)
|
||||
- load a7, 0x48(sp)
|
||||
- load s2, 0x50(sp)
|
||||
- load s3, 0x58(sp)
|
||||
- load s4, 0x60(sp)
|
||||
- load s5, 0x68(sp)
|
||||
- load s6, 0x70(sp)
|
||||
- load s7, 0x78(sp)
|
||||
- load s8, 0x80(sp)
|
||||
- load s9, 0x88(sp)
|
||||
- load t2, 0x90(sp)
|
||||
- load t3, 0x98(sp)
|
||||
- load t4, 0xa0(sp)
|
||||
- load t5, 0xa8(sp)
|
||||
- load t6, 0xb0(sp)
|
||||
- fld ft0, 0xb8(sp)
|
||||
- fld ft1, 0xc0(sp)
|
||||
- fld ft2, 0xc8(sp)
|
||||
- fld ft3, 0xd0(sp)
|
||||
- fld ft4, 0xd8(sp)
|
||||
- fld ft5, 0xe0(sp)
|
||||
- fld ft6, 0xe8(sp)
|
||||
- fld ft7, 0xf0(sp)
|
||||
- fld fa0, 0xf8(sp)
|
||||
- fld fa1, 0x100(sp)
|
||||
- fld fa2, 0x108(sp)
|
||||
- fld fa3, 0x110(sp)
|
||||
- fld fa4, 0x118(sp)
|
||||
- fld fa5, 0x120(sp)
|
||||
- fld fa6, 0x128(sp)
|
||||
- fld fa7, 0x130(sp)
|
||||
- fld ft8, 0x138(sp)
|
||||
- fld ft9, 0x140(sp)
|
||||
- fld ft9, 0x148(sp)
|
||||
- fld ft10, 0x150(sp)
|
||||
- fld ft11, 0x158(sp)
|
||||
+ load a0, 0x10(sp)
|
||||
+ load a1, 0x18(sp)
|
||||
+ load a2, 0x20(sp)
|
||||
+ load a3, 0x28(sp)
|
||||
+ load a4, 0x30(sp)
|
||||
+ load a5, 0x38(sp)
|
||||
+ load a6, 0x40(sp)
|
||||
+ load a7, 0x48(sp)
|
||||
+ load s2, 0x50(sp)
|
||||
+ load s3, 0x58(sp)
|
||||
+ load s4, 0x60(sp)
|
||||
+ load s5, 0x68(sp)
|
||||
+ load s6, 0x70(sp)
|
||||
+ load s7, 0x78(sp)
|
||||
+ load s8, 0x80(sp)
|
||||
+ load s9, 0x88(sp)
|
||||
+ load t2, 0x90(sp)
|
||||
+ load t3, 0x98(sp)
|
||||
+ load t4, 0xa0(sp)
|
||||
+ load t5, 0xa8(sp)
|
||||
+ load t6, 0xb0(sp)
|
||||
+ fld ft0, 0xb8(sp)
|
||||
+ fld ft1, 0xc0(sp)
|
||||
+ fld ft2, 0xc8(sp)
|
||||
+ fld ft3, 0xd0(sp)
|
||||
+ fld ft4, 0xd8(sp)
|
||||
+ fld ft5, 0xe0(sp)
|
||||
+ fld ft6, 0xe8(sp)
|
||||
+ fld ft7, 0xf0(sp)
|
||||
+ fld fa0, 0xf8(sp)
|
||||
+ fld fa1, 0x100(sp)
|
||||
+ fld fa2, 0x108(sp)
|
||||
+ fld fa3, 0x110(sp)
|
||||
+ fld fa4, 0x118(sp)
|
||||
+ fld fa5, 0x120(sp)
|
||||
+ fld fa6, 0x128(sp)
|
||||
+ fld fa7, 0x130(sp)
|
||||
+ fld ft8, 0x138(sp)
|
||||
+ fld ft9, 0x140(sp)
|
||||
+ fld ft9, 0x148(sp)
|
||||
+ fld ft10, 0x150(sp)
|
||||
+ fld ft11, 0x158(sp)
|
||||
/* Reload new allocation pointer and allocation limit */
|
||||
- load ALLOC_PTR, caml_young_ptr
|
||||
- load ALLOC_LIMIT, caml_young_limit
|
||||
+ load ALLOC_PTR, caml_young_ptr
|
||||
+ load ALLOC_LIMIT, caml_young_limit
|
||||
/* Free stack space and return to caller */
|
||||
- load ra, 0x8(sp)
|
||||
- load s0, 0x0(sp)
|
||||
- addi sp, sp, 0x160
|
||||
+ load ra, 0x8(sp)
|
||||
+ load s0, 0x0(sp)
|
||||
+ addi sp, sp, 0x160
|
||||
ret
|
||||
- .size caml_call_gc, .-caml_call_gc
|
||||
+ .size caml_call_gc, .-caml_call_gc
|
||||
|
||||
/* Call a C function from OCaml */
|
||||
/* Function to call is in ARG */
|
||||
|
||||
- .align 2
|
||||
- .globl caml_c_call
|
||||
- .type caml_c_call, @function
|
||||
+ .align 2
|
||||
+ .globl caml_c_call
|
||||
+ .type caml_c_call, @function
|
||||
caml_c_call:
|
||||
/* Preserve return address in callee-save register s2 */
|
||||
- mv s2, ra
|
||||
+ mv s2, ra
|
||||
/* Record lowest stack address and return address */
|
||||
- store ra, caml_last_return_address, TMP0
|
||||
- store sp, caml_bottom_of_stack, TMP0
|
||||
+ store ra, caml_last_return_address, TMP0
|
||||
+ store sp, caml_bottom_of_stack, TMP0
|
||||
/* Make the exception handler alloc ptr available to the C code */
|
||||
- store ALLOC_PTR, caml_young_ptr, TMP0
|
||||
- store TRAP_PTR, caml_exception_pointer, TMP0
|
||||
+ store ALLOC_PTR, caml_young_ptr, TMP0
|
||||
+ store TRAP_PTR, caml_exception_pointer, TMP0
|
||||
/* Call the function */
|
||||
- jalr ARG
|
||||
+ jalr ARG
|
||||
/* Reload alloc ptr and alloc limit */
|
||||
- load ALLOC_PTR, caml_young_ptr
|
||||
- load TRAP_PTR, caml_exception_pointer
|
||||
+ load ALLOC_PTR, caml_young_ptr
|
||||
+ load TRAP_PTR, caml_exception_pointer
|
||||
/* Return */
|
||||
- jr s2
|
||||
- .size caml_c_call, .-caml_c_call
|
||||
+ jr s2
|
||||
+ .size caml_c_call, .-caml_c_call
|
||||
|
||||
/* Raise an exception from OCaml */
|
||||
- .align 2
|
||||
- .globl caml_raise_exn
|
||||
- .type caml_raise_exn, @function
|
||||
+ .align 2
|
||||
+ .globl caml_raise_exn
|
||||
+ .type caml_raise_exn, @function
|
||||
caml_raise_exn:
|
||||
/* Test if backtrace is active */
|
||||
- load TMP1, caml_backtrace_active
|
||||
- bnez TMP1, 2f
|
||||
+ load TMP1, caml_backtrace_active
|
||||
+ bnez TMP1, 2f
|
||||
1: /* Cut stack at current trap handler */
|
||||
- mv sp, TRAP_PTR
|
||||
+ mv sp, TRAP_PTR
|
||||
/* Pop previous handler and jump to it */
|
||||
- load TMP1, 8(sp)
|
||||
- load TRAP_PTR, 0(sp)
|
||||
- addi sp, sp, 16
|
||||
- jr TMP1
|
||||
+ load TMP1, 8(sp)
|
||||
+ load TRAP_PTR, 0(sp)
|
||||
+ addi sp, sp, 16
|
||||
+ jr TMP1
|
||||
2: /* Preserve exception bucket in callee-save register s2 */
|
||||
- mv s2, a0
|
||||
+ mv s2, a0
|
||||
/* Stash the backtrace */
|
||||
- mv a1, ra
|
||||
- mv a2, sp
|
||||
- mv a3, TRAP_PTR
|
||||
- call caml_stash_backtrace
|
||||
+ mv a1, ra
|
||||
+ mv a2, sp
|
||||
+ mv a3, TRAP_PTR
|
||||
+ call caml_stash_backtrace
|
||||
/* Restore exception bucket and raise */
|
||||
- mv a0, s2
|
||||
- j 1b
|
||||
- .size caml_raise_exn, .-caml_raise_exn
|
||||
+ mv a0, s2
|
||||
+ j 1b
|
||||
+ .size caml_raise_exn, .-caml_raise_exn
|
||||
|
||||
- .globl caml_reraise_exn
|
||||
- .type caml_reraise_exn, @function
|
||||
+ .globl caml_reraise_exn
|
||||
+ .type caml_reraise_exn, @function
|
||||
|
||||
/* Raise an exception from C */
|
||||
|
||||
- .align 2
|
||||
- .globl caml_raise_exception
|
||||
- .type caml_raise_exception, @function
|
||||
+ .align 2
|
||||
+ .globl caml_raise_exception
|
||||
+ .type caml_raise_exception, @function
|
||||
caml_raise_exception:
|
||||
- load TRAP_PTR, caml_exception_pointer
|
||||
- load ALLOC_PTR, caml_young_ptr
|
||||
- load ALLOC_LIMIT, caml_young_limit
|
||||
- load TMP1, caml_backtrace_active
|
||||
- bnez TMP1, 2f
|
||||
+ load TRAP_PTR, caml_exception_pointer
|
||||
+ load ALLOC_PTR, caml_young_ptr
|
||||
+ load ALLOC_LIMIT, caml_young_limit
|
||||
+ load TMP1, caml_backtrace_active
|
||||
+ bnez TMP1, 2f
|
||||
1: /* Cut stack at current trap handler */
|
||||
- mv sp, TRAP_PTR
|
||||
- load TMP1, 8(sp)
|
||||
- load TRAP_PTR, 0(sp)
|
||||
- addi sp, sp, 16
|
||||
- jr TMP1
|
||||
+ mv sp, TRAP_PTR
|
||||
+ load TMP1, 8(sp)
|
||||
+ load TRAP_PTR, 0(sp)
|
||||
+ addi sp, sp, 16
|
||||
+ jr TMP1
|
||||
2: /* Preserve exception bucket in callee-save register s2 */
|
||||
- mv s2, a0
|
||||
- load a1, caml_last_return_address
|
||||
- load a2, caml_bottom_of_stack
|
||||
- mv a3, TRAP_PTR
|
||||
- call caml_stash_backtrace
|
||||
- mv a0, s2
|
||||
- j 1b
|
||||
- .size caml_raise_exception, .-caml_raise_exception
|
||||
+ mv s2, a0
|
||||
+ load a1, caml_last_return_address
|
||||
+ load a2, caml_bottom_of_stack
|
||||
+ mv a3, TRAP_PTR
|
||||
+ call caml_stash_backtrace
|
||||
+ mv a0, s2
|
||||
+ j 1b
|
||||
+ .size caml_raise_exception, .-caml_raise_exception
|
||||
|
||||
/* Start the OCaml program */
|
||||
|
||||
- .align 2
|
||||
- .globl caml_start_program
|
||||
- .type caml_start_program, @function
|
||||
+ .align 2
|
||||
+ .globl caml_start_program
|
||||
+ .type caml_start_program, @function
|
||||
caml_start_program:
|
||||
|
||||
- la ARG, caml_program
|
||||
+ la ARG, caml_program
|
||||
/* Code shared with caml_callback* */
|
||||
/* Address of OCaml code to call is in ARG */
|
||||
/* Arguments to the OCaml code are in a0 ... a7 */
|
||||
.Ljump_to_caml:
|
||||
- /* Set up stack frame and save callee-save registers */
|
||||
- addi sp, sp, -0xd0
|
||||
- store ra, 0xc0(sp)
|
||||
- store s0, 0x0(sp)
|
||||
- store s1, 0x8(sp)
|
||||
- store s2, 0x10(sp)
|
||||
- store s3, 0x18(sp)
|
||||
- store s4, 0x20(sp)
|
||||
- store s5, 0x28(sp)
|
||||
- store s6, 0x30(sp)
|
||||
- store s7, 0x38(sp)
|
||||
- store s8, 0x40(sp)
|
||||
- store s9, 0x48(sp)
|
||||
- store s10, 0x50(sp)
|
||||
- store s11, 0x58(sp)
|
||||
- fsd fs0, 0x60(sp)
|
||||
- fsd fs1, 0x68(sp)
|
||||
- fsd fs2, 0x70(sp)
|
||||
- fsd fs3, 0x78(sp)
|
||||
- fsd fs4, 0x80(sp)
|
||||
- fsd fs5, 0x88(sp)
|
||||
- fsd fs6, 0x90(sp)
|
||||
- fsd fs7, 0x98(sp)
|
||||
- fsd fs8, 0xa0(sp)
|
||||
- fsd fs9, 0xa8(sp)
|
||||
- fsd fs10, 0xb0(sp)
|
||||
- fsd fs11, 0xb8(sp)
|
||||
- addi sp, sp, -32
|
||||
+ /* Set up stack frame and save callee-save registers */
|
||||
+ addi sp, sp, -0xd0
|
||||
+ store ra, 0xc0(sp)
|
||||
+ store s0, 0x0(sp)
|
||||
+ store s1, 0x8(sp)
|
||||
+ store s2, 0x10(sp)
|
||||
+ store s3, 0x18(sp)
|
||||
+ store s4, 0x20(sp)
|
||||
+ store s5, 0x28(sp)
|
||||
+ store s6, 0x30(sp)
|
||||
+ store s7, 0x38(sp)
|
||||
+ store s8, 0x40(sp)
|
||||
+ store s9, 0x48(sp)
|
||||
+ store s10, 0x50(sp)
|
||||
+ store s11, 0x58(sp)
|
||||
+ fsd fs0, 0x60(sp)
|
||||
+ fsd fs1, 0x68(sp)
|
||||
+ fsd fs2, 0x70(sp)
|
||||
+ fsd fs3, 0x78(sp)
|
||||
+ fsd fs4, 0x80(sp)
|
||||
+ fsd fs5, 0x88(sp)
|
||||
+ fsd fs6, 0x90(sp)
|
||||
+ fsd fs7, 0x98(sp)
|
||||
+ fsd fs8, 0xa0(sp)
|
||||
+ fsd fs9, 0xa8(sp)
|
||||
+ fsd fs10, 0xb0(sp)
|
||||
+ fsd fs11, 0xb8(sp)
|
||||
+ addi sp, sp, -32
|
||||
/* Setup a callback link on the stack */
|
||||
- load TMP1, caml_bottom_of_stack
|
||||
- store TMP1, 0(sp)
|
||||
- load TMP1, caml_last_return_address
|
||||
- store TMP1, 8(sp)
|
||||
- load TMP1, caml_gc_regs
|
||||
- store TMP1, 16(sp)
|
||||
- /* set up a trap frame */
|
||||
- addi sp, sp, -16
|
||||
- load TMP1, caml_exception_pointer
|
||||
- store TMP1, 0(sp)
|
||||
- lla TMP0, .Ltrap_handler
|
||||
- store TMP0, 8(sp)
|
||||
- mv TRAP_PTR, sp
|
||||
- load ALLOC_PTR, caml_young_ptr
|
||||
- load ALLOC_LIMIT, caml_young_limit
|
||||
- store x0, caml_last_return_address, TMP0
|
||||
- jalr ARG
|
||||
-.Lcaml_retaddr: /* pop trap frame, restoring caml_exception_pointer */
|
||||
- load TMP1, 0(sp)
|
||||
- store TMP1, caml_exception_pointer, TMP0
|
||||
- addi sp, sp, 16
|
||||
-.Lreturn_result: /* pop callback link, restoring global variables */
|
||||
- load TMP1, 0(sp)
|
||||
- store TMP1, caml_bottom_of_stack, TMP0
|
||||
- load TMP1, 8(sp)
|
||||
- store TMP1, caml_last_return_address, TMP0
|
||||
- load TMP1, 16(sp)
|
||||
- store TMP1, caml_gc_regs, TMP0
|
||||
- addi sp, sp, 32
|
||||
- /* Update allocation pointer */
|
||||
- store ALLOC_PTR, caml_young_ptr, TMP0
|
||||
- /* reload callee-save registers and return */
|
||||
- load ra, 0xc0(sp)
|
||||
- load s0, 0x0(sp)
|
||||
- load s1, 0x8(sp)
|
||||
- load s2, 0x10(sp)
|
||||
- load s3, 0x18(sp)
|
||||
- load s4, 0x20(sp)
|
||||
- load s5, 0x28(sp)
|
||||
- load s6, 0x30(sp)
|
||||
- load s7, 0x38(sp)
|
||||
- load s8, 0x40(sp)
|
||||
- load s9, 0x48(sp)
|
||||
- load s10, 0x50(sp)
|
||||
- load s11, 0x58(sp)
|
||||
- fld fs0, 0x60(sp)
|
||||
- fld fs1, 0x68(sp)
|
||||
- fld fs2, 0x70(sp)
|
||||
- fld fs3, 0x78(sp)
|
||||
- fld fs4, 0x80(sp)
|
||||
- fld fs5, 0x88(sp)
|
||||
- fld fs6, 0x90(sp)
|
||||
- fld fs7, 0x98(sp)
|
||||
- fld fs8, 0xa0(sp)
|
||||
- fld fs9, 0xa8(sp)
|
||||
- fld fs10, 0xb0(sp)
|
||||
- fld fs11, 0xb8(sp)
|
||||
- addi sp, sp, 0xd0
|
||||
- ret
|
||||
+ load TMP1, caml_bottom_of_stack
|
||||
+ store TMP1, 0(sp)
|
||||
+ load TMP1, caml_last_return_address
|
||||
+ store TMP1, 8(sp)
|
||||
+ load TMP1, caml_gc_regs
|
||||
+ store TMP1, 16(sp)
|
||||
+ /* set up a trap frame */
|
||||
+ addi sp, sp, -16
|
||||
+ load TMP1, caml_exception_pointer
|
||||
+ store TMP1, 0(sp)
|
||||
+ lla TMP0, .Ltrap_handler
|
||||
+ store TMP0, 8(sp)
|
||||
+ mv TRAP_PTR, sp
|
||||
+ load ALLOC_PTR, caml_young_ptr
|
||||
+ load ALLOC_LIMIT, caml_young_limit
|
||||
+ store x0, caml_last_return_address, TMP0
|
||||
+ jalr ARG
|
||||
+.Lcaml_retaddr: /* pop trap frame, restoring caml_exception_pointer */
|
||||
+ load TMP1, 0(sp)
|
||||
+ store TMP1, caml_exception_pointer, TMP0
|
||||
+ addi sp, sp, 16
|
||||
+.Lreturn_result: /* pop callback link, restoring global variables */
|
||||
+ load TMP1, 0(sp)
|
||||
+ store TMP1, caml_bottom_of_stack, TMP0
|
||||
+ load TMP1, 8(sp)
|
||||
+ store TMP1, caml_last_return_address, TMP0
|
||||
+ load TMP1, 16(sp)
|
||||
+ store TMP1, caml_gc_regs, TMP0
|
||||
+ addi sp, sp, 32
|
||||
+ /* Update allocation pointer */
|
||||
+ store ALLOC_PTR, caml_young_ptr, TMP0
|
||||
+ /* reload callee-save registers and return */
|
||||
+ load ra, 0xc0(sp)
|
||||
+ load s0, 0x0(sp)
|
||||
+ load s1, 0x8(sp)
|
||||
+ load s2, 0x10(sp)
|
||||
+ load s3, 0x18(sp)
|
||||
+ load s4, 0x20(sp)
|
||||
+ load s5, 0x28(sp)
|
||||
+ load s6, 0x30(sp)
|
||||
+ load s7, 0x38(sp)
|
||||
+ load s8, 0x40(sp)
|
||||
+ load s9, 0x48(sp)
|
||||
+ load s10, 0x50(sp)
|
||||
+ load s11, 0x58(sp)
|
||||
+ fld fs0, 0x60(sp)
|
||||
+ fld fs1, 0x68(sp)
|
||||
+ fld fs2, 0x70(sp)
|
||||
+ fld fs3, 0x78(sp)
|
||||
+ fld fs4, 0x80(sp)
|
||||
+ fld fs5, 0x88(sp)
|
||||
+ fld fs6, 0x90(sp)
|
||||
+ fld fs7, 0x98(sp)
|
||||
+ fld fs8, 0xa0(sp)
|
||||
+ fld fs9, 0xa8(sp)
|
||||
+ fld fs10, 0xb0(sp)
|
||||
+ fld fs11, 0xb8(sp)
|
||||
+ addi sp, sp, 0xd0
|
||||
+ ret
|
||||
.Ltrap_handler:
|
||||
- store TRAP_PTR, caml_exception_pointer, TMP0
|
||||
- ori a0, a0, 2
|
||||
- j .Lreturn_result
|
||||
- .size caml_start_program, .-caml_start_program
|
||||
+ store TRAP_PTR, caml_exception_pointer, TMP0
|
||||
+ ori a0, a0, 2
|
||||
+ j .Lreturn_result
|
||||
+ .size caml_start_program, .-caml_start_program
|
||||
|
||||
/* Callback from C to OCaml */
|
||||
|
||||
- .align 2
|
||||
- .globl caml_callback_exn
|
||||
- .type caml_callback_exn, @function
|
||||
+ .align 2
|
||||
+ .globl caml_callback_exn
|
||||
+ .type caml_callback_exn, @function
|
||||
caml_callback_exn:
|
||||
/* Initial shuffling of arguments (a0 = closure, a1 = first arg) */
|
||||
- mv TMP1, a0
|
||||
- mv a0, a1 /* a0 = first arg */
|
||||
- mv a1, TMP1 /* a1 = closure environment */
|
||||
- load ARG, 0(TMP1) /* code pointer */
|
||||
- j .Ljump_to_caml
|
||||
- .size caml_callback_exn, .-caml_callback_exn
|
||||
+ mv TMP1, a0
|
||||
+ mv a0, a1 /* a0 = first arg */
|
||||
+ mv a1, TMP1 /* a1 = closure environment */
|
||||
+ load ARG, 0(TMP1) /* code pointer */
|
||||
+ j .Ljump_to_caml
|
||||
+ .size caml_callback_exn, .-caml_callback_exn
|
||||
|
||||
- .align 2
|
||||
- .globl caml_callback2_exn
|
||||
- .type caml_callback2_exn, @function
|
||||
+ .align 2
|
||||
+ .globl caml_callback2_exn
|
||||
+ .type caml_callback2_exn, @function
|
||||
caml_callback2_exn:
|
||||
/* Initial shuffling of arguments (a0 = closure, a1 = arg1, a2 = arg2) */
|
||||
- mv TMP1, a0
|
||||
- mv a0, a1
|
||||
- mv a1, a2
|
||||
- mv a2, TMP1
|
||||
- la ARG, caml_apply2
|
||||
- j .Ljump_to_caml
|
||||
- .size caml_callback2_exn, .-caml_callback2_exn
|
||||
+ mv TMP1, a0
|
||||
+ mv a0, a1
|
||||
+ mv a1, a2
|
||||
+ mv a2, TMP1
|
||||
+ la ARG, caml_apply2
|
||||
+ j .Ljump_to_caml
|
||||
+ .size caml_callback2_exn, .-caml_callback2_exn
|
||||
|
||||
- .align 2
|
||||
- .globl caml_callback3_exn
|
||||
- .type caml_callback3_exn, @function
|
||||
+ .align 2
|
||||
+ .globl caml_callback3_exn
|
||||
+ .type caml_callback3_exn, @function
|
||||
caml_callback3_exn:
|
||||
/* Initial shuffling of argumnets */
|
||||
/* (a0 = closure, a1 = arg1, a2 = arg2, a3 = arg3) */
|
||||
- mv TMP1, a0
|
||||
- mv a0, a1
|
||||
- mv a1, a2
|
||||
- mv a2, a3
|
||||
- mv a3, TMP1
|
||||
- la ARG, caml_apply3
|
||||
- j .Ljump_to_caml
|
||||
- .size caml_callback3_exn, .-caml_callback3_exn
|
||||
+ mv TMP1, a0
|
||||
+ mv a0, a1
|
||||
+ mv a1, a2
|
||||
+ mv a2, a3
|
||||
+ mv a3, TMP1
|
||||
+ la ARG, caml_apply3
|
||||
+ j .Ljump_to_caml
|
||||
+ .size caml_callback3_exn, .-caml_callback3_exn
|
||||
|
||||
- .align 2
|
||||
- .globl caml_ml_array_bound_error
|
||||
- .type caml_ml_array_bound_error, @function
|
||||
+ .align 2
|
||||
+ .globl caml_ml_array_bound_error
|
||||
+ .type caml_ml_array_bound_error, @function
|
||||
caml_ml_array_bound_error:
|
||||
/* Load address of [caml_array_bound_error] in ARG */
|
||||
- la ARG, caml_array_bound_error
|
||||
+ la ARG, caml_array_bound_error
|
||||
/* Call that function */
|
||||
- j caml_c_call
|
||||
+ j caml_c_call
|
||||
|
||||
- .globl caml_system__code_end
|
||||
+ .globl caml_system__code_end
|
||||
caml_system__code_end:
|
||||
|
||||
/* GC roots for callback */
|
||||
|
||||
- .section .data
|
||||
- .align 3
|
||||
- .globl caml_system__frametable
|
||||
- .type caml_system__frametable, @object
|
||||
+ .section .data
|
||||
+ .align 3
|
||||
+ .globl caml_system__frametable
|
||||
+ .type caml_system__frametable, @object
|
||||
caml_system__frametable:
|
||||
- .quad 1 /* one descriptor */
|
||||
- .quad .Lcaml_retaddr /* return address into callback */
|
||||
- .short -1 /* negative frame size => use callback link */
|
||||
- .short 0 /* no roots */
|
||||
- .align 3
|
||||
- .size caml_system__frametable, .-caml_system__frametable
|
||||
+ .quad 1 /* one descriptor */
|
||||
+ .quad .Lcaml_retaddr /* return address into callback */
|
||||
+ .short -1 /* negative frame size => use callback link */
|
||||
+ .short 0 /* no roots */
|
||||
+ .align 3
|
||||
+ .size caml_system__frametable, .-caml_system__frametable
|
||||
--
|
||||
2.16.2
|
||||
|
@ -1,27 +0,0 @@
|
||||
From 4af3619375230488b370e5b3d5a8f48cef688607 Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Tue, 29 May 2012 20:44:18 +0100
|
||||
Subject: [PATCH 5/9] configure: Allow user defined C compiler flags.
|
||||
|
||||
---
|
||||
configure.ac | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 5bb061162..6e37ff6c0 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -553,6 +553,10 @@ AS_CASE([$host],
|
||||
internal_cflags="$gcc_warnings"],
|
||||
[common_cflags="-O"])])
|
||||
|
||||
+# Allow CFLAGS and LDFLAGS to be added.
|
||||
+common_cflags="$common_cflags $CFLAGS"
|
||||
+oc_ldflags="$oc_ldflags $LDFLAGS"
|
||||
+
|
||||
internal_cppflags="-DCAML_NAME_SPACE $internal_cppflags"
|
||||
|
||||
# Enable SSE2 on x86 mingw to avoid using 80-bit registers.
|
||||
--
|
||||
2.22.0.rc3
|
||||
|
@ -1,27 +0,0 @@
|
||||
From 84381bccf6293903392d3d045bfb66b10b3e3bc3 Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Fri, 26 Apr 2019 16:16:29 +0100
|
||||
Subject: [PATCH 6/9] configure: Remove incorrect assumption about
|
||||
cross-compiling.
|
||||
|
||||
See https://github.com/ocaml/ocaml/issues/8647#issuecomment-487094390
|
||||
---
|
||||
configure.ac | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 6e37ff6c0..3c287fbd0 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -958,7 +958,7 @@ AS_CASE([$host],
|
||||
[*-*-mingw32|*-pc-windows], [asppprofflags=''],
|
||||
[asppprofflags='-DPROFILING'])
|
||||
|
||||
-AS_IF([test -n "$host_alias"], [toolpref="${host}-"], [toolpref=""])
|
||||
+#AS_IF([test -n "$host_alias"], [toolpref="${host}-"], [toolpref=""])
|
||||
|
||||
# We first compute default values for as and aspp
|
||||
# If values have been given by the user then they take precedence over
|
||||
--
|
||||
2.22.0.rc3
|
||||
|
25
0006-fix-caml_c_call-reload-caml_young_limit.patch
Normal file
25
0006-fix-caml_c_call-reload-caml_young_limit.patch
Normal file
@ -0,0 +1,25 @@
|
||||
From eba9efdbf5e1cecf39e93e16e6e9d0847e3abb15 Mon Sep 17 00:00:00 2001
|
||||
From: Nicolas Ojeda Bar <n.oje.bar@gmail.com>
|
||||
Date: Sat, 2 Dec 2017 10:44:41 +0100
|
||||
Subject: [PATCH 6/7] fix caml_c_call: reload caml_young_limit
|
||||
|
||||
---
|
||||
asmrun/riscv.S | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/asmrun/riscv.S b/asmrun/riscv.S
|
||||
index 88d7ab924..121f8ba71 100644
|
||||
--- a/asmrun/riscv.S
|
||||
+++ b/asmrun/riscv.S
|
||||
@@ -187,7 +187,7 @@ caml_c_call:
|
||||
jalr ARG
|
||||
/* Reload alloc ptr and alloc limit */
|
||||
load ALLOC_PTR, caml_young_ptr
|
||||
- load TRAP_PTR, caml_exception_pointer
|
||||
+ load ALLOC_LIMIT, caml_young_limit
|
||||
/* Return */
|
||||
jr s2
|
||||
.size caml_c_call, .-caml_c_call
|
||||
--
|
||||
2.16.2
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,14 +1,14 @@
|
||||
From e238841a2e41f4473dcc40a06a7ac1b9ad1c0357 Mon Sep 17 00:00:00 2001
|
||||
From ed16ef068b566b5e172c7b40dc9e5159ea900c03 Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Tue, 5 Jun 2018 19:48:08 +0000
|
||||
Subject: [PATCH 8/9] riscv: Emit debug info.
|
||||
Subject: [PATCH 7/7] 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 88ea9f884..cc05aefe4 100644
|
||||
index 51165d0f1..f32477a8f 100644
|
||||
--- a/asmcomp/riscv/emit.mlp
|
||||
+++ b/asmcomp/riscv/emit.mlp
|
||||
@@ -261,6 +261,7 @@ let tailrec_entry_point = ref 0
|
||||
@ -18,16 +18,16 @@ index 88ea9f884..cc05aefe4 100644
|
||||
+ emit_debug_info i.dbg;
|
||||
match i.desc with
|
||||
Lend -> ()
|
||||
| Lprologue ->
|
||||
@@ -556,6 +557,7 @@ let fundecl fundecl =
|
||||
` {emit_string code_space}\n`;
|
||||
` .align 2\n`;
|
||||
`{emit_symbol fundecl.fun_name}:\n`;
|
||||
| Lop(Imove | Ispill | Ireload) ->
|
||||
@@ -554,6 +555,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;
|
||||
@@ -615,6 +617,7 @@ let data l =
|
||||
@@ -613,6 +615,7 @@ let data l =
|
||||
|
||||
let begin_assembly() =
|
||||
` .file \"\"\n`; (* PR#7073 *)
|
||||
@ -36,5 +36,5 @@ index 88ea9f884..cc05aefe4 100644
|
||||
let lbl_begin = Compilenv.make_symbol (Some "data_begin") in
|
||||
` {emit_string data_space}\n`;
|
||||
--
|
||||
2.22.0.rc3
|
||||
2.16.2
|
||||
|
@ -1,58 +0,0 @@
|
||||
From 9217fab965cbde2a47dd91acb6e6452844d288ba Mon Sep 17 00:00:00 2001
|
||||
From: Stephen Dolan <sdolan@janestreet.com>
|
||||
Date: Mon, 29 Jul 2019 14:12:56 +0100
|
||||
Subject: [PATCH 9/9] Use the autoconf- or system-provided off_t rather than
|
||||
redetecting.
|
||||
|
||||
Hopefully fixes #8841
|
||||
---
|
||||
configure | 2 --
|
||||
configure.ac | 1 -
|
||||
runtime/caml/io.h | 4 +---
|
||||
3 files changed, 1 insertion(+), 6 deletions(-)
|
||||
|
||||
diff --git a/configure b/configure
|
||||
index 33a0aa526..a43846117 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -12787,8 +12787,6 @@ _ACEOF
|
||||
|
||||
fi
|
||||
|
||||
-$as_echo "#define HAS_OFF_T 1" >>confdefs.h
|
||||
-
|
||||
|
||||
# Checks for structures
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 5731e0f98..38ff1235f 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -674,7 +674,6 @@ AC_CHECK_HEADER([sys/select.h], [AC_DEFINE([HAS_SYS_SELECT_H])], [],
|
||||
|
||||
## off_t
|
||||
AC_TYPE_OFF_T
|
||||
-AC_DEFINE([HAS_OFF_T])
|
||||
|
||||
# Checks for structures
|
||||
|
||||
diff --git a/runtime/caml/io.h b/runtime/caml/io.h
|
||||
index 87de679e5..2d961f956 100644
|
||||
--- a/runtime/caml/io.h
|
||||
+++ b/runtime/caml/io.h
|
||||
@@ -29,11 +29,9 @@
|
||||
|
||||
#if defined(_WIN32)
|
||||
typedef __int64 file_offset;
|
||||
-#elif defined(HAS_OFF_T)
|
||||
+#else
|
||||
#include <sys/types.h>
|
||||
typedef off_t file_offset;
|
||||
-#else
|
||||
-typedef long file_offset;
|
||||
#endif
|
||||
|
||||
struct channel {
|
||||
--
|
||||
2.22.0.rc3
|
||||
|
150
ocaml.spec
150
ocaml.spec
@ -20,18 +20,14 @@
|
||||
%global test_arches aarch64 %{power64} x86_64
|
||||
# These are the architectures for which the tests must pass otherwise
|
||||
# the build will fail.
|
||||
#%global test_arches_required aarch64 ppc64le x86_64
|
||||
%global test_arches_required NONE
|
||||
%global test_arches_required aarch64 ppc64le x86_64
|
||||
|
||||
# Architectures where parallel builds fail.
|
||||
#%global no_parallel_build_arches aarch64
|
||||
|
||||
#%global rcver %{nil}
|
||||
%global rcver +rc2
|
||||
|
||||
Name: ocaml
|
||||
Version: 4.08.1
|
||||
Release: 0.rc2.1%{?dist}
|
||||
Version: 4.07.0
|
||||
Release: 0.rc1.2%{?dist}
|
||||
|
||||
Summary: OCaml compiler and programming environment
|
||||
|
||||
@ -39,7 +35,7 @@ License: QPL and (LGPLv2+ with exceptions)
|
||||
|
||||
URL: http://www.ocaml.org
|
||||
|
||||
Source0: http://caml.inria.fr/pub/distrib/ocaml-4.08/ocaml-%{version}%{rcver}.tar.xz
|
||||
Source0: http://caml.inria.fr/pub/distrib/ocaml-4.07/ocaml-%{version}+rc1.tar.xz
|
||||
|
||||
# IMPORTANT NOTE:
|
||||
#
|
||||
@ -50,32 +46,35 @@ Source0: http://caml.inria.fr/pub/distrib/ocaml-4.08/ocaml-%{version}%{rc
|
||||
#
|
||||
# https://pagure.io/fedora-ocaml
|
||||
#
|
||||
# Current branch: fedora-31-4.08.1
|
||||
# Current branch: fedora-28-4.06.0
|
||||
#
|
||||
# ALTERNATIVELY add a patch to the end of the list (leaving the
|
||||
# existing patches unchanged) adding a comment to note that it should
|
||||
# be incorporated into the git repo at a later time.
|
||||
#
|
||||
|
||||
Patch0001: 0001-increment-version-number-after-tagging-4.08.1-rc2.patch
|
||||
Patch0002: 0002-Fix-spelling-errors-reported-by-Lintian.patch
|
||||
Patch0003: 0003-Fix-language-of-some-error-messages-in-ocamldoc.patch
|
||||
# Fedora-specific downstream patches.
|
||||
Patch0004: 0004-Don-t-add-rpaths-to-libraries.patch
|
||||
Patch0005: 0005-configure-Allow-user-defined-C-compiler-flags.patch
|
||||
Patch0006: 0006-configure-Remove-incorrect-assumption-about-cross-co.patch
|
||||
Patch0001: 0001-Don-t-add-rpaths-to-libraries.patch
|
||||
Patch0002: 0002-ocamlbyteinfo-ocamlplugininfo-Useful-utilities-from-.patch
|
||||
Patch0003: 0003-configure-Allow-user-defined-C-compiler-flags.patch
|
||||
|
||||
# Out of tree patch for RISC-V support.
|
||||
# https://github.com/nojb/riscv-ocaml
|
||||
Patch0007: 0007-Add-RISC-V-backend.patch
|
||||
Patch0008: 0008-riscv-Emit-debug-info.patch
|
||||
# Fix for https://github.com/ocaml/ocaml/issues/8841
|
||||
Patch0009: 0009-Use-the-autoconf-or-system-provided-off_t-rather-tha.patch
|
||||
Patch0004: 0004-Add-RISC-V-backend.patch
|
||||
Patch0005: 0005-Copyright-untabify.patch
|
||||
Patch0006: 0006-fix-caml_c_call-reload-caml_young_limit.patch
|
||||
|
||||
# RISC-V patch to add debuginfo (DWARF) generation.
|
||||
# Sent upstream 2018-06-05.
|
||||
Patch0007: 0007-riscv-Emit-debug-info.patch
|
||||
|
||||
BuildRequires: gcc
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: binutils-devel
|
||||
BuildRequires: ncurses-devel
|
||||
BuildRequires: gdbm-devel
|
||||
%ifnarch riscv64
|
||||
BuildRequires: emacs
|
||||
%endif
|
||||
BuildRequires: gawk
|
||||
BuildRequires: perl-interpreter
|
||||
BuildRequires: util-linux
|
||||
@ -155,9 +154,22 @@ Provides: ocamldoc
|
||||
Documentation generator for OCaml.
|
||||
|
||||
|
||||
%ifnarch riscv64
|
||||
%package emacs
|
||||
Summary: Emacs mode for OCaml
|
||||
Requires: ocaml = %{version}-%{release}
|
||||
Requires: emacs(bin)
|
||||
|
||||
%description emacs
|
||||
Emacs mode for OCaml.
|
||||
%endif
|
||||
|
||||
|
||||
%package docs
|
||||
Summary: Documentation for OCaml
|
||||
Requires: ocaml = %{version}-%{release}
|
||||
Requires(post): /sbin/install-info
|
||||
Requires(preun): /sbin/install-info
|
||||
|
||||
|
||||
%description docs
|
||||
@ -183,10 +195,8 @@ may not be portable between versions.
|
||||
|
||||
|
||||
%prep
|
||||
%setup -q -T -b 0 -n %{name}-%{version}%{rcver}
|
||||
%setup -q -T -b 0 -n %{name}-%{version}+rc1
|
||||
%autopatch -p1
|
||||
# Patches touch configure.ac, so rebuild it:
|
||||
autoconf --force
|
||||
|
||||
|
||||
%build
|
||||
@ -197,19 +207,31 @@ unset MAKEFLAGS
|
||||
make=make
|
||||
%endif
|
||||
|
||||
# We set --libdir to the unusual directory because we want OCaml to
|
||||
# install its libraries and other files into a subdirectory.
|
||||
#
|
||||
# Force --host because of:
|
||||
# https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/2O4HBOK6PTQZAFAVIRDVMZGG2PYB2QHM/
|
||||
%configure \
|
||||
--libdir=%{_libdir}/ocaml \
|
||||
--host=`./config/gnu/config.guess`
|
||||
CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" \
|
||||
./configure \
|
||||
-bindir %{_bindir} \
|
||||
-libdir %{_libdir}/ocaml \
|
||||
-x11lib %{_libdir} \
|
||||
-x11include %{_includedir} \
|
||||
-mandir %{_mandir}/man1 \
|
||||
-no-curses
|
||||
$make world
|
||||
%if %{native_compiler}
|
||||
$make opt
|
||||
$make opt.opt
|
||||
%endif
|
||||
%ifnarch riscv64
|
||||
make -C emacs ocamltags
|
||||
%endif
|
||||
|
||||
# Currently these tools are supplied by Debian, but are expected
|
||||
# to go upstream at some point.
|
||||
includes="-nostdlib -I stdlib -I utils -I parsing -I typing -I bytecomp -I asmcomp -I driver -I otherlibs/unix -I otherlibs/str -I otherlibs/dynlink"
|
||||
boot/ocamlrun ./ocamlc $includes dynlinkaux.cmo ocamlbyteinfo.ml -o ocamlbyteinfo
|
||||
# ocamlplugininfo doesn't compile because it needs 'dynheader' (type
|
||||
# decl) and I have no idea where that comes from
|
||||
#cp otherlibs/dynlink/natdynlink.ml .
|
||||
#boot/ocamlrun ./ocamlopt $includes unix.cmxa str.cmxa natdynlink.ml ocamlplugininfo.ml -o ocamlplugininfo
|
||||
|
||||
|
||||
%check
|
||||
@ -225,14 +247,31 @@ make -j1 all ||:
|
||||
|
||||
|
||||
%install
|
||||
make install DESTDIR=$RPM_BUILD_ROOT
|
||||
make install \
|
||||
BINDIR=$RPM_BUILD_ROOT%{_bindir} \
|
||||
LIBDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml \
|
||||
MANDIR=$RPM_BUILD_ROOT%{_mandir}
|
||||
perl -pi -e "s|^$RPM_BUILD_ROOT||" $RPM_BUILD_ROOT%{_libdir}/ocaml/ld.conf
|
||||
|
||||
%ifnarch riscv64
|
||||
(
|
||||
# install emacs files
|
||||
cd emacs;
|
||||
make install \
|
||||
BINDIR=$RPM_BUILD_ROOT%{_bindir} \
|
||||
EMACSDIR=$RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp
|
||||
make install-ocamltags BINDIR=$RPM_BUILD_ROOT%{_bindir}
|
||||
)
|
||||
%endif
|
||||
|
||||
echo %{version} > $RPM_BUILD_ROOT%{_libdir}/ocaml/fedora-ocaml-release
|
||||
|
||||
# Remove rpaths from stublibs .so files.
|
||||
chrpath --delete $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs/*.so
|
||||
|
||||
install -m 0755 ocamlbyteinfo $RPM_BUILD_ROOT%{_bindir}
|
||||
#install -m 0755 ocamlplugininfo $RPM_BUILD_ROOT%{_bindir}
|
||||
|
||||
find $RPM_BUILD_ROOT -name .ignore -delete
|
||||
|
||||
# Remove .cmt and .cmti files, for now. We could package them later.
|
||||
@ -244,10 +283,12 @@ find $RPM_BUILD_ROOT \( -name '*.cmt' -o -name '*.cmti' \) -a -delete
|
||||
%doc LICENSE
|
||||
%{_bindir}/ocaml
|
||||
|
||||
%{_bindir}/ocamlbyteinfo
|
||||
%{_bindir}/ocamlcmt
|
||||
%{_bindir}/ocamldebug
|
||||
%{_bindir}/ocaml-instr-graph
|
||||
%{_bindir}/ocaml-instr-report
|
||||
#%{_bindir}/ocamlplugininfo
|
||||
%{_bindir}/ocamlyacc
|
||||
|
||||
# symlink to either .byte or .opt version
|
||||
@ -314,7 +355,6 @@ find $RPM_BUILD_ROOT \( -name '*.cmt' -o -name '*.cmti' \) -a -delete
|
||||
%{_libdir}/ocaml/objinfo_helper
|
||||
%{_libdir}/ocaml/vmthreads/*.mli
|
||||
%{_libdir}/ocaml/vmthreads/*.a
|
||||
%{_libdir}/ocaml/threads/*.mli
|
||||
%if %{native_compiler}
|
||||
%{_libdir}/ocaml/threads/*.a
|
||||
%{_libdir}/ocaml/threads/*.cmxa
|
||||
@ -362,7 +402,7 @@ find $RPM_BUILD_ROOT \( -name '*.cmt' -o -name '*.cmti' \) -a -delete
|
||||
%doc LICENSE
|
||||
%doc ocamldoc/Changes.txt
|
||||
%{_bindir}/ocamldoc*
|
||||
%{_libdir}/ocaml/ocamldoc
|
||||
%{_libdir}/ocaml/ocamldoc.hva
|
||||
|
||||
|
||||
%files docs
|
||||
@ -370,6 +410,14 @@ find $RPM_BUILD_ROOT \( -name '*.cmt' -o -name '*.cmti' \) -a -delete
|
||||
%{_mandir}/man3/*
|
||||
|
||||
|
||||
%ifnarch riscv64
|
||||
%files emacs
|
||||
%doc emacs/README
|
||||
%{_datadir}/emacs/site-lisp/*
|
||||
%{_bindir}/ocamltags
|
||||
%endif
|
||||
|
||||
|
||||
%files compiler-libs
|
||||
%doc LICENSE
|
||||
%dir %{_libdir}/ocaml/compiler-libs
|
||||
@ -386,40 +434,6 @@ find $RPM_BUILD_ROOT \( -name '*.cmt' -o -name '*.cmti' \) -a -delete
|
||||
|
||||
|
||||
%changelog
|
||||
* Tue Jul 30 2019 Richard W.M. Jones <rjones@redhat.com> - 4.08.1-0.rc2.1
|
||||
- OCaml 4.08.1+rc2.
|
||||
- Include fix for miscompilation of off_t on 32 bit architectures.
|
||||
|
||||
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 4.08.0-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||
|
||||
* Thu Jun 27 2019 Richard W.M. Jones <rjones@redhat.com> - 4.08.0-1
|
||||
- OCaml 4.08.0 (RHBZ#1673688).
|
||||
|
||||
* Fri Apr 26 2019 Richard W.M. Jones <rjones@redhat.com> - 4.08.0-0.beta3.1
|
||||
- OCaml 4.08.0 beta 3 (RHBZ#1673688).
|
||||
- emacs subpackage has been dropped (from upstream):
|
||||
https://github.com/ocaml/ocaml/pull/2078#issuecomment-443322613
|
||||
https://github.com/Chris00/caml-mode
|
||||
- Remove ocamlbyteinfo and ocamlpluginfo, neither can be compiled.
|
||||
- Disable tests on all architectures, temporarily hopefully.
|
||||
- Package threads/*.mli files.
|
||||
|
||||
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 4.07.0-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||
|
||||
* Fri Aug 17 2018 Richard W.M. Jones <rjones@redhat.com> - 4.07.0-3
|
||||
- Bootstrap from previously build Fedora compiler by default.
|
||||
|
||||
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 4.07.0-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
||||
|
||||
* Wed Jul 11 2018 Richard W.M. Jones <rjones@redhat.com> - 4.07.0-1
|
||||
- OCaml 4.07.0 (RHBZ#1536734).
|
||||
|
||||
* Tue Jun 26 2018 Richard W.M. Jones <rjones@redhat.com> - 4.07.0-0.rc1.3
|
||||
- Enable emacs again on riscv64.
|
||||
|
||||
* Tue Jun 19 2018 Richard W.M. Jones <rjones@redhat.com> - 4.07.0-0.rc1.2
|
||||
- OCaml 4.07.0-rc1 (RHBZ#1536734).
|
||||
|
||||
|
2
sources
2
sources
@ -1 +1 @@
|
||||
SHA512 (ocaml-4.08.1+rc2.tar.xz) = 74d5929e75ec4dd6cd69250005a18cede7e8036301dc05660aee99330f1ba4013575df1f9fe03dc7e913de3719215122b71681f0fad6f571a5feecb594c1e460
|
||||
SHA512 (ocaml-4.07.0+rc1.tar.xz) = 39db06f3602d75773ab7c7fdef99a4e947a64f8ec895d1f2efd8fca07f27b7b80c2b290bc201ddf4ad3a623fee236bab053ccd3b618091490624a4474926d732
|
||||
|
Loading…
Reference in New Issue
Block a user