<filename>ocamlopt</filename>) are generally faster than bytecode
executables since they are compiled specifically for an
architecture. Bytecode executables (produced by the compiler
- <filename>ocamlc</filename>) 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
<para>
The <filename>ocaml-native-compilers</filename> package contains
the OCaml compiler executables built in native mode:
- <filename>ocamlc.opt</filename>, which produces bytecode, and
- <filename>ocamlopt.opt</filename>, which produces native
+ <command>ocamlc.opt</command>, which produces bytecode, and
+ <command>ocamlopt.opt</command>, 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.
<para>
The <filename>ocaml-nox</filename> package contains the OCaml
compiler executables built in bytecode mode:
- <filename>ocamlc</filename>, which produces bytecode, and on
+ <command>ocamlc</command>, which produces bytecode, and on
architectures where compilation to native code is supported the
compiler <filename>ocamlopt</filename>, which produces native
code. It is important to understand that on architectures where
<tbody>
<row>
<entry>Compiler executable in bytecode</entry>
- <entry>ocamlc</entry>
- <entry>ocamlopt</entry>
+ <entry><command>ocamlc</command></entry>
+ <entry><command>ocamlopt</command></entry>
</row>
<row>
<entry>Compiler executable in native code</entry>
- <entry>ocamlc.opt</entry>
- <entry>ocamlopt.opt</entry>
+ <entry><command>ocamlc.opt</command></entry>
+ <entry><command>ocamlopt.opt</command></entry>
</row>
</tbody>
</tgroup>
</listitem>
<listitem>
<para>
- The <filename>ocaml-native-compilers</filename> package contains the OCaml compilers built in native mode (<filename>ocamlc.opt</filename> and <filename>ocamlopt.opt</filename>).
+ The <filename>ocaml-native-compilers</filename> package contains the OCaml compilers built in native mode (<command>ocamlc.opt</command> and <command>ocamlopt.opt</command>).
</para>
<note>
<para>The compilers themselves are built in native mode, nonetheless, both compilers for compiling toward bytecode and native code are contained in this package.</para>
standard library directory</emphasis>, which is
<filename>/usr/lib/ocaml/VERSION/</filename>, at the time of writing
<filename>&ocaml-sys-dir;</filename>. This location can be obtained
- from the OCaml compiler by invoking it as <code>ocamlc -where</code>.
+ from the OCaml compiler by invoking it as <userinput>ocamlc -where</userinput>.
</para>
</section>
<itemizedlist>
<listitem><para>bytecode executables (they can be recognized since they start with the shebang line <code>#!/usr/bin/ocamlrun</code>)</para></listitem>
<listitem>
- <para>bytecode executables linked in <emphasis>custom mode</emphasis>. They are generated by <filename>ocamlc</filename> (or <filename>ocamlc.opt</filename>), when the <code>-custom</code> flag is given at link time. Those executables are in ELF format and include both the final bytecode and the bytecode interpreter. <filename>strip</filename> should never be invoked on them, since it will remove the bytecode part.
+ <para>bytecode executables linked in <emphasis>custom mode</emphasis>. They are generated by <command>ocamlc</command> (or <command>ocamlc.opt</command>), when the <userinput>-custom</userinput> flag is given at link time. Those executables are in ELF format and include both the final bytecode and the bytecode interpreter. <command>strip</command> should never be invoked on them, since it will remove the bytecode part.
</para>
</listitem>
<listitem><para>native executables (in ELF format)</para></listitem>
<warning>
<para>
- The <varname>+</varname> preceding any library in the <option>-I</option> of ocamlc or ocamlopt won't be expanded to the local standard library path. You need to specify the path entirely.
+ The <varname>+</varname> preceding any library in the <option>-I</option> of <command>ocamlc</command> or <command>ocamlopt</command> won't be expanded to the local standard library path. You need to specify the path entirely.
</para>
</warning>
</para>
<para>
- Bytecode programs which are compiled by <code>ocamlc -custom</code> must not be stripped. In particular, their package should be excluded from the <filename>dh_strip</filename> 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 <ulink url="http://bugs.debian.org/256900">256900</ulink>. An override for the lintian warning is considered as acceptable in this situation.
+ Bytecode programs which are compiled by <userinput>ocamlc -custom</userinput> must not be stripped. In particular, their package should be excluded from the <command>dh_strip</command> 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 <ulink url="http://bugs.debian.org/256900">256900</ulink>. An override for the lintian warning is considered as acceptable in this situation.
</para>
+
+<para>
+ Bytecode programs should not be compiled for debugging, i.e. they should not
+ be compiled passing the <option>-g</option> option to
+ <command>ocamlc</command> (or <command>ocamlc.opt</command>).
+</para>
+
</section>
<section id="bytecode-native-prog">