From 6f56e443414477c987ac29c704421a3d195c4c11 Mon Sep 17 00:00:00 2001 From: Stephane Glondu Date: Tue, 7 Feb 2012 10:40:05 +0100 Subject: [PATCH] Refresh patches --- .../0001-Pass-no-relax-to-ld-on-alpha.patch | 8 +- .../0002-Call-ld-with-proper-flags.patch | 6 +- debian/patches/0003-Don-t-use-rpath.patch | 4 +- ...-manpages-in-section-3o-instead-of-3.patch | 6 +- ...005-Patch-config.sh-for-installation.patch | 4 +- ...ld-as-a-link-on-either-.native-or-.b.patch | 6 +- ...nlink-works-on-powerpc-and-hurd-i386.patch | 18 +-- ...e-primitive-name-table-as-const-char.patch | 6 +- ...eclarations-in-generated-.c-files-in.patch | 16 +-- ...ize-executable-name-in-caml_startup_.patch | 4 +- ...tecode-in-C-object-when-using-custom.patch | 26 ++-- ...w-force_link-and-ccobjs-ccopts-when-.patch | 92 ------------- ...add-.type-directive-for-code-symbols.patch | 125 ------------------ .../0014-Add-support-for-ENOTSUP.patch | 49 ------- ...-in-X11-link-options-on-GNU-kFreeBSD.patch | 23 ---- debian/patches/series | 4 - 16 files changed, 52 insertions(+), 345 deletions(-) delete mode 100644 debian/patches/0012-Make-objinfo-show-force_link-and-ccobjs-ccopts-when-.patch delete mode 100644 debian/patches/0013-ocamlopt-arm-add-.type-directive-for-code-symbols.patch delete mode 100644 debian/patches/0014-Add-support-for-ENOTSUP.patch delete mode 100644 debian/patches/0015-Do-not-add-R-dir-in-X11-link-options-on-GNU-kFreeBSD.patch diff --git a/debian/patches/0001-Pass-no-relax-to-ld-on-alpha.patch b/debian/patches/0001-Pass-no-relax-to-ld-on-alpha.patch index 3d05dfce..abcd7647 100644 --- a/debian/patches/0001-Pass-no-relax-to-ld-on-alpha.patch +++ b/debian/patches/0001-Pass-no-relax-to-ld-on-alpha.patch @@ -6,13 +6,13 @@ Pass the --no-relax option to ld to fix a segfault in initialization code (bug#338437) --- configure | 4 +++- - 1 files changed, 3 insertions(+), 1 deletions(-) + 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/configure b/configure -index 9be5199..236e016 100755 +index 4ed6ce1..c632d6d 100755 --- a/configure +++ b/configure -@@ -284,7 +284,8 @@ case "$bytecc,$host" in +@@ -298,7 +298,8 @@ case "$bytecc,$host" in gcc,alpha*-*-linux*) if cc="$bytecc" sh ./hasgot -mieee; then bytecccompopts="-mieee $bytecccompopts"; @@ -22,7 +22,7 @@ index 9be5199..236e016 100755 cc,mips-*-irix6*) # Add -n32 flag to ensure compatibility with native-code compiler bytecccompopts="-n32" -@@ -738,6 +739,7 @@ case "$arch,$nativecc,$system,$host_type" in +@@ -731,6 +732,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;; diff --git a/debian/patches/0002-Call-ld-with-proper-flags.patch b/debian/patches/0002-Call-ld-with-proper-flags.patch index e1b47544..c2d01cba 100644 --- a/debian/patches/0002-Call-ld-with-proper-flags.patch +++ b/debian/patches/0002-Call-ld-with-proper-flags.patch @@ -7,13 +7,13 @@ to remove the "-Wl," parts, which are only used when ocamlopt calls gcc. --- configure | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure -index 236e016..d4287ed 100755 +index c632d6d..9c1bb8c 100755 --- a/configure +++ b/configure -@@ -1643,7 +1643,7 @@ echo "DEBUGGER=$debugger" >> Makefile +@@ -1613,7 +1613,7 @@ echo "DEBUGGER=$debugger" >> Makefile echo "CC_PROFILE=$cc_profile" >> Makefile echo "SYSTHREAD_SUPPORT=$systhread_support" >> Makefile echo "PARTIALLD=$partialld" >> Makefile diff --git a/debian/patches/0003-Don-t-use-rpath.patch b/debian/patches/0003-Don-t-use-rpath.patch index 83a5f556..3c90a170 100644 --- a/debian/patches/0003-Don-t-use-rpath.patch +++ b/debian/patches/0003-Don-t-use-rpath.patch @@ -4,10 +4,10 @@ Subject: Don't use rpath --- tools/ocamlmklib.mlp | 5 +++++ - 1 files changed, 5 insertions(+), 0 deletions(-) + 1 file changed, 5 insertions(+) diff --git a/tools/ocamlmklib.mlp b/tools/ocamlmklib.mlp -index 8374439..b8d9e33 100644 +index 3b31201..8846fd0 100644 --- a/tools/ocamlmklib.mlp +++ b/tools/ocamlmklib.mlp @@ -37,6 +37,11 @@ and output_c = ref "" (* Output name for C part of library *) diff --git a/debian/patches/0004-Put-manpages-in-section-3o-instead-of-3.patch b/debian/patches/0004-Put-manpages-in-section-3o-instead-of-3.patch index 7231e227..10f530fe 100644 --- a/debian/patches/0004-Put-manpages-in-section-3o-instead-of-3.patch +++ b/debian/patches/0004-Put-manpages-in-section-3o-instead-of-3.patch @@ -4,13 +4,13 @@ Subject: Put manpages in section 3o instead of 3 --- ocamldoc/Makefile | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ocamldoc/Makefile b/ocamldoc/Makefile -index 8f6e87c..ace934c 100644 +index d04809a..f8cb482 100644 --- a/ocamldoc/Makefile +++ b/ocamldoc/Makefile -@@ -318,7 +318,7 @@ test_texi: dummy +@@ -333,7 +333,7 @@ test_texi: dummy stdlib_man/Pervasives.3o: $(STDLIB_MLIS) $(MKDIR) stdlib_man $(OCAMLDOC_RUN) -man -d stdlib_man $(INCLUDES) \ diff --git a/debian/patches/0005-Patch-config.sh-for-installation.patch b/debian/patches/0005-Patch-config.sh-for-installation.patch index 809ffcba..69c8aa08 100644 --- a/debian/patches/0005-Patch-config.sh-for-installation.patch +++ b/debian/patches/0005-Patch-config.sh-for-installation.patch @@ -9,7 +9,7 @@ Use for installatation a patched config.sh (created by debian/rules). 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build/install.sh b/build/install.sh -index 2785932..e8a6c15 100755 +index c0ad62f..62d71d6 100755 --- a/build/install.sh +++ b/build/install.sh @@ -18,7 +18,7 @@ set -e @@ -22,7 +22,7 @@ index 2785932..e8a6c15 100755 not_installed=$PWD/_build/not_installed diff --git a/build/partial-install.sh b/build/partial-install.sh -index 56d3181..8e4fbd2 100755 +index 81c0e11..61cce5b 100755 --- a/build/partial-install.sh +++ b/build/partial-install.sh @@ -22,7 +22,7 @@ set -e diff --git a/debian/patches/0006-Install-ocamlbuild-as-a-link-on-either-.native-or-.b.patch b/debian/patches/0006-Install-ocamlbuild-as-a-link-on-either-.native-or-.b.patch index cac20849..048ab321 100644 --- a/debian/patches/0006-Install-ocamlbuild-as-a-link-on-either-.native-or-.b.patch +++ b/debian/patches/0006-Install-ocamlbuild-as-a-link-on-either-.native-or-.b.patch @@ -4,10 +4,10 @@ Subject: Install ocamlbuild as a link on either .native or .byte --- build/partial-install.sh | 17 ++++++++++++++++- - 1 files changed, 16 insertions(+), 1 deletions(-) + 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/build/partial-install.sh b/build/partial-install.sh -index 8e4fbd2..ca66bc1 100755 +index 61cce5b..73eda48 100755 --- a/build/partial-install.sh +++ b/build/partial-install.sh @@ -60,6 +60,21 @@ installbestbin() { @@ -32,7 +32,7 @@ index 8e4fbd2..ca66bc1 100755 installlib() { if [ -f "$1" ]; then dest="$2/`basename $1`" -@@ -156,7 +171,7 @@ echo "Installing ocamlbuild..." +@@ -158,7 +173,7 @@ echo "Installing ocamlbuild..." cd ocamlbuild installbin ocamlbuild.byte$EXE $BINDIR/ocamlbuild.byte$EXE installbin ocamlbuild.native$EXE $BINDIR/ocamlbuild.native$EXE diff --git a/debian/patches/0007-Natdynlink-works-on-powerpc-and-hurd-i386.patch b/debian/patches/0007-Natdynlink-works-on-powerpc-and-hurd-i386.patch index 739217df..abbf6088 100644 --- a/debian/patches/0007-Natdynlink-works-on-powerpc-and-hurd-i386.patch +++ b/debian/patches/0007-Natdynlink-works-on-powerpc-and-hurd-i386.patch @@ -11,25 +11,25 @@ typo... Bug: http://caml.inria.fr/mantis/view.php?id=5255 Signed-off-by: Stephane Glondu --- - configure | 3 ++- - 1 files changed, 2 insertions(+), 1 deletions(-) + configure | 2 ++ + 1 file changed, 2 insertions(+) diff --git a/configure b/configure -index d4287ed..d6ba2e3 100755 +index 9c1bb8c..a53f251 100755 --- a/configure +++ b/configure -@@ -620,13 +620,14 @@ if test $withsharedlibs = "yes"; then +@@ -628,6 +628,7 @@ 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 + i[3456]86-*-darwin[89].*) natdynlink=true;; + i[3456]86-*-darwin*) +@@ -636,6 +637,7 @@ if test $withsharedlibs = "yes"; then fi;; - i[3456]86-*-darwin[89]*) natdynlink=true;; -- powerpc64-*-linux*) natdynlink=true;; + x86_64-*-darwin*) natdynlink=true;; + powerpc64-*-linux*) natdynlink=true;; + powerpc-*-linux*) natdynlink=true;; sparc-*-linux*) natdynlink=true;; i686-*-kfreebsd*) natdynlink=true;; diff --git a/debian/patches/0008-Declare-primitive-name-table-as-const-char.patch b/debian/patches/0008-Declare-primitive-name-table-as-const-char.patch index c9a8ede7..fbfd2ec9 100644 --- a/debian/patches/0008-Declare-primitive-name-table-as-const-char.patch +++ b/debian/patches/0008-Declare-primitive-name-table-as-const-char.patch @@ -8,13 +8,13 @@ Bug: http://caml.inria.fr/mantis/view.php?id=5131 Signed-off-by: Stephane Glondu --- bytecomp/symtable.ml | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bytecomp/symtable.ml b/bytecomp/symtable.ml -index d6ecc94..37def29 100644 +index 4e5f147..0785316 100644 --- a/bytecomp/symtable.ml +++ b/bytecomp/symtable.ml -@@ -123,7 +123,7 @@ let output_primitive_table outchan = +@@ -126,7 +126,7 @@ let output_primitive_table outchan = fprintf outchan " %s,\n" prim.(i) done; fprintf outchan " (primitive) 0 };\n"; diff --git a/debian/patches/0009-Avoid-multiple-declarations-in-generated-.c-files-in.patch b/debian/patches/0009-Avoid-multiple-declarations-in-generated-.c-files-in.patch index 115c422d..2052b8fc 100644 --- a/debian/patches/0009-Avoid-multiple-declarations-in-generated-.c-files-in.patch +++ b/debian/patches/0009-Avoid-multiple-declarations-in-generated-.c-files-in.patch @@ -19,10 +19,10 @@ Signed-off-by: Stephane Glondu 3 files changed, 21 insertions(+), 6 deletions(-) diff --git a/bytecomp/bytelink.ml b/bytecomp/bytelink.ml -index bd8f3b2..9d62fc6 100644 +index 9bc5790..8f797a1 100644 --- a/bytecomp/bytelink.ml +++ b/bytecomp/bytelink.ml -@@ -400,6 +400,19 @@ let output_cds_file outfile = +@@ -408,6 +408,19 @@ let output_cds_file outfile = remove_file outfile; raise x @@ -41,8 +41,8 @@ index bd8f3b2..9d62fc6 100644 + (* 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 = + let link_bytecode_as_c ppf tolink outfile = +@@ -450,7 +463,7 @@ let link_bytecode_as_c ppf tolink outfile = (Marshal.to_string sections []); output_string outchan "\n};\n\n"; (* The table of primitives *) @@ -51,7 +51,7 @@ index bd8f3b2..9d62fc6 100644 (* The entry point *) output_string outchan "\ \nvoid caml_startup(char ** argv)\ -@@ -516,7 +529,7 @@ let link objfiles output_name = +@@ -529,7 +542,7 @@ let link ppf objfiles output_name = #else\n\ typedef long value;\n\ #endif\n"; @@ -61,10 +61,10 @@ index bd8f3b2..9d62fc6 100644 #ifdef __cplusplus\n\ }\n\ diff --git a/bytecomp/symtable.ml b/bytecomp/symtable.ml -index 37def29..70958ee 100644 +index 0785316..b70944c 100644 --- a/bytecomp/symtable.ml +++ b/bytecomp/symtable.ml -@@ -112,15 +112,17 @@ let output_primitive_names outchan = +@@ -115,15 +115,17 @@ let output_primitive_names outchan = open Printf @@ -86,7 +86,7 @@ index 37def29..70958ee 100644 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 +index d9a2be3..25bd62d 100644 --- a/bytecomp/symtable.mli +++ b/bytecomp/symtable.mli @@ -24,7 +24,7 @@ val require_primitive: string -> unit diff --git a/debian/patches/0010-Properly-initialize-executable-name-in-caml_startup_.patch b/debian/patches/0010-Properly-initialize-executable-name-in-caml_startup_.patch index fdfc3db3..d6aae88b 100644 --- a/debian/patches/0010-Properly-initialize-executable-name-in-caml_startup_.patch +++ b/debian/patches/0010-Properly-initialize-executable-name-in-caml_startup_.patch @@ -7,10 +7,10 @@ Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=627756 Signed-off-by: Stephane Glondu --- byterun/startup.c | 11 ++++++++++- - 1 files changed, 10 insertions(+), 1 deletions(-) + 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/byterun/startup.c b/byterun/startup.c -index db273b2..780cb1e 100644 +index feb5029..6fdba16 100644 --- a/byterun/startup.c +++ b/byterun/startup.c @@ -443,6 +443,10 @@ CAMLexport void caml_startup_code( 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 3f17f1d5..c062dcfe 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 @@ -15,19 +15,19 @@ Signed-off-by: Stephane Glondu 1 files changed, 32 insertions(+), 4 deletions(-) diff --git a/bytecomp/bytelink.ml b/bytecomp/bytelink.ml -index 9d62fc6..a3aee28 100644 +index 8f797a1..1de0a79 100644 --- a/bytecomp/bytelink.ml +++ b/bytecomp/bytelink.ml -@@ -415,7 +415,7 @@ let mlvalues_primitives = [ +@@ -423,7 +423,7 @@ let mlvalues_primitives = [ (* Output a bytecode executable as a C file *) --let link_bytecode_as_c tolink outfile = -+let link_bytecode_as_c tolink outfile with_main = +-let link_bytecode_as_c ppf tolink outfile = ++let link_bytecode_as_c ppf tolink outfile with_main = let outchan = open_out outfile in begin try (* The bytecode *) -@@ -457,14 +457,27 @@ let link_bytecode_as_c tolink outfile = +@@ -465,14 +465,27 @@ let link_bytecode_as_c ppf tolink outfile = (* The table of primitives *) Symtable.output_primitive_table outchan mlvalues_primitives; (* The entry point *) @@ -57,7 +57,7 @@ index 9d62fc6..a3aee28 100644 \n#ifdef __cplusplus\ \n}\ \n#endif\n"; -@@ -501,6 +514,11 @@ let fix_exec_name name = +@@ -510,6 +523,11 @@ let fix_exec_name name = if String.contains name '.' then name else name ^ ".exe" | _ -> name @@ -68,15 +68,15 @@ index 9d62fc6..a3aee28 100644 + (* Main entry point (build a custom runtime if needed) *) - let link objfiles output_name = -@@ -514,6 +532,16 @@ let link objfiles output_name = + let link ppf objfiles output_name = +@@ -523,6 +541,16 @@ let link ppf 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 + link_bytecode ppf tolink output_name true + else if not legacy_custom && not !Clflags.output_c_object && not !Clflags.make_runtime then + let c_file = Filename.temp_file "camlobj" ".c" in + try -+ link_bytecode_as_c tolink c_file true; ++ link_bytecode_as_c ppf tolink c_file true; + let exec_name = fix_exec_name output_name in + if not (build_custom_runtime c_file exec_name) + then raise(Error Custom_runtime); @@ -86,12 +86,12 @@ index 9d62fc6..a3aee28 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 -@@ -552,7 +580,7 @@ let link objfiles output_name = +@@ -565,7 +593,7 @@ let link ppf objfiles output_name = if Sys.file_exists c_file then raise(Error(File_exists c_file)); let temps = ref [] in try -- link_bytecode_as_c tolink c_file; -+ link_bytecode_as_c tolink c_file false; +- link_bytecode_as_c ppf tolink c_file; ++ link_bytecode_as_c ppf tolink c_file false; if not (Filename.check_suffix output_name ".c") then begin temps := c_file :: !temps; if Ccomp.compile_file c_file <> 0 then raise(Error Custom_runtime); diff --git a/debian/patches/0012-Make-objinfo-show-force_link-and-ccobjs-ccopts-when-.patch b/debian/patches/0012-Make-objinfo-show-force_link-and-ccobjs-ccopts-when-.patch deleted file mode 100644 index 18324124..00000000 --- a/debian/patches/0012-Make-objinfo-show-force_link-and-ccobjs-ccopts-when-.patch +++ /dev/null @@ -1,92 +0,0 @@ -From: Mehdi Dogguy -Date: Fri, 15 Jul 2011 21:45:29 +0200 -Subject: Make objinfo show force_link and ccobjs/ccopts when needed - -- Show force_link for cmx/cma -- Show ccobjs/ccopts for cmxa - -Forwarded: http://caml.inria.fr/mantis/view.php?id=5316 ---- - tools/objinfo.ml | 25 +++++++++++++++++++++---- - 1 files changed, 21 insertions(+), 4 deletions(-) - -diff --git a/tools/objinfo.ml b/tools/objinfo.ml -index 4f467f2..b75b83a 100644 ---- a/tools/objinfo.ml -+++ b/tools/objinfo.ml -@@ -44,8 +44,12 @@ let print_name_crc (name, crc) = - let print_line name = - printf "\t%s\n" name - -+let string_of_bool name = -+ if name then "YES" else "no" -+ - let print_cmo_infos cu = - printf "Unit name: %s\n" cu.cu_name; -+ printf "Force link: %s\n" (string_of_bool cu.cu_force_link); - print_string "Interfaces imported:\n"; - List.iter print_name_crc cu.cu_imports; - printf "Uses unsafe features: "; -@@ -85,7 +89,7 @@ let print_spaced_string s = - printf " %s" s - - let print_cma_infos (lib : Cmo_format.library) = -- printf "Force custom: %s\n" (if lib.lib_custom then "YES" else "no"); -+ printf "Force custom: %s\n" (string_of_bool lib.lib_custom); - printf "Extra C object files:"; - (* PR#4949: print in linking order *) - List.iter print_spaced_string (List.rev lib.lib_ccobjs); -@@ -102,8 +106,11 @@ let print_cmi_infos name sign comps crcs = - printf "Interfaces imported:\n"; - List.iter print_name_crc crcs - --let print_general_infos name crc defines cmi cmx = -+let print_general_infos name force_link crc defines cmi cmx = - printf "Name: %s\n" name; -+ (match force_link with -+ Some flag -> printf "Force link: %s\n" (string_of_bool flag) -+ | None -> ()); - printf "CRC of implementation: %s\n" (Digest.to_hex crc); - printf "Globals defined:\n"; - List.iter print_line defines; -@@ -116,7 +123,7 @@ open Cmx_format - - let print_cmx_infos (ui, crc) = - print_general_infos -- ui.ui_name crc ui.ui_defines ui.ui_imports_cmi ui.ui_imports_cmx; -+ ui.ui_name (Some ui.ui_force_link) crc ui.ui_defines ui.ui_imports_cmi ui.ui_imports_cmx; - printf "Approximation:\n"; - Format.fprintf Format.std_formatter " %a@." print_approx_infos ui.ui_approx; - let pr_funs _ fns = -@@ -124,11 +131,21 @@ let print_cmx_infos (ui, crc) = - printf "Currying functions:%a\n" pr_funs ui.ui_curry_fun; - printf "Apply functions:%a\n" pr_funs ui.ui_apply_fun - -+let print_cmxa_infos lib = -+ printf "Extra C object files:"; -+ (* PR#4949: print in linking order *) -+ List.iter print_spaced_string (List.rev lib.lib_ccobjs); -+ printf "\nExtra C options:"; -+ List.iter print_spaced_string lib.lib_ccopts; -+ printf "\n"; -+ List.iter print_cmx_infos lib.lib_units -+ - let print_cmxs_infos header = - List.iter - (fun ui -> - print_general_infos - ui.dynu_name -+ None - ui.dynu_crc - ui.dynu_defines - ui.dynu_imports_cmi -@@ -234,7 +251,7 @@ let dump_obj filename = - end else if magic_number = cmxa_magic_number then begin - let li = (input_value ic : library_infos) in - close_in ic; -- List.iter print_cmx_infos li.lib_units -+ print_cmxa_infos li - end else begin - let pos_trailer = in_channel_length ic - len_magic_number in - let _ = seek_in ic pos_trailer in --- diff --git a/debian/patches/0013-ocamlopt-arm-add-.type-directive-for-code-symbols.patch b/debian/patches/0013-ocamlopt-arm-add-.type-directive-for-code-symbols.patch deleted file mode 100644 index a4c0491e..00000000 --- a/debian/patches/0013-ocamlopt-arm-add-.type-directive-for-code-symbols.patch +++ /dev/null @@ -1,125 +0,0 @@ -From: Stephane Glondu -Date: Fri, 12 Aug 2011 21:13:17 +0200 -Subject: ocamlopt/arm: add .type directive for code symbols - -Bug: http://caml.inria.fr/mantis/view.php?id=5336 -Bug-Ubuntu: https://bugs.launchpad.net/bugs/810402 -Signed-off-by: Stephane Glondu ---- - asmcomp/arm/emit.mlp | 1 + - asmrun/arm.S | 12 ++++++++++++ - 2 files changed, 13 insertions(+), 0 deletions(-) - -diff --git a/asmcomp/arm/emit.mlp b/asmcomp/arm/emit.mlp -index 2003313..a4b2241 100644 ---- a/asmcomp/arm/emit.mlp -+++ b/asmcomp/arm/emit.mlp -@@ -556,6 +556,7 @@ let fundecl fundecl = - ` .text\n`; - ` .align 2\n`; - ` .global {emit_symbol fundecl.fun_name}\n`; -+ ` .type {emit_symbol fundecl.fun_name}, %function\n`; - `{emit_symbol fundecl.fun_name}:\n`; - let n = frame_size() in - ignore(emit_stack_adjustment "sub" n); -diff --git a/asmrun/arm.S b/asmrun/arm.S -index 164f731..1313e9c 100644 ---- a/asmrun/arm.S -+++ b/asmrun/arm.S -@@ -24,6 +24,7 @@ alloc_limit .req r10 - /* Allocation functions and GC interface */ - - .globl caml_call_gc -+ .type caml_call_gc, %function - caml_call_gc: - /* Record return address and desired size */ - /* Can use alloc_limit as a temporary since it will be reloaded by -@@ -41,6 +42,7 @@ caml_call_gc: - bx lr - - .globl caml_alloc1 -+ .type caml_alloc1, %function - caml_alloc1: - sub alloc_ptr, alloc_ptr, #8 - cmp alloc_ptr, alloc_limit -@@ -54,6 +56,7 @@ caml_alloc1: - b caml_alloc1 - - .globl caml_alloc2 -+ .type caml_alloc2, %function - caml_alloc2: - sub alloc_ptr, alloc_ptr, #12 - cmp alloc_ptr, alloc_limit -@@ -67,6 +70,7 @@ caml_alloc2: - b caml_alloc2 - - .globl caml_alloc3 -+ .type caml_alloc3, %function - caml_alloc3: - sub alloc_ptr, alloc_ptr, #16 - cmp alloc_ptr, alloc_limit -@@ -80,6 +84,7 @@ caml_alloc3: - b caml_alloc3 - - .globl caml_allocN -+ .type caml_allocN, %function - caml_allocN: - sub alloc_ptr, alloc_ptr, r12 - cmp alloc_ptr, alloc_limit -@@ -134,6 +139,7 @@ caml_allocN: - /* Function to call is in r12 */ - - .globl caml_c_call -+ .type caml_c_call, %function - caml_c_call: - /* Preserve return address in callee-save register r4 */ - mov r4, lr -@@ -160,6 +166,7 @@ caml_c_call: - /* Start the Caml program */ - - .globl caml_start_program -+ .type caml_start_program, %function - caml_start_program: - ldr r12, .Lcaml_program - -@@ -235,6 +242,7 @@ caml_start_program: - /* Raise an exception from C */ - - .globl caml_raise_exception -+ .type caml_raise_exception, %function - caml_raise_exception: - /* Reload Caml allocation pointers */ - ldr r12, .Lcaml_young_ptr -@@ -250,6 +258,7 @@ caml_raise_exception: - /* Callback from C to Caml */ - - .globl caml_callback_exn -+ .type caml_callback_exn, %function - caml_callback_exn: - /* Initial shuffling of arguments (r0 = closure, r1 = first arg) */ - mov r12, r0 -@@ -259,6 +268,7 @@ caml_callback_exn: - b .Ljump_to_caml - - .globl caml_callback2_exn -+ .type caml_callback2_exn, %function - caml_callback2_exn: - /* Initial shuffling of arguments (r0 = closure, r1 = arg1, r2 = arg2) */ - mov r12, r0 -@@ -269,6 +279,7 @@ caml_callback2_exn: - b .Ljump_to_caml - - .globl caml_callback3_exn -+ .type caml_callback3_exn, %function - caml_callback3_exn: - /* Initial shuffling of arguments */ - /* (r0 = closure, r1 = arg1, r2 = arg2, r3 = arg3) */ -@@ -281,6 +292,7 @@ caml_callback3_exn: - b .Ljump_to_caml - - .globl caml_ml_array_bound_error -+ .type caml_ml_array_bound_error, %function - caml_ml_array_bound_error: - /* Load address of [caml_array_bound_error] in r12 */ - ldr r12, .Lcaml_array_bound_error --- diff --git a/debian/patches/0014-Add-support-for-ENOTSUP.patch b/debian/patches/0014-Add-support-for-ENOTSUP.patch deleted file mode 100644 index e2f031f2..00000000 --- a/debian/patches/0014-Add-support-for-ENOTSUP.patch +++ /dev/null @@ -1,49 +0,0 @@ -From: Samuel Thibault -Date: Tue, 1 Nov 2011 13:48:38 +0100 -Subject: Add support for ENOTSUP - -On some systems such as Solaris or GNU/Hurd, ENOTSUP and EOPNOSUPP do -not have the same value, but ocaml code only deals with EOPNOSUPP, and -thus ocaml applications only handle the EOPNOSUPP case. The attached -patch fixes it by making ocaml convert ENOTSUP errors into EOPNOSUPP -errors. - -This patch fixes omake build on hurd-i386. - -Bug: http://caml.inria.fr/mantis/view.php?id=5382 -Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=646372 -Signed-off-by: Stephane Glondu ---- - otherlibs/unix/unixsupport.c | 11 ++++++++++- - 1 files changed, 10 insertions(+), 1 deletions(-) - -diff --git a/otherlibs/unix/unixsupport.c b/otherlibs/unix/unixsupport.c -index a471f9e..db5912e 100644 ---- a/otherlibs/unix/unixsupport.c -+++ b/otherlibs/unix/unixsupport.c -@@ -165,7 +165,11 @@ - #define ESOCKTNOSUPPORT (-1) - #endif - #ifndef EOPNOTSUPP --#define EOPNOTSUPP (-1) -+# ifdef ENOTSUP -+# define EOPNOTSUPP ENOTSUP -+# else -+# define EOPNOTSUPP (-1) -+# endif - #endif - #ifndef EPFNOSUPPORT - #define EPFNOSUPPORT (-1) -@@ -252,6 +256,11 @@ value unix_error_of_code (int errcode) - int errconstr; - value err; - -+#if defined(ENOTSUP) && (EOPNOTSUPP != ENOTSUP) -+ if (errcode == ENOTSUP) -+ errcode = EOPNOTSUPP; -+#endif -+ - errconstr = - cst_to_constr(errcode, error_table, sizeof(error_table)/sizeof(int), -1); - if (errconstr == Val_int(-1)) { --- diff --git a/debian/patches/0015-Do-not-add-R-dir-in-X11-link-options-on-GNU-kFreeBSD.patch b/debian/patches/0015-Do-not-add-R-dir-in-X11-link-options-on-GNU-kFreeBSD.patch deleted file mode 100644 index 4c29883f..00000000 --- a/debian/patches/0015-Do-not-add-R-dir-in-X11-link-options-on-GNU-kFreeBSD.patch +++ /dev/null @@ -1,23 +0,0 @@ -From: Stephane Glondu -Date: Tue, 1 Nov 2011 15:28:15 +0100 -Subject: Do not add -R$dir in X11 link options on GNU/kFreeBSD - -Signed-off-by: Stephane Glondu -Bug: http://caml.inria.fr/mantis/view.php?id=5393 ---- - configure | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) - -diff --git a/configure b/configure -index d6ba2e3..20b4b17 100755 ---- a/configure -+++ b/configure -@@ -1373,6 +1373,7 @@ do - else - x11_libs="-L$dir" - case "$host" in -+ *-kfreebsd*-gnu) x11_link="-L$dir -lX11";; - *-*-*bsd*) x11_link="-R$dir -L$dir -lX11";; - *) x11_link="-L$dir -lX11";; - esac --- diff --git a/debian/patches/series b/debian/patches/series index c5cc0384..43d48de2 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -9,7 +9,3 @@ 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-Make-objinfo-show-force_link-and-ccobjs-ccopts-when-.patch -0013-ocamlopt-arm-add-.type-directive-for-code-symbols.patch -0014-Add-support-for-ENOTSUP.patch -0015-Do-not-add-R-dir-in-X11-link-options-on-GNU-kFreeBSD.patch -- 2.30.2