From: Xavier Leroy <Xavier.Leroy@inria.fr>
To: Dave Mason <dmason@sarg.Ryerson.CA>, caml-list@inria.fr
Subject: Re: ocaml cross-compilation and bootable image
Date: Tue, 2 Mar 1999 12:05:36 +0100 [thread overview]
Message-ID: <19990302120536.08212@pauillac.inria.fr> (raw)
In-Reply-To: <199902271817.NAA15408@sarg.Ryerson.CA>; from Dave Mason on Sat, Feb 27, 1999 at 01:17:32PM -0500
> 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
prev parent reply other threads:[~1999-03-02 12:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-02-27 18:17 Dave Mason
1999-03-02 11:05 ` Xavier Leroy [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=19990302120536.08212@pauillac.inria.fr \
--to=xavier.leroy@inria.fr \
--cc=caml-list@inria.fr \
--cc=dmason@sarg.Ryerson.CA \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox