* [Caml-list] -custom switch useless??
@ 2001-08-20 12:54 Stefano Zacchiroli
2001-08-21 11:36 ` Alain Frisch
0 siblings, 1 reply; 2+ messages in thread
From: Stefano Zacchiroli @ 2001-08-20 12:54 UTC (permalink / raw)
To: Inria Ocaml Mailing List
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Caml-list] -custom switch useless??
2001-08-20 12:54 [Caml-list] -custom switch useless?? Stefano Zacchiroli
@ 2001-08-21 11:36 ` Alain Frisch
0 siblings, 0 replies; 2+ messages in thread
From: Alain Frisch @ 2001-08-21 11:36 UTC (permalink / raw)
To: Stefano Zacchiroli; +Cc: Inria Ocaml Mailing List
On Mon, 20 Aug 2001, Stefano Zacchiroli wrote:
> I'm building an ocaml package from sources and seems to me that
> -custom switch on ocamlc compiler has no effect.
The switch tells the compiler to include a customized version of the
runtime interpreter. Some libraries requires this behaviour; this is the
case for unix.cma, because it comes with a C support library (libunix.a).
These libraries are linked with the -custom switch, and the linker
remembers it when linking your program. So -custom is implicit
in this case.
You can disable the behaviour with the -noautolink switch.
It may be useful if you want to build a custom runtime interpreter
(with unix support for instance) once and for all (-make-runtime),
and use it with -use-runtime for all your programs.
--
Alain Frisch
-------------------
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2001-08-21 11:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-08-20 12:54 [Caml-list] -custom switch useless?? Stefano Zacchiroli
2001-08-21 11:36 ` Alain Frisch
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox