From: Stefano Zacchiroli Date: Mon, 9 Apr 2007 17:51:12 +0000 (+0000) Subject: described what to do regarding to -g with ocaml bytecode programs and libraries X-Git-Tag: archive/raspbian/4.08.1-4+rpi1~3^2~589 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=9f4ac881b9920c7e1d715c678b3907445e2765c1;p=ocaml.git described what to do regarding to -g with ocaml bytecode programs and libraries --- diff --git a/debian/changelog b/debian/changelog index 1bc1ed85..d2abcad2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -10,8 +10,11 @@ ocaml (3.09.3-2) UNRELEASED; urgency=low substituted for @OCamlDllDir@ in .in files - remove files which have been generated from their .in counterparts upon clean target invocation + * Policy + - mandate the compilation of *.cm[ao] with debugging information for + libraries and forbid it for bytecode programs - -- Stefano Zacchiroli Tue, 2 Jan 2007 19:35:02 +0100 + -- Stefano Zacchiroli Mon, 09 Apr 2007 19:46:36 +0200 ocaml (3.09.3-1) experimental; urgency=low diff --git a/debian/policy/chapter-generalities.xml b/debian/policy/chapter-generalities.xml index 7a920ae4..65afdd9e 100644 --- a/debian/policy/chapter-generalities.xml +++ b/debian/policy/chapter-generalities.xml @@ -10,7 +10,7 @@ ocamlopt) are generally faster than bytecode executables since they are compiled specifically for an architecture. Bytecode executables (produced by the compiler - ocamlc) have the advantage of being portable, + &ocamlc;) have the advantage of being portable, which means that a bytecode executable can be run on any architecture without having to be recompiled. Bytecode executables are smaller than native code executables. If considering only one @@ -37,8 +37,8 @@ The ocaml-native-compilers package contains the OCaml compiler executables built in native mode: - ocamlc.opt, which produces bytecode, and - ocamlopt.opt, which produces native + ocamlc.opt, which produces bytecode, and + ocamlopt.opt, which produces native code. Since the OCaml compilers are themselves written in OCaml this package exists only on architectures where compilation to native code is supported. @@ -47,7 +47,7 @@ The ocaml-nox package contains the OCaml compiler executables built in bytecode mode: - ocamlc, which produces bytecode, and on + ocamlc, which produces bytecode, and on architectures where compilation to native code is supported the compiler ocamlopt, which produces native code. It is important to understand that on architectures where @@ -70,13 +70,13 @@ Compiler executable in bytecode - ocamlc - ocamlopt + ocamlc + ocamlopt Compiler executable in native code - ocamlc.opt - ocamlopt.opt + ocamlc.opt + ocamlopt.opt @@ -135,7 +135,7 @@ - The ocaml-native-compilers package contains the OCaml compilers built in native mode (ocamlc.opt and ocamlopt.opt). + The ocaml-native-compilers package contains the OCaml compilers built in native mode (ocamlc.opt and ocamlopt.opt). The compilers themselves are built in native mode, nonetheless, both compilers for compiling toward bytecode and native code are contained in this package. @@ -187,7 +187,7 @@ standard library directory, which is /usr/lib/ocaml/VERSION/, at the time of writing &ocaml-sys-dir;. This location can be obtained - from the OCaml compiler by invoking it as ocamlc -where. + from the OCaml compiler by invoking it as ocamlc -where. @@ -204,7 +204,7 @@ bytecode executables (they can be recognized since they start with the shebang line #!/usr/bin/ocamlrun) - bytecode executables linked in custom mode. They are generated by ocamlc (or ocamlc.opt), when the -custom flag is given at link time. Those executables are in ELF format and include both the final bytecode and the bytecode interpreter. strip should never be invoked on them, since it will remove the bytecode part. + bytecode executables linked in custom mode. They are generated by ocamlc (or ocamlc.opt), when the -custom flag is given at link time. Those executables are in ELF format and include both the final bytecode and the bytecode interpreter. strip should never be invoked on them, since it will remove the bytecode part. native executables (in ELF format) @@ -256,7 +256,7 @@ - The + preceding any library in the of ocamlc or ocamlopt won't be expanded to the local standard library path. You need to specify the path entirely. + The + preceding any library in the of ocamlc or ocamlopt won't be expanded to the local standard library path. You need to specify the path entirely. diff --git a/debian/policy/chapter-libpack.xml b/debian/policy/chapter-libpack.xml index d5c3c255..01d8c5f4 100644 --- a/debian/policy/chapter-libpack.xml +++ b/debian/policy/chapter-libpack.xml @@ -1,5 +1,5 @@
- Creating a package for a library + Creating Packages for OCaml Libraries A package which provides an OCaml library called xxx should be split as follows: @@ -20,6 +20,14 @@ libxxx-ocaml-dev packages should be in Section: libdevel + + All &ocaml-name; bytecode libraries + (*.cma) and bytecode object files + (*.cmo) should be compiled for + debugging, i.e. they should be compiled passing the + option to ocamlc (or + ocamlc.opt). + diff --git a/debian/policy/chapter-progpack.xml b/debian/policy/chapter-progpack.xml index f380dce7..c9de9e8c 100644 --- a/debian/policy/chapter-progpack.xml +++ b/debian/policy/chapter-progpack.xml @@ -75,8 +75,15 @@ the requirements of the compilation of the program. - Bytecode programs which are compiled by ocamlc -custom must not be stripped. In particular, their package should be excluded from the dh_strip script. When compiled this way, an elf executable is generated containing the ocaml interpreter, and the bytecode of the program in a section which is removed when the program is stripped. For more information, see the bug 256900. An override for the lintian warning is considered as acceptable in this situation. + Bytecode programs which are compiled by ocamlc -custom must not be stripped. In particular, their package should be excluded from the dh_strip script. When compiled this way, an elf executable is generated containing the ocaml interpreter, and the bytecode of the program in a section which is removed when the program is stripped. For more information, see the bug 256900. An override for the lintian warning is considered as acceptable in this situation. + + + Bytecode programs should not be compiled for debugging, i.e. they should not + be compiled passing the option to + ocamlc (or ocamlc.opt). + +