* ocaml cross-compilation and bootable image
@ 1999-02-27 18:17 Dave Mason
1999-03-02 11:05 ` Xavier Leroy
0 siblings, 1 reply; 2+ messages in thread
From: Dave Mason @ 1999-02-27 18:17 UTC (permalink / raw)
To: caml-list
I'm running ocamlopt on an Alpha (Linux) but need to generate i386
binary executables.
Has anyone done this? Any hints on how to do it?
(I'm going to be creating a bootable kernel image as part of the FunOS
project - see http://sarg.ryerson.ca/FunOS/ if interested. Yes,
obviously I could build natively on an i386 box, but we'll initially
be using the bochs emulator, and the Alpha is a lot faster.)
Thanks ../Dave
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: ocaml cross-compilation and bootable image
1999-02-27 18:17 ocaml cross-compilation and bootable image Dave Mason
@ 1999-03-02 11:05 ` Xavier Leroy
0 siblings, 0 replies; 2+ messages in thread
From: Xavier Leroy @ 1999-03-02 11:05 UTC (permalink / raw)
To: Dave Mason, caml-list
> I'm running ocamlopt on an Alpha (Linux) but need to generate i386
> binary executables.
> Has anyone done this? Any hints on how to do it?
I never tried to set up a full cross-compiler, but it should not be
hard. You need to run the configure script, then edit the generated
file config/Makefile and change the following variables:
ARCH=<your target architecture, e.g. i386>
MODEL=default
SYSTEM=<your target OS (for choosing calling conventions, etc), e.g. linux_elf>
NATIVECC=<your cross C compiler, e.g. myarch-gcc>
NATIVECCCOMPOPTS=<whatever options you need at compile-time>
NATIVECCLINKOPTS=<whatever options you need at link-time>
ASPP=<your cross assembler with preprocessing, e.g. myarch-gcc>
ASPPFLAGS=-c -DSYS_$(SYSTEM) <extra options if needed>
Finally, the name of the assembler called to assemble the output of
ocamlopt is (unfortunately) hard-wired in asmcomp/<arch>/proc.ml,
function assemble_file, so you may need to change that file.
Or just play with $PATH until "as" refers to your cross-assembler.
There's also a hard-wired call to "ar" in utils/ccomp.ml that may need
to be changed.
Good luck,
- Xavier Leroy
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~1999-03-02 12:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-02-27 18:17 ocaml cross-compilation and bootable image Dave Mason
1999-03-02 11:05 ` Xavier Leroy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox