Permalink
Browse files

merge changes from 4.00 branching to 4.00.0 (part 1)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12784 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
  • Loading branch information...
1 parent 9491507 commit c61fd90bc783a67c21c1792cffd450bf0dc525f2 doligez committed Jul 26, 2012
Showing with 1,679 additions and 768 deletions.
  1. +128 −12 Changes
  2. +3 −0 INSTALL
  3. +8 −2 Makefile
  4. +50 −18 README.win32
  5. +1 −1 VERSION
  6. +36 −36 asmcomp/emitaux.ml
  7. +1 −1 asmcomp/power/arch.ml
  8. +54 −45 asmrun/.depend
  9. +2 −0 boot/.ignore
  10. +33 −30 byterun/.depend
  11. +2 −0 byterun/.ignore
  12. +1 −1 byterun/Makefile
  13. +7 −5 byterun/compact.c
  14. +2 −2 byterun/freelist.c
  15. +6 −14 byterun/gc_ctrl.c
  16. +1 −1 byterun/io.c
  17. +1 −0 camlp4/boot/.ignore
  18. +6 −3 config/auto-aux/cfi.S
  19. +5 −2 configure
  20. +1 −0 debugger/.ignore
  21. +1 −1 driver/pparse.ml
  22. +34 −34 lex/.depend
  23. +1 −0 man/Makefile
  24. +51 −21 man/ocamlcp.m
  25. +1 −1 man/ocamlopt.m
  26. +145 −142 ocamldoc/.depend
  27. +13 −4 ocamldoc/Makefile
  28. +1 −1 ocamldoc/odoc_analyse.ml
  29. +91 −1 ocamldoc/odoc_args.ml
  30. +24 −0 ocamldoc/odoc_args.mli
  31. +181 −135 ocamldoc/odoc_ast.ml
  32. +1 −1 ocamldoc/odoc_class.ml
  33. +1 −1 ocamldoc/odoc_comments.ml
  34. +27 −4 ocamldoc/odoc_cross.ml
  35. +13 −2 ocamldoc/odoc_gen.ml
  36. +10 −1 ocamldoc/odoc_gen.mli
  37. +91 −52 ocamldoc/odoc_html.ml
  38. +6 −2 ocamldoc/odoc_info.ml
  39. +10 −2 ocamldoc/odoc_info.mli
  40. +25 −16 ocamldoc/odoc_latex.ml
  41. +6 −2 ocamldoc/odoc_man.ml
  42. +1 −1 ocamldoc/odoc_merge.mli
  43. +12 −1 ocamldoc/odoc_messages.ml
  44. +1 −1 ocamldoc/odoc_misc.ml
  45. +6 −0 ocamldoc/odoc_name.ml
  46. +3 −0 ocamldoc/odoc_name.mli
  47. +14 −3 ocamldoc/odoc_scan.ml
  48. +59 −12 ocamldoc/odoc_search.ml
  49. +18 −2 ocamldoc/odoc_search.mli
  50. +66 −29 ocamldoc/odoc_sig.ml
  51. +1 −1 ocamldoc/odoc_sig.mli
  52. +9 −4 ocamldoc/odoc_test.ml
  53. +2 −0 ocamldoc/odoc_text.ml
  54. +36 −3 ocamldoc/odoc_text_lexer.mll
  55. +4 −0 ocamldoc/odoc_text_parser.mly
  56. +4 −2 ocamldoc/odoc_types.ml
  57. +4 −2 ocamldoc/odoc_types.mli
  58. +4 −4 otherlibs/bigarray/.depend
  59. +3 −3 otherlibs/bigarray/bigarray.mli
  60. +4 −0 otherlibs/bigarray/mmap_unix.c
  61. +0 −4 otherlibs/labltk/support/cltkFile.c
  62. +22 −24 otherlibs/num/.depend
  63. +3 −3 otherlibs/str/.depend
  64. +15 −15 otherlibs/systhreads/.depend
  65. +24 −21 otherlibs/threads/.depend
  66. +2 −2 otherlibs/threads/event.mli
  67. +15 −0 otherlibs/win32unix/accept.c
  68. +15 −0 otherlibs/win32unix/socket.c
  69. +1 −1 stdlib/scanf.mli
  70. +14 −7 tools/Makefile.shared
  71. +5 −3 tools/make-package-macosx
  72. +43 −0 tools/make-version-header.sh
  73. +2 −1 tools/ocamlcp.ml
  74. +24 −21 tools/ocamldep.ml
  75. +158 −0 tools/ocamloptp.ml
  76. +1 −0 tools/setignore
  77. +2 −2 utils/warnings.ml
  78. +1 −0 yacc/.ignore
View
140 Changes

Large diffs are not rendered by default.

Oops, something went wrong.
View
@@ -169,6 +169,9 @@ Examples:
For Sun Solaris with the "acc" compiler:
./configure -cc "acc -fast" -libs "-lucb"
+ For Sun Solaris on Sparc 64bit, to compile natively (32bit only)
+ ./configure -cc "gcc -m32" -as "as -32" -aspp "gcc -m32 -c"
+
For AIX 4.3 with the IBM compiler xlc:
./configure -cc "xlc_r -D_AIX43 -Wl,-bexpall,-brtl -qmaxmem=8192"
View
@@ -128,6 +128,7 @@ world:
world.opt:
$(MAKE) coldstart
$(MAKE) opt.opt
+ $(MAKE) ocamltoolsopt
# Hard bootstrap how-to:
# (only necessary in some cases, for example if you remove some primitive)
@@ -246,6 +247,7 @@ opt:
$(MAKE) ocamlopt
$(MAKE) libraryopt
$(MAKE) otherlibrariesopt
+ $(MAKE) ocamltoolsopt
$(MAKE) ocamlbuildlib.native
# Native-code versions of the tools
@@ -307,6 +309,7 @@ installopt:
for i in $(OTHERLIBRARIES); \
do (cd otherlibs/$$i; $(MAKE) installopt) || exit $$?; done
if test -f ocamlopt.opt ; then $(MAKE) installoptopt; fi
+ cd tools; $(MAKE) installopt
installoptopt:
cp ocamlc.opt $(BINDIR)/ocamlc.opt$(EXE)
@@ -657,6 +660,9 @@ clean::
ocamltools: ocamlc ocamlyacc ocamllex asmcomp/cmx_format.cmi
cd tools; $(MAKE) all
+ocamltoolsopt: ocamlopt
+ cd tools; $(MAKE) opt
+
ocamltoolsopt.opt: ocamlc.opt ocamlyacc ocamllex asmcomp/cmx_format.cmi
cd tools; $(MAKE) opt.opt
@@ -798,8 +804,8 @@ distclean:
.PHONY: coreboot defaultentry depend distclean install installopt
.PHONY: library library-cross libraryopt ocamlbuild-mixed-boot
.PHONY: ocamlbuild.byte ocamlbuild.native ocamldebugger ocamldoc
-.PHONY: ocamldoc.opt ocamllex ocamllex.opt ocamltools ocamltools.opt
-.PHONY: ocamlyacc opt-core opt opt.opt otherlibraries
+.PHONY: ocamldoc.opt ocamllex ocamllex.opt ocamltools ocamltoolsopt
+.PHONY: ocamltoolsopt.opt ocamlyacc opt-core opt opt.opt otherlibraries
.PHONY: otherlibrariesopt package-macosx promote promote-cross
.PHONY: restore runtime runtimeopt makeruntimeopt world world.opt
View
@@ -91,8 +91,7 @@ THIRD-PARTY SOFTWARE:
Can be downloaded from http://alain.frisch.fr/flexdll.html
[3] TCL/TK version 8.5. Windows binaries are available as part of the
- ActiveTCL distribution at http://www.activestate.com/products/ActiveTcl/
-
+ ActiveTCL distribution at http://www.activestate.com/activetcl/downloads
RECOMPILATION FROM THE SOURCES:
@@ -186,7 +185,7 @@ contributed his changes to the OCaml project.
REQUIREMENTS:
-This port runs under MS Windows Vista, XP, and 2000.
+This port runs under MS Windows Seven, Vista, XP, and 2000.
The base bytecode system (ocamlc, ocaml, ocamllex, ocamlyacc, ...)
runs without any additional tools.
@@ -202,10 +201,14 @@ the Setup tool from Cygwin):
mingw64-i686-binutils
mingw64-i686-gcc
+ mingw64-i686-gcc-core
mingw64-i686-runtime
-NOTE:
+NOTES:
+
+ - Do not use the Cygwin version of flexdll for this port.
+
- There is another 32-bit gcc compiler, from the MinGW.org
project, packaged in Cygwin under the name mingw-gcc.
It is not currently supported by flexdll and OCaml.
@@ -223,7 +226,7 @@ NOTE:
The LablTk GUI requires Tcl/Tk 8.5. Windows binaries are available
as part of the ActiveTCL distribution at
-http://www.activestate.com/products/ActiveTcl/
+ http://www.activestate.com/activetcl/downloads
Note that you will need to install the 32-bit version of ActiveTCL,
even if you are on a 64-bit version of Windows.
@@ -246,23 +249,26 @@ environment variable. E.g. if Tcl/Tk was installed in C:\tcl, add
RECOMPILATION FROM THE SOURCES:
You will need the following software components to perform the recompilation:
-- Windows NT, 2000, XP, or Vista.
-- Cygwin: http://sourceware.cygnus.com/cygwin/
- Install at least the following packages:
+- Windows NT, 2000, XP, Vista, or Seven.
+- Cygwin: http://cygwin.com/
+ Install at least the following packages (and their dependencies, as
+ computed by Cygwin's setup.exe):
mingw64-i686-binutils
mingw64-i686-gcc
+ mingw64-i686-gcc-core
mingw64-i686-runtime
diffutils
make
ncurses
-- TCL/TK version 8.5 (see above).
-- The flexdll tool (see above).
+- Tcl/Tk version 8.5 (see above).
+- The flexdll tool (see above). Do not forget to add the flexdll directory
+ to your PATH
The standalone mingw toolchain from the MinGW-w64 project
(http://mingw-w64.sourceforge.net/) is not supported. Please use the
version packaged in Cygwin instead.
-Start a Cygwin shell and unpack the source distribution
+Start a new Cygwin shell and unpack the source distribution
(ocaml-X.YY.Z.tar.gz) with "tar xzf". Change to the top-level
directory of the OCaml distribution. Then, do
@@ -273,7 +279,7 @@ directory of the OCaml distribution. Then, do
Then, edit config/Makefile as needed, following the comments in this file.
Normally, the only variables that need to be changed are
PREFIX where to install everything
- TK_ROOT where TCL/TK was installed
+ TK_ROOT where Tcl/Tk was installed
Finally, use "make -f Makefile.nt" to build the system, e.g.
@@ -317,16 +323,42 @@ the OCaml packages). Alternatively, recompile from the source distribution.
RECOMPILATION FROM THE SOURCES:
-Just follow the instructions for Unix machines given in the file INSTALL.
+Before starting, make sure that the gcc version installed by cygwin
+is not 4.5.3 (it has a bug that affects OCaml). If needed, use cygwin's
+setup.exe to downgrade to 4.3.4.
+
+You will need to recompile (and install) flexdll from source with
+Cygwin's C compiler because the official binary version of flexdll
+doesn't handle Cygwin's symbolic links and sometimes fails to
+launch the C compiler.
+
+In order to recompile flexdll, you first need to configure, compile,
+and install OCaml without flexdll support (configure with options
+-no-shared-libs -no-tk -no-camlp4), then modify the flexdll Makefile
+to change line 51 from:
+ LINKFLAGS = -ccopt "-link version_res.o"
+to:
+ LINKFLAGS = -cclib version_res.o
+
+Then "make CHAINS=cygwin" and add the flexdll directory to your PATH.
+Make sure to add it before "/usr/bin" or you will get cygwin's flexlink.
+
+Then, in OCaml's source directory, type:
+ make clean
+ make distclean
+and follow the instructions for Unix machines given in the file INSTALL.
NOTES:
-The libraries available in this port are "num", "str", "threads",
-"unix" and "labltk". "graph" is not available.
-The replay debugger is fully supported.
-When upgrading from 3.12.0 to 3.12.1, you will need to remove
-/usr/local/bin/ocamlmktop.exe before typing "make install".
+- There is a problem with cygwin's port of gcc version 4.5.3. You should
+ use cygwin's setup program to downgrade to 4.3.4 before compiling OCaml.
+- The replay debugger is fully supported.
+- When upgrading from 3.12.0 to 3.12.1, you will need to remove
+ /usr/local/bin/ocamlmktop.exe before typing "make install".
+- In order to use the "graph" and "labltk" libraries, you will need
+ to use Cygwin's setup.exe to install the xinit, libX11-devel, tcl,
+ and tcl-tk packages before compiling OCaml.
------------------------------------------------------------------------------
View
@@ -1,4 +1,4 @@
-4.01.0+dev3_2012-05-30
+4.01.0+dev4_2012-07-26
# The version string is the first line of this file.
# It must be in the format described in stdlib/sys.mli
View
@@ -111,42 +111,6 @@ let emit_float32_directive directive f =
let x = Int32.bits_of_float (float_of_string f) in
emit_printf "\t%s\t0x%lx\n" directive x
-(* Emit debug information *)
-
-(* This assoc list is expected to be very short *)
-let file_pos_nums =
- (ref [] : (string * int) list ref)
-
-(* Number of files *)
-let file_pos_num_cnt = ref 1
-
-(* Reset debug state at beginning of asm file *)
-let reset_debug_info () =
- file_pos_nums := [];
- file_pos_num_cnt := 1
-
-(* We only diplay .file if the file has not been seen before. We
- display .loc for every instruction. *)
-let emit_debug_info dbg =
- if !Clflags.debug && not (Debuginfo.is_none dbg) then (
- let line = dbg.Debuginfo.dinfo_line in
- assert (line <> 0); (* clang errors out on zero line numbers *)
- let file_name = dbg.Debuginfo.dinfo_file in
- let file_num =
- try List.assoc file_name !file_pos_nums
- with Not_found ->
- let file_num = !file_pos_num_cnt in
- incr file_pos_num_cnt;
- emit_string " .file ";
- emit_int file_num; emit_char ' ';
- emit_string_literal file_name; emit_char '\n';
- file_pos_nums := (file_name,file_num) :: !file_pos_nums;
- file_num in
- emit_string " .loc ";
- emit_int file_num; emit_char ' ';
- emit_int line; emit_char '\n'
- )
-
(* Record live pointers at call points *)
type frame_descr =
@@ -240,3 +204,39 @@ let cfi_adjust_cfa_offset n =
emit_string " .cfi_adjust_cfa_offset "; emit_int n; emit_string "\n";
end
+(* Emit debug information *)
+
+(* This assoc list is expected to be very short *)
+let file_pos_nums =
+ (ref [] : (string * int) list ref)
+
+(* Number of files *)
+let file_pos_num_cnt = ref 1
+
+(* Reset debug state at beginning of asm file *)
+let reset_debug_info () =
+ file_pos_nums := [];
+ file_pos_num_cnt := 1
+
+(* We only diplay .file if the file has not been seen before. We
+ display .loc for every instruction. *)
+let emit_debug_info dbg =
+ if is_cfi_enabled () &&
+ !Clflags.debug && not (Debuginfo.is_none dbg) then begin
+ let line = dbg.Debuginfo.dinfo_line in
+ assert (line <> 0); (* clang errors out on zero line numbers *)
+ let file_name = dbg.Debuginfo.dinfo_file in
+ let file_num =
+ try List.assoc file_name !file_pos_nums
+ with Not_found ->
+ let file_num = !file_pos_num_cnt in
+ incr file_pos_num_cnt;
+ emit_string " .file ";
+ emit_int file_num; emit_char ' ';
+ emit_string_literal file_name; emit_char '\n';
+ file_pos_nums := (file_name,file_num) :: !file_pos_nums;
+ file_num in
+ emit_string " .loc ";
+ emit_int file_num; emit_char ' ';
+ emit_int line; emit_char '\n'
+ end
View
@@ -48,7 +48,7 @@ let size_float = 8
(* Behavior of division *)
-let division_crashes_on_overflow = false
+let division_crashes_on_overflow = true
(* Operations on addressing modes *)
Oops, something went wrong.

0 comments on commit c61fd90

Please sign in to comment.