head	1.2;
access;
symbols
	pkgsrc-2013Q2:1.2.0.4
	pkgsrc-2013Q2-base:1.2
	pkgsrc-2012Q4:1.2.0.2
	pkgsrc-2012Q4-base:1.2
	pkgsrc-2012Q3:1.1.0.16
	pkgsrc-2012Q3-base:1.1
	pkgsrc-2012Q2:1.1.0.14
	pkgsrc-2012Q2-base:1.1
	pkgsrc-2012Q1:1.1.0.12
	pkgsrc-2012Q1-base:1.1
	pkgsrc-2011Q4:1.1.0.10
	pkgsrc-2011Q4-base:1.1
	pkgsrc-2011Q3:1.1.0.8
	pkgsrc-2011Q3-base:1.1
	pkgsrc-2011Q2:1.1.0.6
	pkgsrc-2011Q2-base:1.1
	pkgsrc-2011Q1:1.1.0.4
	pkgsrc-2011Q1-base:1.1
	pkgsrc-2010Q4:1.1.0.2
	pkgsrc-2010Q4-base:1.1;
locks; strict;
comment	@# @;


1.2
date	2012.10.08.15.05.33;	author jaapb;	state dead;
branches;
next	1.1;

1.1
date	2010.12.19.08.27.17;	author is;	state Exp;
branches;
next	;


desc
@@


1.2
log
@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.
@
text
@$NetBSD: patch-bw,v 1.1 2010/12/19 08:27:17 is Exp $

--- asmrun/arm.S.orig	2009-05-04 13:46:46.000000000 +0000
+++ asmrun/arm.S
@@@@ -38,7 +38,7 @@@@ caml_call_gc:
 	ldr	r12, .Lcaml_requested_size
 	ldr	r12, [r12, #0]
 	sub	alloc_ptr, alloc_ptr, r12
-        bx      lr
+        mov	pc,lr
 
         .globl caml_alloc1
 caml_alloc1:
@@@@ -128,7 +128,7 @@@@ caml_allocN:
         ldr     alloc_limit, [r12, #0]
     /* Return to caller */
         ldr     r12, [sp], #4
-        bx      r12
+        mov     pc,r12		/* optimize! */
 
 /* Call a C function from Caml */
 /* Function to call is in r12 */
@@@@ -149,13 +149,13 @@@@ caml_c_call:
         str     trap_ptr, [r7, #0]
     /* Call the function */
         mov     lr, pc
-        bx      r12
+        mov	pc,r12
     /* Reload alloc ptr and alloc limit */
         ldr     r5, .Lcaml_young_limit
         ldr     alloc_ptr, [r6, #0]    /* r6 still points to caml_young_ptr */
         ldr     alloc_limit, [r5, #0]
     /* Return */
-        bx      r4
+        mov	pc,r4
 
 /* Start the Caml program */
 
@@@@ -196,7 +196,7 @@@@ caml_start_program:
         ldr     alloc_limit, [r4, #0]
     /* Call the Caml code */
         mov     lr, pc
-        bx      r12
+        mov	pc,r12
 .Lcaml_retaddr:
     /* Pop the trap frame, restoring caml_exception_pointer */
         ldr     r4, .Lcaml_exception_pointer
@@@@ -220,7 +220,7 @@@@ caml_start_program:
         str     alloc_ptr, [r4, #0]
     /* Reload callee-save registers and return */
         ldmfd   sp!, {r4,r5,r6,r7,r8,r10,r11,lr}
-	bx	lr
+	mov	pc,lr
 
     /* The trap handler */
 .Ltrap_handler:
@


1.1
log
@- Enable native compilation for arm.

- to do this, and make the result runnable on pre-thumb arm, change
  upstreams assembler snippets and stubs to use "mov pc,reg" instead
  of the return/call-to-thumb-friendly "bx reg", which is not available
  in non-thumb-enabled arm CPUs. Whether this is the way to go, or a
  seperate "armt" architecture for ocaml is needed, needs to be discussed
  with upstream.

Resulting compiler, when running its selftest suite, has 6 errors less than
the same on i386. Unison compiled natively with this passes its self-test.
@
text
@d1 1
a1 1
$NetBSD$
@

