Version française
Home     About     Download     Resources     Contact us    
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 \
            $(OCAMLFIND_OBJECTS)

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 hello_world.ml 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 <zack@cs.unibo.it> ICQ# 33538863
Home Page: http://www.students.cs.unibo.it/~zacchiro
Undergraduate student of Computer Science @ University of Bologna, Italy
                 - Information wants to be Open -
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr