[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#256900: Ocaml compiled programs cannot be stripped



Hello Sven,

>>> 1- "ocamlc -custom" is deprecated and packages that use it should be fixed.
>>>
>> If this option is deprecated, i think we should handle it so for all
>> debian package. See at the end of the mail for a proposed way of doing
>> thing.
> 
> One question though which comes to mind while reading this thread. When
> was the -custom version deprecated, and what does this imply for the
> version of ocaml in debian which will ship with lenny.

OK, maybe "deprecated" isn't the right word.

The -custom option is not deprecated in the sense of "it will be
removed at some point in the future".  We Caml people take backward
compatibility very very seriously.  This option is here to stay,
but not to be improved, because:

The -custom option is deprecated in the sense that, since the
introduction of dynamic loading of stub libraries in the bytecode
interpreter circa 2001, there exists a much better alternative:
put the native stubs into shared libraries and produce "pure" bytecode
executables that dynamically load these libraries.  This is better
than -custom for several reasons:

- smaller executables;
- bytecode executables can be shared across different platforms;
- it is possible to use such mixed Caml/native libraries from the toplevel.

So, I think everyone should be gently encouraged to use shared libs
instead of -custom.  Especially since, as I mentioned earlier, some
Caml projects that started before 2001 still force -custom when
linking with standard libraries like unix.cma or str.cma, while this
is now entirely unnecessary.

Hope this addresses your concerns.

Best regards,

- Xavier Leroy



Reply to: