Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] -custom switch useless??
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Stefano Zacchiroli <zack@c...>
Subject: [Caml-list] -custom switch useless??
  I'm building an ocaml package from sources and seems to me that
-custom switch on ocamlc compiler has no effect.
I'm building ocaml findlib and from the Makefile:

ocamlfind: findlib.cma $(OCAMLFIND_OBJECTS)
 $(OCAMLC) -custom -g -o ocamlfind findlib.cma unix.cma \

with -custom switch ocamlfind is linked with the interpreter and the
resulting file is a regular ELF executable that contains both the
interpreter and the bytecode.

Well, if I remove the -custom switch nothing changes!  I obtain the same
file and not a #!/usr/bin/ocamlrun executable as I expected, the two
files are identical (diff tested).

If I try the same with a stupid test:

  let main () = print_string "Hello, world!\n";;
  main ();;

all work as expected (ocamlrun executable without -custom, linked
version with -custom).

Why this difference?

TIA, cheers.

Stefano "Zack" Zacchiroli <> ICQ# 33538863
Home Page:
Undergraduate student of Computer Science @ University of Bologna, Italy
                 - Information wants to be Open -
Bug reports:  FAQ:
To unsubscribe, mail  Archives: