1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/configure b/configure
-index 66ccda9..2b40fc2 100755
+index 37d46c2..fa96ef8 100755
--- a/configure
+++ b/configure
@@ -284,7 +284,8 @@ case "$bytecc,$host" in
cc,mips-*-irix6*)
# Add -n32 flag to ensure compatibility with native-code compiler
bytecccompopts="-n32"
-@@ -731,6 +732,7 @@ case "$arch,$nativecc,$system,$host_type" in
+@@ -738,6 +739,7 @@ case "$arch,$nativecc,$system,$host_type" in
nativecccompopts="$gcc_warnings -DSHRINKED_GNUC";;
*,*,rhapsody,*) nativecccompopts="$gcc_warnings -DDARWIN_VERSION_6 $dl_defs"
if $arch64; then partialld="ld -r -arch ppc64"; fi;;
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/configure b/configure
-index 2b40fc2..7a34621 100755
+index fa96ef8..40a78cb 100755
--- a/configure
+++ b/configure
-@@ -1632,7 +1632,7 @@ echo "DEBUGGER=$debugger" >> Makefile
+@@ -1639,7 +1639,7 @@ echo "DEBUGGER=$debugger" >> Makefile
echo "CC_PROFILE=$cc_profile" >> Makefile
echo "SYSTHREAD_SUPPORT=$systhread_support" >> Makefile
echo "PARTIALLD=$partialld" >> Makefile
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/tools/ocamlmklib.mlp b/tools/ocamlmklib.mlp
-index 6b78a68..95f5674 100644
+index 8374439..b8d9e33 100644
--- a/tools/ocamlmklib.mlp
+++ b/tools/ocamlmklib.mlp
@@ -37,6 +37,11 @@ and output_c = ref "" (* Output name for C part of library *)
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/ocamldoc/Makefile b/ocamldoc/Makefile
-index 2d8b0ea..30684ee 100644
+index 8f6e87c..ace934c 100644
--- a/ocamldoc/Makefile
+++ b/ocamldoc/Makefile
-@@ -319,7 +319,7 @@ test_texi: dummy
+@@ -318,7 +318,7 @@ test_texi: dummy
stdlib_man/Pervasives.3o: $(STDLIB_MLIS)
$(MKDIR) stdlib_man
$(OCAMLDOC_RUN) -man -d stdlib_man $(INCLUDES) \
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/build/install.sh b/build/install.sh
-index a7ab103..b42373d 100755
+index 2785932..e8a6c15 100755
--- a/build/install.sh
+++ b/build/install.sh
@@ -18,7 +18,7 @@ set -e
+++ /dev/null
-From: Stephane Glondu <steph@glondu.net>
-Date: Tue, 8 Mar 2011 21:17:40 +0100
-Subject: Fix ocamlopt w.r.t. binutils 2.21
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Bug: http://caml.inria.fr/mantis/view.php?id=5237
-Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=617404
-Authors: Eric Cooper, spiralvoice
-Reviewed-by: Stéphane Glondu <steph@glondu.net>
----
- asmcomp/amd64/emit.mlp | 13 +++++++------
- asmcomp/i386/emit.mlp | 6 +++---
- 2 files changed, 10 insertions(+), 9 deletions(-)
-
-diff --git a/asmcomp/amd64/emit.mlp b/asmcomp/amd64/emit.mlp
-index 55da47b..45afbb7 100644
---- a/asmcomp/amd64/emit.mlp
-+++ b/asmcomp/amd64/emit.mlp
-@@ -688,17 +688,18 @@ let fundecl fundecl =
- emit_all true fundecl.fun_body;
- List.iter emit_call_gc !call_gc_sites;
- emit_call_bound_errors ();
-+ begin match Config.system with
-+ "linux" | "gnu" ->
-+ ` .type {emit_symbol fundecl.fun_name},@function\n`;
-+ ` .size {emit_symbol fundecl.fun_name},.-{emit_symbol fundecl.fun_name}\n`
-+ | _ -> ()
-+ end;
- if !float_constants <> [] then begin
- if macosx
- then ` .literal8\n`
- else ` .section .rodata.cst8,\"a\",@progbits\n`;
- List.iter emit_float_constant !float_constants
-- end;
-- match Config.system with
-- "linux" | "gnu" ->
-- ` .type {emit_symbol fundecl.fun_name},@function\n`;
-- ` .size {emit_symbol fundecl.fun_name},.-{emit_symbol fundecl.fun_name}\n`
-- | _ -> ()
-+ end
-
- (* Emission of data *)
-
-diff --git a/asmcomp/i386/emit.mlp b/asmcomp/i386/emit.mlp
-index 3baba2e..b29f365 100644
---- a/asmcomp/i386/emit.mlp
-+++ b/asmcomp/i386/emit.mlp
-@@ -905,12 +905,12 @@ let fundecl fundecl =
- emit_all true fundecl.fun_body;
- List.iter emit_call_gc !call_gc_sites;
- emit_call_bound_errors ();
-- List.iter emit_float_constant !float_constants;
-- match Config.system with
-+ begin match Config.system with
- "linux_elf" | "bsd_elf" | "gnu" ->
- ` .type {emit_symbol fundecl.fun_name},@function\n`;
- ` .size {emit_symbol fundecl.fun_name},.-{emit_symbol fundecl.fun_name}\n`
-- | _ -> ()
-+ | _ -> () end;
-+ List.iter emit_float_constant !float_constants
-
-
- (* Emission of data *)
---
--- /dev/null
+From: Stephane Glondu <steph@glondu.net>
+Date: Sat, 16 Apr 2011 23:41:23 +0200
+Subject: Natdynlink works on powerpc and hurd-i386
+
+Rationale: ssreflect used to work with natdynlink on powerpc and hurd
+with ocaml 3.11.2 / coq 8.2...
+
+Note: there is no native compiler for powerpc64! This must be a
+typo...
+
+Signed-off-by: Stephane Glondu <steph@glondu.net>
+---
+ configure | 3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+diff --git a/configure b/configure
+index 40a78cb..dbad12d 100755
+--- a/configure
++++ b/configure
+@@ -620,13 +620,14 @@ if test $withsharedlibs = "yes"; then
+ case "$host" in
+ *-*-cygwin*) natdynlink=true;;
+ i[3456]86-*-linux*) natdynlink=true;;
++ i[3456]86-*-gnu*) natdynlink=true;;
+ x86_64-*-linux*) natdynlink=true;;
+ i[3456]86-*-darwin10.*)
+ if test $arch64 == true; then
+ natdynlink=true
+ fi;;
+ i[3456]86-*-darwin[89]*) natdynlink=true;;
+- powerpc64-*-linux*) natdynlink=true;;
++ powerpc-*-linux*) natdynlink=true;;
+ sparc-*-linux*) natdynlink=true;;
+ i686-*-kfreebsd*) natdynlink=true;;
+ x86_64-*-kfreebsd*) natdynlink=true;;
+--
--- /dev/null
+From: Stephane Glondu <steph@glondu.net>
+Date: Thu, 21 Apr 2011 18:39:57 +0200
+Subject: Declare primitive name table as const char *
+
+This avoids lots of warnings when compiling with g++...
+
+Signed-off-by: Stephane Glondu <steph@glondu.net>
+---
+ bytecomp/symtable.ml | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/bytecomp/symtable.ml b/bytecomp/symtable.ml
+index d6ecc94..37def29 100644
+--- a/bytecomp/symtable.ml
++++ b/bytecomp/symtable.ml
+@@ -123,7 +123,7 @@ let output_primitive_table outchan =
+ fprintf outchan " %s,\n" prim.(i)
+ done;
+ fprintf outchan " (primitive) 0 };\n";
+- fprintf outchan "char * caml_names_of_builtin_cprim[] = {\n";
++ fprintf outchan "const char * caml_names_of_builtin_cprim[] = {\n";
+ for i = 0 to Array.length prim - 1 do
+ fprintf outchan " \"%s\",\n" prim.(i)
+ done;
+--
+++ /dev/null
-From: Stephane Glondu <steph@glondu.net>
-Date: Sat, 16 Apr 2011 23:41:23 +0200
-Subject: Natdynlink works on powerpc and hurd-i386
-
-Rationale: ssreflect used to work with natdynlink on powerpc and hurd
-with ocaml 3.11.2 / coq 8.2...
-
-Note: there is no native compiler for powerpc64! This must be a
-typo...
-
-Signed-off-by: Stephane Glondu <steph@glondu.net>
----
- configure | 3 ++-
- 1 files changed, 2 insertions(+), 1 deletions(-)
-
-diff --git a/configure b/configure
-index 7a34621..32e8d2e 100755
---- a/configure
-+++ b/configure
-@@ -619,13 +619,14 @@ if test $withsharedlibs = "yes"; then
- case "$host" in
- *-*-cygwin*) natdynlink=true;;
- i[3456]86-*-linux*) natdynlink=true;;
-+ i[3456]86-*-gnu*) natdynlink=true;;
- x86_64-*-linux*) natdynlink=true;;
- i[3456]86-*-darwin10.*)
- if test $arch64 == true; then
- natdynlink=true
- fi;;
- i[3456]86-*-darwin[89]*) natdynlink=true;;
-- powerpc64-*-linux*) natdynlink=true;;
-+ powerpc-*-linux*) natdynlink=true;;
- sparc-*-linux*) natdynlink=true;;
- i686-*-kfreebsd*) natdynlink=true;;
- x86_64-*-kfreebsd*) natdynlink=true;;
---
--- /dev/null
+From: Stephane Glondu <steph@glondu.net>
+Date: Thu, 21 Apr 2011 18:39:31 +0200
+Subject: Avoid multiple declarations in generated .c files in -output-obj
+
+In -output-obj mode, <caml/mlvalues.h> (which contains some
+primitives) is included in the generated .c file, leading to errors
+when compiling with g++ (multiple declarations).
+
+There are probably better implementations (in particular, in this one,
+care must be taken when changing the list of primitives available in
+mlvalues.h), but this is a small and (not too) intrusive patch.
+
+Signed-off-by: Stephane Glondu <steph@glondu.net>
+---
+ bytecomp/bytelink.ml | 17 +++++++++++++++--
+ bytecomp/symtable.ml | 8 +++++---
+ bytecomp/symtable.mli | 2 +-
+ 3 files changed, 21 insertions(+), 6 deletions(-)
+
+diff --git a/bytecomp/bytelink.ml b/bytecomp/bytelink.ml
+index bd8f3b2..9d62fc6 100644
+--- a/bytecomp/bytelink.ml
++++ b/bytecomp/bytelink.ml
+@@ -400,6 +400,19 @@ let output_cds_file outfile =
+ remove_file outfile;
+ raise x
+
++(* List of primitives declared in caml/mlvalues.h, to avoid duplicate
++ declarations in generated .c files *)
++
++let mlvalues_primitives = [
++ "caml_get_public_method";
++ "caml_hash_variant";
++ "caml_string_length";
++ "caml_Double_val";
++ "caml_Store_double_val";
++ "caml_Int64_val";
++ "caml_atom_table";
++]
++
+ (* Output a bytecode executable as a C file *)
+
+ let link_bytecode_as_c tolink outfile =
+@@ -442,7 +455,7 @@ let link_bytecode_as_c tolink outfile =
+ (Marshal.to_string sections []);
+ output_string outchan "\n};\n\n";
+ (* The table of primitives *)
+- Symtable.output_primitive_table outchan;
++ Symtable.output_primitive_table outchan mlvalues_primitives;
+ (* The entry point *)
+ output_string outchan "\
+ \nvoid caml_startup(char ** argv)\
+@@ -516,7 +529,7 @@ let link objfiles output_name =
+ #else\n\
+ typedef long value;\n\
+ #endif\n";
+- Symtable.output_primitive_table poc;
++ Symtable.output_primitive_table poc [];
+ output_string poc "\
+ #ifdef __cplusplus\n\
+ }\n\
+diff --git a/bytecomp/symtable.ml b/bytecomp/symtable.ml
+index 37def29..70958ee 100644
+--- a/bytecomp/symtable.ml
++++ b/bytecomp/symtable.ml
+@@ -112,15 +112,17 @@ let output_primitive_names outchan =
+
+ open Printf
+
+-let output_primitive_table outchan =
++let output_primitive_table outchan blacklist =
+ let prim = all_primitives() in
+ for i = 0 to Array.length prim - 1 do
+- fprintf outchan "extern value %s();\n" prim.(i)
++ let p = prim.(i) in
++ if not (List.mem p blacklist) then
++ fprintf outchan "extern value %s();\n" p
+ done;
+ fprintf outchan "typedef value (*primitive)();\n";
+ fprintf outchan "primitive caml_builtin_cprim[] = {\n";
+ for i = 0 to Array.length prim - 1 do
+- fprintf outchan " %s,\n" prim.(i)
++ fprintf outchan " (primitive)%s,\n" prim.(i)
+ done;
+ fprintf outchan " (primitive) 0 };\n";
+ fprintf outchan "const char * caml_names_of_builtin_cprim[] = {\n";
+diff --git a/bytecomp/symtable.mli b/bytecomp/symtable.mli
+index 2b1583f..316381e 100644
+--- a/bytecomp/symtable.mli
++++ b/bytecomp/symtable.mli
+@@ -24,7 +24,7 @@ val require_primitive: string -> unit
+ val initial_global_table: unit -> Obj.t array
+ val output_global_map: out_channel -> unit
+ val output_primitive_names: out_channel -> unit
+-val output_primitive_table: out_channel -> unit
++val output_primitive_table: out_channel -> string list -> unit
+ val data_global_map: unit -> Obj.t
+ val data_primitive_names: unit -> string
+
+--
+++ /dev/null
-From: Stephane Glondu <steph@glondu.net>
-Date: Thu, 21 Apr 2011 18:39:57 +0200
-Subject: Declare primitive name table as const char *
-
-This avoids lots of warnings when compiling with g++...
-
-Signed-off-by: Stephane Glondu <steph@glondu.net>
----
- bytecomp/symtable.ml | 2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
-
-diff --git a/bytecomp/symtable.ml b/bytecomp/symtable.ml
-index d6ecc94..37def29 100644
---- a/bytecomp/symtable.ml
-+++ b/bytecomp/symtable.ml
-@@ -123,7 +123,7 @@ let output_primitive_table outchan =
- fprintf outchan " %s,\n" prim.(i)
- done;
- fprintf outchan " (primitive) 0 };\n";
-- fprintf outchan "char * caml_names_of_builtin_cprim[] = {\n";
-+ fprintf outchan "const char * caml_names_of_builtin_cprim[] = {\n";
- for i = 0 to Array.length prim - 1 do
- fprintf outchan " \"%s\",\n" prim.(i)
- done;
---
+++ /dev/null
-From: Stephane Glondu <steph@glondu.net>
-Date: Thu, 21 Apr 2011 18:39:31 +0200
-Subject: Avoid multiple declarations in generated .c files in -output-obj
-
-In -output-obj mode, <caml/mlvalues.h> (which contains some
-primitives) is included in the generated .c file, leading to errors
-when compiling with g++ (multiple declarations).
-
-There are probably better implementations (in particular, in this one,
-care must be taken when changing the list of primitives available in
-mlvalues.h), but this is a small and (not too) intrusive patch.
-
-Signed-off-by: Stephane Glondu <steph@glondu.net>
----
- bytecomp/bytelink.ml | 17 +++++++++++++++--
- bytecomp/symtable.ml | 8 +++++---
- bytecomp/symtable.mli | 2 +-
- 3 files changed, 21 insertions(+), 6 deletions(-)
-
-diff --git a/bytecomp/bytelink.ml b/bytecomp/bytelink.ml
-index 4a6426d..47903c4 100644
---- a/bytecomp/bytelink.ml
-+++ b/bytecomp/bytelink.ml
-@@ -400,6 +400,19 @@ let output_cds_file outfile =
- remove_file outfile;
- raise x
-
-+(* List of primitives declared in caml/mlvalues.h, to avoid duplicate
-+ declarations in generated .c files *)
-+
-+let mlvalues_primitives = [
-+ "caml_get_public_method";
-+ "caml_hash_variant";
-+ "caml_string_length";
-+ "caml_Double_val";
-+ "caml_Store_double_val";
-+ "caml_Int64_val";
-+ "caml_atom_table";
-+]
-+
- (* Output a bytecode executable as a C file *)
-
- let link_bytecode_as_c tolink outfile =
-@@ -442,7 +455,7 @@ CAMLextern void caml_startup_code(\n\
- (Marshal.to_string sections []);
- output_string outchan "\n};\n\n";
- (* The table of primitives *)
-- Symtable.output_primitive_table outchan;
-+ Symtable.output_primitive_table outchan mlvalues_primitives;
- (* The entry point *)
- output_string outchan "\n\
- void caml_startup(char ** argv)\n\
-@@ -516,7 +529,7 @@ let link objfiles output_name =
- #else\n\
- typedef long value;\n\
- #endif\n";
-- Symtable.output_primitive_table poc;
-+ Symtable.output_primitive_table poc [];
- output_string poc "\
- #ifdef __cplusplus\n\
- }\n\
-diff --git a/bytecomp/symtable.ml b/bytecomp/symtable.ml
-index 37def29..70958ee 100644
---- a/bytecomp/symtable.ml
-+++ b/bytecomp/symtable.ml
-@@ -112,15 +112,17 @@ let output_primitive_names outchan =
-
- open Printf
-
--let output_primitive_table outchan =
-+let output_primitive_table outchan blacklist =
- let prim = all_primitives() in
- for i = 0 to Array.length prim - 1 do
-- fprintf outchan "extern value %s();\n" prim.(i)
-+ let p = prim.(i) in
-+ if not (List.mem p blacklist) then
-+ fprintf outchan "extern value %s();\n" p
- done;
- fprintf outchan "typedef value (*primitive)();\n";
- fprintf outchan "primitive caml_builtin_cprim[] = {\n";
- for i = 0 to Array.length prim - 1 do
-- fprintf outchan " %s,\n" prim.(i)
-+ fprintf outchan " (primitive)%s,\n" prim.(i)
- done;
- fprintf outchan " (primitive) 0 };\n";
- fprintf outchan "const char * caml_names_of_builtin_cprim[] = {\n";
-diff --git a/bytecomp/symtable.mli b/bytecomp/symtable.mli
-index 2b1583f..316381e 100644
---- a/bytecomp/symtable.mli
-+++ b/bytecomp/symtable.mli
-@@ -24,7 +24,7 @@ val require_primitive: string -> unit
- val initial_global_table: unit -> Obj.t array
- val output_global_map: out_channel -> unit
- val output_primitive_names: out_channel -> unit
--val output_primitive_table: out_channel -> unit
-+val output_primitive_table: out_channel -> string list -> unit
- val data_global_map: unit -> Obj.t
- val data_primitive_names: unit -> string
-
---
--- /dev/null
+From: Stephane Glondu <steph@glondu.net>
+Date: Tue, 24 May 2011 12:16:20 +0200
+Subject: Properly initialize executable name in caml_startup_code
+
+Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=627756
+Signed-off-by: Stephane Glondu <steph@glondu.net>
+---
+ byterun/startup.c | 11 ++++++++++-
+ 1 files changed, 10 insertions(+), 1 deletions(-)
+
+diff --git a/byterun/startup.c b/byterun/startup.c
+index db273b2..780cb1e 100644
+--- a/byterun/startup.c
++++ b/byterun/startup.c
+@@ -443,6 +443,10 @@ CAMLexport void caml_startup_code(
+ {
+ value res;
+ char* cds_file;
++ char * exe_name;
++#ifdef __linux__
++ static char proc_self_exe[256];
++#endif
+
+ caml_init_ieee_floats();
+ caml_init_custom_operations();
+@@ -455,6 +459,11 @@ CAMLexport void caml_startup_code(
+ strcpy(caml_cds_file, cds_file);
+ }
+ parse_camlrunparam();
++ exe_name = argv[0];
++#ifdef __linux__
++ if (caml_executable_name(proc_self_exe, sizeof(proc_self_exe)) == 0)
++ exe_name = proc_self_exe;
++#endif
+ caml_external_raise = NULL;
+ /* Initialize the abstract machine */
+ caml_init_gc (minor_heap_init, heap_size_init, heap_chunk_init,
+@@ -489,7 +498,7 @@ CAMLexport void caml_startup_code(
+ caml_section_table_size = section_table_size;
+ /* Initialize system libraries */
+ caml_init_exceptions();
+- caml_sys_init("", argv);
++ caml_sys_init(exe_name, argv);
+ /* Execute the program */
+ caml_debugger(PROGRAM_START);
+ res = caml_interprete(caml_start_code, caml_code_size);
+--
1 files changed, 32 insertions(+), 4 deletions(-)
diff --git a/bytecomp/bytelink.ml b/bytecomp/bytelink.ml
-index 47903c4..e63dd3b 100644
+index 9d62fc6..a3aee28 100644
--- a/bytecomp/bytelink.ml
+++ b/bytecomp/bytelink.ml
@@ -415,7 +415,7 @@ let mlvalues_primitives = [
let outchan = open_out outfile in
begin try
(* The bytecode *)
-@@ -457,14 +457,27 @@ CAMLextern void caml_startup_code(\n\
+@@ -457,14 +457,27 @@ let link_bytecode_as_c tolink outfile =
(* The table of primitives *)
Symtable.output_primitive_table outchan mlvalues_primitives;
(* The entry point *)
-- output_string outchan "\n\
+- output_string outchan "\
+ if with_main then begin
-+ output_string outchan "\n\
-+int main(int argc, char **argv)\n\
-+{\n\
-+ caml_startup_code(caml_code, sizeof(caml_code),\n\
-+ caml_data, sizeof(caml_data),\n\
-+ caml_sections, sizeof(caml_sections),\n\
-+ argv);\n\
-+ return 0; /* not reached */\n\
-+}\n"
++ output_string outchan "\
++\nint main(int argc, char **argv)\
++\n{\
++\n caml_startup_code(caml_code, sizeof(caml_code),\
++\n caml_data, sizeof(caml_data),\
++\n caml_sections, sizeof(caml_sections),\
++\n argv);\
++\n return 0; /* not reached */\
++\n}\n"
+ end else begin
-+ output_string outchan "\n\
- void caml_startup(char ** argv)\n\
- {\n\
- caml_startup_code(caml_code, sizeof(caml_code),\n\
- caml_data, sizeof(caml_data),\n\
- caml_sections, sizeof(caml_sections),\n\
- argv);\n\
--}\n\
-+}\n"
++ output_string outchan "\
+ \nvoid caml_startup(char ** argv)\
+ \n{\
+ \n caml_startup_code(caml_code, sizeof(caml_code),\
+ \n caml_data, sizeof(caml_data),\
+ \n caml_sections, sizeof(caml_sections),\
+ \n argv);\
+-\n}\
++\n}\n"
+ end;
+ output_string outchan "\
- #ifdef __cplusplus\n\
- }\n\
- #endif\n";
+ \n#ifdef __cplusplus\
+ \n}\
+ \n#endif\n";
@@ -501,6 +514,11 @@ let fix_exec_name name =
if String.contains name '.' then name else name ^ ".exe"
| _ -> name
+++ /dev/null
-From: Stephane Glondu <steph@glondu.net>
-Date: Tue, 24 May 2011 12:16:20 +0200
-Subject: Properly initialize executable name in caml_startup_code
-
-Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=627756
-Signed-off-by: Stephane Glondu <steph@glondu.net>
----
- byterun/startup.c | 11 ++++++++++-
- 1 files changed, 10 insertions(+), 1 deletions(-)
-
-diff --git a/byterun/startup.c b/byterun/startup.c
-index 57cbb73..9fe288c 100644
---- a/byterun/startup.c
-+++ b/byterun/startup.c
-@@ -443,6 +443,10 @@ CAMLexport void caml_startup_code(
- {
- value res;
- char* cds_file;
-+ char * exe_name;
-+#ifdef __linux__
-+ static char proc_self_exe[256];
-+#endif
-
- caml_init_ieee_floats();
- caml_init_custom_operations();
-@@ -455,6 +459,11 @@ CAMLexport void caml_startup_code(
- strcpy(caml_cds_file, cds_file);
- }
- parse_camlrunparam();
-+ exe_name = argv[0];
-+#ifdef __linux__
-+ if (caml_executable_name(proc_self_exe, sizeof(proc_self_exe)) == 0)
-+ exe_name = proc_self_exe;
-+#endif
- caml_external_raise = NULL;
- /* Initialize the abstract machine */
- caml_init_gc (minor_heap_init, heap_size_init, heap_chunk_init,
-@@ -489,7 +498,7 @@ CAMLexport void caml_startup_code(
- caml_section_table_size = section_table_size;
- /* Initialize system libraries */
- caml_init_exceptions();
-- caml_sys_init("", argv);
-+ caml_sys_init(exe_name, argv);
- /* Execute the program */
- caml_debugger(PROGRAM_START);
- res = caml_interprete(caml_start_code, caml_code_size);
---
+++ /dev/null
-From: Stephane Glondu <steph@glondu.net>
-Date: Sat, 28 May 2011 23:55:08 +0200
-Subject: Force aligned access for double and int64 on mips*
-
-Some mips machines accept unaligned accesses, others don't. Therefore,
-do not rely on auto-detection.
-
-Signed-off-by: Stephane Glondu <steph@glondu.net>
----
- configure | 4 ++--
- 1 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/configure b/configure
-index 32e8d2e..e03a4b8 100755
---- a/configure
-+++ b/configure
-@@ -434,7 +434,7 @@ esac
- # Determine alignment constraints
-
- case "$host" in
-- sparc*-*-*|hppa*-*-*|arm*-*-*)
-+ sparc*-*-*|hppa*-*-*|arm*-*-*|mips*-*-*)
- # On Sparc V9 with certain versions of gcc, determination of double
- # alignment is not reliable (PR#1521), hence force it.
- # Same goes for hppa.
-@@ -467,7 +467,7 @@ esac
- if $int64_native; then
- case "$host" in
- # PR#5088: autodetection is unreliable on ARM
-- sparc*-*-*|hppa*-*-*|arm*-*-*)
-+ sparc*-*-*|hppa*-*-*|arm*-*-*|mips*-*-*)
- if test $2 = 8; then
- echo "64-bit integers can be word-aligned."
- echo "#undef ARCH_ALIGN_INT64" >> m.h
---
0004-Put-manpages-in-section-3o-instead-of-3.patch
0005-Patch-config.sh-for-installation.patch
0006-Install-ocamlbuild-as-a-link-on-either-.native-or-.b.patch
-0007-Fix-ocamlopt-w.r.t.-binutils-2.21.patch
-0008-Natdynlink-works-on-powerpc-and-hurd-i386.patch
-0009-Declare-primitive-name-table-as-const-char.patch
-0010-Avoid-multiple-declarations-in-generated-.c-files-in.patch
+0007-Natdynlink-works-on-powerpc-and-hurd-i386.patch
+0008-Declare-primitive-name-table-as-const-char.patch
+0009-Avoid-multiple-declarations-in-generated-.c-files-in.patch
+0010-Properly-initialize-executable-name-in-caml_startup_.patch
0011-Embed-bytecode-in-C-object-when-using-custom.patch
-0012-Properly-initialize-executable-name-in-caml_startup_.patch
-0013-Force-aligned-access-for-double-and-int64-on-mips.patch