pkgsrc/lang/ocaml/patches/patch-asmrun_power-bsd.S
jaapb f7de656e11 Update to version 4.00.1. Renamed patches from two-letter system and added
comments.

Updated buildlink3.mk to default to a full dependency (more pertinent in most
cases; usually the standard library needs to be installed for an ocaml
program to run)

Changes from 3.12 to 4.00.1 include:
OCaml 4.00.1:
-------------
Various bug fixes.

OCaml 4.00.0:
-------------

(Changes that can break existing programs are marked with a "*")

- The official name of the language is now OCaml.

Language features:
- Added Generalized Algebraic Data Types (GADTs) to the language.
  See chapter "Language extensions" of the reference manual for documentation.
- It is now possible to omit type annotations when packing and unpacking
  first-class modules. The type-checker attempts to infer it from the context.
  Using the -principal option guarantees forward compatibility.
- New (module M) and (module M : S) syntax in patterns, for immediate
  unpacking of a first-class module.

Compilers:
- Revised simplification of let-alias (PR#5205, PR#5288)
- Better reporting of compiler version mismatch in .cmi files
* Warning 28 is now enabled by default.
- New option -absname to use absolute paths in error messages
- Optimize away compile-time beta-redexes, e.g. (fun x y -> e) a b.
- Added option -bin-annot to dump the AST with type annotations.
- Added lots of new warnings about unused variables, opens, fields,
  constructors, etc.
* New meaning for warning 7: it is now triggered when a method is overridden
  with the "method" keyword.  Use "method!" to avoid the warning.

Native-code compiler:
- Optimized handling of partially-applied functions (PR#5287)
- Small improvements in code generated for array bounds checks (PR#5345,
  PR#5360).
* New ARM backend (PR#5433):
    . Supports both Linux/EABI (armel) and Linux/EABI+VFPv3 (armhf).
    . Added support for the Thumb-2 instruction set with average code size
      savings of 28%.
    . Added support for position-independent code, natdynlink, profiling and
      exception backtraces.
- Generation of CFI information, and filename/line number debugging (with -g)
  annotations, enabling in particular precise stack backtraces with
  the gdb debugger. Currently supported for x86 32-bits and 64-bits only.
  (PR#5487)
- New tool: ocamloptp, the equivalent of ocamlcp for the native-code compiler.

OCamldoc:
- PR#5645: ocamldoc doesn't handle module/type substitution in signatures
- PR#5544: improve HTML output (less formatting in html code)
- PR#5522: allow refering to record fields and variant constructors
- fix PR#5419 (error message in french)
- fix PR#5535 (no cross ref to class after dump+load)
* Use first class modules for custom generators, to be able to
  load various plugins incrementally adding features to the current
  generator
* PR#5507: Use Location.t structures for locations.
- fix: do not keep code when not told to keep code.

Standard library:
- Added float functions "hypot" and "copysign" (PR#3806, PR#4752, PR#5246)
* Arg: options with empty doc strings are no longer included in the usage string
  (PR#5437)
- Array: faster implementations of "blit", "copy", "sub", "append" and "concat"
  (PR#2395, PR#2787, PR#4591)
* Hashtbl:
    . Statistically-better generic hash function based on Murmur 3 (PR#5225)
    . Fixed behavior of generic hash function w.r.t. -0.0 and NaN (PR#5222)
    . Added optional "random" parameter to Hashtbl.create to randomize
      collision patterns and improve security (PR#5572, CVE-2012-0839)
    . Added "randomize" function and "R" parameter to OCAMLRUNPARAM
      to turn randomization on by default (PR#5572, CVE-2012-0839)
    . Added new functorial interface "MakeSeeded" to support randomization
      with user-provided seeded hash functions.
    . Install new header <caml/hash.h> for C code.
- Filename: on-demand (lazy) initialization of the PRNG used by "temp_file".
- Marshal: marshalling of function values (flag Marshal.Closures) now
  also works for functions that come from dynamically-loaded modules (PR#5215)
- Random:
     . More random initialization (Random.self_init()), using /dev/urandom
       when available (e.g. Linux, FreeBSD, MacOS X, Solaris)
     * Faster implementation of Random.float (changes the generated sequences)
- Scanf: new function "unescaped" (PR#3888)
- Set and Map: more efficient implementation of "filter" and "partition"
- String: new function "map" (PR#3888)

Installation procedure:
- Compiler internals are now installed in `ocamlc -where`/compiler-libs.
  The files available there include the .cmi interfaces for all compiler
  modules, plus the following libraries:
      ocamlcommon.cma/.cmxa     modules common to ocamlc, ocamlopt, ocaml
      ocamlbytecomp.cma/.cmxa   modules for ocamlc and ocaml
      ocamloptcomp.cma/.cmxa    modules specific to ocamlopt

camltoplevel.cma         modules specific to ocaml
   (PR#1804, PR#4653, frequently-asked feature).
* Some .cmi for toplevel internals that used to be installed in
  `ocamlc -where` are now to be found in  `ocamlc -where`/compiler-libs.
  Add "-I +compiler-libs" where needed.
* toplevellib.cma is no longer installed because subsumed by
  ocamlcommon.cma ocamlbytecomp.cma ocamltoplevel.cma
- Added a configuration option (-with-debug-runtime) to compile and install
  a debug version of the runtime system, and a compiler option
  (-runtime-variant) to select the debug runtime.

and various bug fixes.
2012-10-08 15:05:32 +00:00

65 lines
1.8 KiB
ArmAsm

$NetBSD: patch-asmrun_power-bsd.S,v 1.1 2012/10/08 15:05:32 jaapb Exp $
Add profiling to power architecture
--- asmrun/power-bsd.S.orig 2012-09-11 13:01:14.000000000 +0000
+++ asmrun/power-bsd.S
@@ -15,2 +15,31 @@
+#if defined(PROFILING)
+#define PROFILE_CAML \
+ stwu 1, -32(1) \
+ mflr 0 \
+ stw 0, 4(1) \
+ stw 2, 8(1) \
+ stw 3, 12(1) \
+ stw 4, 16(1) \
+ stw 5, 20(1) \
+ stw 6, 24(1) \
+ stw 7, 28(1) \
+ bl _mcount \
+ lwz 2, 8(1) \
+ lwz 3, 12(1) \
+ lwz 4, 16(1) \
+ lwz 5, 20(1) \
+ lwz 6, 24(1) \
+ lwz 7, 28(1) \
+ addic 1, 1, 32
+
+#define PROFILE_C \
+ mflr 0 \
+ stw 0, 4(1) \
+ bl _mcount
+#else
+#define PROFILE_CAML
+#define PROFILE_C
+#endif
+
#define Addrglobal(reg,glob) \
@@ -35,2 +64,3 @@ caml_system__code_begin:
caml_call_gc:
+ PROFILE_CAML
/* Set up stack frame */
@@ -187,2 +217,3 @@ caml_call_gc:
caml_c_call:
+ PROFILE_CAML
/* Save return address */
@@ -215,2 +246,3 @@ caml_c_call:
caml_raise_exception:
+ P ROFILE_C
/* Reload OCaml global registers */
@@ -235,2 +267,3 @@ caml_raise_exception:
caml_start_program:
+ PROFILE_C
Addrglobal(12, caml_program)
@@ -385,2 +418,3 @@ caml_start_program:
caml_callback_exn:
+ PROFILE_C
/* Initial shuffling of arguments */
@@ -395,2 +429,3 @@ caml_callback_exn:
caml_callback2_exn:
+ PROFILE_C
mr 0, 3 /* Closure */
@@ -405,2 +440,3 @@ caml_callback2_exn:
caml_callback3_exn:
+ PROFILE_C
mr 0, 3 /* Closure */