[Pkg-ocaml-maint-commits] [SCM] OCaml packaging branch, master, updated. debian/3.12.0-4-5-g0e481e0
The following commit has been merged in the master branch: commit 0e481e06bb4d994edd93af6ef163d9a6a92ce4df Author: Stephane Glondu Date: Thu Apr 21 17:08:51 2011 +0200 Update changelog and prepare upload to unstable diff --git a/debian/changelog b/debian/changelog index cb761d5..0497c77 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,13 @@ +ocaml (3.12.0-5) unstable; urgency=low + + * Fixes related to -output-obj with g++ (in debian/patches): +- add Declare-primitive-name-table-as-const-char +- add Avoid-multiple-declarations-in-generated-.c-files-in +- fix Embed-bytecode-in-C-object-when-using-custom: the closing + brace for extern "C" { ... } was missing in some cases + + -- Stéphane Glondu Thu, 21 Apr 2011 21:35:08 +0200 + ocaml (3.12.0-4) unstable; urgency=low * Bugfix in 0008-Embed-bytecode-in-C-object-when-using-custom.patch: -- OCaml packaging ___ Pkg-ocaml-maint-commits mailing list Pkg-ocaml-maint-commits@lists.alioth.debian.org http://lists.alioth.debian.org/mailman/listinfo/pkg-ocaml-maint-commits
[Pkg-ocaml-maint-commits] [SCM] OCaml packaging branch, master, updated. debian/3.12.0-4-5-g0e481e0
The following commit has been merged in the master branch: commit ac5bb8c9edcfd216b0d93c755775406399f5cd09 Author: Stephane Glondu Date: Thu Apr 21 21:26:02 2011 +0200 Missing semicolon in patch diff --git a/debian/patches/0011-Embed-bytecode-in-C-object-when-using-custom.patch b/debian/patches/0011-Embed-bytecode-in-C-object-when-using-custom.patch index 719fe76..e7403f8 100644 --- a/debian/patches/0011-Embed-bytecode-in-C-object-when-using-custom.patch +++ b/debian/patches/0011-Embed-bytecode-in-C-object-when-using-custom.patch @@ -9,11 +9,11 @@ Forwarded: not-needed Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=256900 Signed-off-by: Stephane Glondu --- - bytecomp/bytelink.ml | 33 - - 1 files changed, 28 insertions(+), 5 deletions(-) + bytecomp/bytelink.ml | 31 +++ + 1 files changed, 27 insertions(+), 4 deletions(-) diff --git a/bytecomp/bytelink.ml b/bytecomp/bytelink.ml -index 47903c4..09689be 100644 +index 47903c4..184079c 100644 --- a/bytecomp/bytelink.ml +++ b/bytecomp/bytelink.ml @@ -415,7 +415,7 @@ let mlvalues_primitives = [ @@ -25,7 +25,7 @@ index 47903c4..09689be 100644 let outchan = open_out outfile in begin try (* The bytecode *) -@@ -457,17 +457,30 @@ CAMLextern void caml_startup_code(\n\ +@@ -457,14 +457,27 @@ CAMLextern void caml_startup_code(\n\ (* The table of primitives *) Symtable.output_primitive_table outchan mlvalues_primitives; (* The entry point *) @@ -54,11 +54,7 @@ index 47903c4..09689be 100644 +output_string outchan "\ #ifdef __cplusplus\n\ }\n\ --#endif\n"; -+#endif\n" - close_out outchan - with x -> - close_out outchan; + #endif\n"; @@ -514,6 +527,16 @@ let link objfiles output_name = Clflags.dllibs := !lib_dllibs @ !Clflags.dllibs; (* put user's DLLs first *) if not !Clflags.custom_runtime then -- OCaml packaging ___ Pkg-ocaml-maint-commits mailing list Pkg-ocaml-maint-commits@lists.alioth.debian.org http://lists.alioth.debian.org/mailman/listinfo/pkg-ocaml-maint-commits
[Pkg-ocaml-maint-commits] [SCM] OCaml packaging branch, master, updated. debian/3.12.0-4-5-g0e481e0
The following commit has been merged in the master branch: commit bab4fd1e2379316f7c1f0224a114b4ad6ce2172f Author: Stephane Glondu Date: Thu Apr 21 18:50:57 2011 +0200 Reorder patches (non-upstreamable patch last) diff --git a/debian/patches/0009-Natdynlink-works-on-powerpc-and-hurd-i386.patch b/debian/patches/0008-Natdynlink-works-on-powerpc-and-hurd-i386.patch similarity index 100% rename from debian/patches/0009-Natdynlink-works-on-powerpc-and-hurd-i386.patch rename to debian/patches/0008-Natdynlink-works-on-powerpc-and-hurd-i386.patch diff --git a/debian/patches/0010-Declare-primitive-name-table-as-const-char.patch b/debian/patches/0009-Declare-primitive-name-table-as-const-char.patch similarity index 100% rename from debian/patches/0010-Declare-primitive-name-table-as-const-char.patch rename to debian/patches/0009-Declare-primitive-name-table-as-const-char.patch diff --git a/debian/patches/0011-Avoid-multiple-declarations-in-generated-.c-files-in.patch b/debian/patches/0010-Avoid-multiple-declarations-in-generated-.c-files-in.patch similarity index 94% rename from debian/patches/0011-Avoid-multiple-declarations-in-generated-.c-files-in.patch rename to debian/patches/0010-Avoid-multiple-declarations-in-generated-.c-files-in.patch index 7c45949..5543fcb 100644 --- a/debian/patches/0011-Avoid-multiple-declarations-in-generated-.c-files-in.patch +++ b/debian/patches/0010-Avoid-multiple-declarations-in-generated-.c-files-in.patch @@ -18,7 +18,7 @@ Signed-off-by: Stephane Glondu 3 files changed, 21 insertions(+), 6 deletions(-) diff --git a/bytecomp/bytelink.ml b/bytecomp/bytelink.ml -index e74a67d..09689be 100644 +index 4a6426d..47903c4 100644 --- a/bytecomp/bytelink.ml +++ b/bytecomp/bytelink.ml @@ -400,6 +400,19 @@ let output_cds_file outfile = @@ -40,7 +40,7 @@ index e74a67d..09689be 100644 + (* Output a bytecode executable as a C file *) - let link_bytecode_as_c tolink outfile with_main = + 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"; @@ -48,9 +48,9 @@ index e74a67d..09689be 100644 -Symtable.output_primitive_table outchan; +Symtable.output_primitive_table outchan mlvalues_primitives; (* The entry point *) - if with_main then begin - output_string outchan "\n\ -@@ -539,7 +552,7 @@ let link objfiles output_name = + 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"; diff --git a/debian/patches/0008-Embed-bytecode-in-C-object-when-using-custom.patch b/debian/patches/0011-Embed-bytecode-in-C-object-when-using-custom.patch similarity index 90% rename from debian/patches/0008-Embed-bytecode-in-C-object-when-using-custom.patch rename to debian/patches/0011-Embed-bytecode-in-C-object-when-using-custom.patch index 9286f2c..719fe76 100644 --- a/debian/patches/0008-Embed-bytecode-in-C-object-when-using-custom.patch +++ b/debian/patches/0011-Embed-bytecode-in-C-object-when-using-custom.patch @@ -13,10 +13,10 @@ Signed-off-by: Stephane Glondu 1 files changed, 28 insertions(+), 5 deletions(-) diff --git a/bytecomp/bytelink.ml b/bytecomp/bytelink.ml -index 4a6426d..e74a67d 100644 +index 47903c4..09689be 100644 --- a/bytecomp/bytelink.ml +++ b/bytecomp/bytelink.ml -@@ -402,7 +402,7 @@ let output_cds_file outfile = +@@ -415,7 +415,7 @@ let mlvalues_primitives = [ (* Output a bytecode executable as a C file *) @@ -25,9 +25,9 @@ index 4a6426d..e74a67d 100644 let outchan = open_out outfile in begin try (* The bytecode *) -@@ -444,17 +444,30 @@ CAMLextern void caml_startup_code(\n\ +@@ -457,17 +457,30 @@ CAMLextern void caml_startup_code(\n\ (* The table of primitives *) - Symtable.output_primitive_table outchan; + Symtable.output_primitive_table outchan mlvalues_primitives; (* The entry point *) -output_string outchan "\n\ +if with_main then begin @@ -59,7 +59,7 @@ index 4a6426d..e74a67d 100644 close_out outchan with x -> close_out outchan; -@@ -501,6 +514,16 @@ let link objfiles output_name = +@@ -514,6 +527,16 @@ let link objfiles output_name = Clflags.dllibs := !lib_dllibs @ !Clflags.dllibs; (* put user's DLLs first *) if not !Clflags.custom_runtime then link_bytecode tolink output_name true @@ -76,7 +76,7 @@ index 4a6426d..e74a67d 100644 else if not !Clflags.output_c_object then begin let bytecode_name = Filename.temp_file "camlcode" "" in let prim_name = Filename.temp_file "camlprim" ".c" in -@@ -539,7 +562,7 @@ let link objfiles output_name = +@@ -552,7 +575,7 @@ let link objfiles output_name = if Sys.file_exists c_file then raise(Error(File_exists c_file)); let temps = ref [] in try diff --git a/debian/patches/series b/debian/patches/series index 57c6cf8..920
[Pkg-ocaml-maint-commits] [SCM] OCaml packaging branch, master, updated. debian/3.12.0-4-5-g0e481e0
The following commit has been merged in the master branch: commit a52dced7d7f5fc6df0cccef5960bf657169a997c Author: Stephane Glondu Date: Thu Apr 21 18:50:18 2011 +0200 Two new patches to fix compilation of mldonkey diff --git a/debian/patches/0010-Declare-primitive-name-table-as-const-char.patch b/debian/patches/0010-Declare-primitive-name-table-as-const-char.patch new file mode 100644 index 000..aaf1aa3 --- /dev/null +++ b/debian/patches/0010-Declare-primitive-name-table-as-const-char.patch @@ -0,0 +1,25 @@ +From: Stephane Glondu +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 +--- + 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; +-- diff --git a/debian/patches/0011-Avoid-multiple-declarations-in-generated-.c-files-in.patch b/debian/patches/0011-Avoid-multiple-declarations-in-generated-.c-files-in.patch new file mode 100644 index 000..7c45949 --- /dev/null +++ b/debian/patches/0011-Avoid-multiple-declarations-in-generated-.c-files-in.patch @@ -0,0 +1,100 @@ +From: Stephane Glondu +Date: Thu, 21 Apr 2011 18:39:31 +0200 +Subject: Avoid multiple declarations in generated .c files in -output-obj + +In -output-obj mode, (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 +--- + 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 e74a67d..09689be 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 with_main = +@@ -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 *) + if with_main then begin + output_string outchan "\n\ +@@ -539,7 +552,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
[Pkg-ocaml-maint-commits] [SCM] OCaml packaging branch, master, updated. debian/3.12.0-4-5-g0e481e0
The following commit has been merged in the master branch: commit a35b906c23d1608d7901e7fc37694c1b38a13014 Author: Stephane Glondu Date: Thu Apr 21 17:05:38 2011 +0200 Another bugfix in -custom patch The piece of program: #ifdef __cplusplus } #endif wasn't printed in some cases. This affected mldonkey. diff --git a/debian/patches/0008-Embed-bytecode-in-C-object-when-using-custom.patch b/debian/patches/0008-Embed-bytecode-in-C-object-when-using-custom.patch index 3613d5e..9286f2c 100644 --- a/debian/patches/0008-Embed-bytecode-in-C-object-when-using-custom.patch +++ b/debian/patches/0008-Embed-bytecode-in-C-object-when-using-custom.patch @@ -9,11 +9,11 @@ Forwarded: not-needed Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=256900 Signed-off-by: Stephane Glondu --- - bytecomp/bytelink.ml | 30 ++ - 1 files changed, 26 insertions(+), 4 deletions(-) + bytecomp/bytelink.ml | 33 - + 1 files changed, 28 insertions(+), 5 deletions(-) diff --git a/bytecomp/bytelink.ml b/bytecomp/bytelink.ml -index 4a6426d..f0311ce 100644 +index 4a6426d..e74a67d 100644 --- a/bytecomp/bytelink.ml +++ b/bytecomp/bytelink.ml @@ -402,7 +402,7 @@ let output_cds_file outfile = @@ -25,7 +25,7 @@ index 4a6426d..f0311ce 100644 let outchan = open_out outfile in begin try (* The bytecode *) -@@ -444,7 +444,18 @@ CAMLextern void caml_startup_code(\n\ +@@ -444,17 +444,30 @@ CAMLextern void caml_startup_code(\n\ (* The table of primitives *) Symtable.output_primitive_table outchan; (* The entry point *) @@ -45,17 +45,21 @@ index 4a6426d..f0311ce 100644 void caml_startup(char ** argv)\n\ {\n\ caml_startup_code(caml_code, sizeof(caml_code),\n\ -@@ -454,7 +465,8 @@ void caml_startup(char ** argv)\n\ - }\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"; +#endif\n" -+end; close_out outchan with x -> close_out outchan; -@@ -501,6 +513,16 @@ let link objfiles output_name = +@@ -501,6 +514,16 @@ let link objfiles output_name = Clflags.dllibs := !lib_dllibs @ !Clflags.dllibs; (* put user's DLLs first *) if not !Clflags.custom_runtime then link_bytecode tolink output_name true @@ -72,7 +76,7 @@ index 4a6426d..f0311ce 100644 else if not !Clflags.output_c_object then begin let bytecode_name = Filename.temp_file "camlcode" "" in let prim_name = Filename.temp_file "camlprim" ".c" in -@@ -539,7 +561,7 @@ let link objfiles output_name = +@@ -539,7 +562,7 @@ let link objfiles output_name = if Sys.file_exists c_file then raise(Error(File_exists c_file)); let temps = ref [] in try -- OCaml packaging ___ Pkg-ocaml-maint-commits mailing list Pkg-ocaml-maint-commits@lists.alioth.debian.org http://lists.alioth.debian.org/mailman/listinfo/pkg-ocaml-maint-commits