English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
Re: [Felix-impl] it no me build
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2007-05-15 (19:43)
From: skaller <skaller@u...>
Subject: Re: [Felix-impl] it no me build
On Tue, 2007-05-15 at 21:00 +0200, Rhythmic Fistman wrote:

> > The Felix build scripts ARE different .. but the effect should
> > be the same. Any which way it should either fail on all platforms
> > or build on all platforms .. there's no C code here, and Ocaml
> > is supposed to be portable.
> Somewhere... someone lied.
> Haha, just kidding. The difference is that the tarball uses ocamlc and
> flx here is using ocamlc.opt. Could that be relevant?

As I understand it:

No. ocamlc.opt and ocamlc are functionally equivalent.
The only difference is ocamlc is compiled with ocamlc,
whereas ocamlc.opt is compiled with ocamlopt.

In other words, ocamlc.opt is faster because it is
built as native code, but they're built from the
same ocaml sources. Bootstrapping is cool!

In fact there ARE differences between ocamlc
and ocamlopt built code, apart from speed:
for example bytecode supports dynamic loading
of bytecode whereas native code does not ..
but this shouldn't affect ocamlc.

However, -pack MAY be different; it is a new feature
and didn't work on any processor other than x86 originally,
so this might be a difference. -pack does nasty stuff
with native code which requires arcane knowledge of 
object files, whereas with bytecode it's the same on
all platforms.

The -pack option 'packs' several object files into
a single object file and makes the submodules
of a the new master file.

For native code -for-pack has to be specified,
whereas it isn't used with bytecode -- so there's
a difference between ocamlc and ocamlopt .. but this
is related to the object file formats and what information
they contain (bytecode contains what ocaml wants it to,
whereas native code is machine binary and is restricted
by the platform linker format).

John Skaller <skaller at users dot sf dot net>
Felix, successor to C++: http://felix.sf.net